Joined: Nov 30, 2009
Post Count: 3
Status:
Offline
Create forniture from Sketchup
Greetings.
I'm new to the forum and new to the product.
I started using sweethome3d, and I found that it didn't meet my requirements, I needed more power to model the changes I want to do to my house.
I have read a lot about how can I do this changes. I downloaded Sketchup from Google, learned how to do models. Easy, no problem, I have used modelling software like this before.
So I tried to extract models from sketchup to sweethome3d, but there was no direct way to do so, and what I have read about was incomplete and didn't tell the full explanation about how to do it.
After a bit trying, I have found out how to do it, so I want to share it, maybe it will help somebody trying the same.
I do know programs used in this explanation are not free-of-use, although they are free-of-cost. So maybe this howto can be not legal if you use it to make profit, so be careful if you use it in commercial ways, ensure yourself the legal use reading the licenses. I use it only for personal purposes, so I didn't read that boring stuff... :)
2) Use Sketchup to model something. You can use textures as well.
3) Export the sketchupmodel in Google Earth file (kml).
4) Change kml file extension to zip (yes... it's a zip. Everybody now uses zips! Office 2007... X3 reunion...)
5) Unzip.
6) Go to see the model in COLLADA (models/xxx.dae).
7) Convert the dae to fbx using FBX (just last version of fbx works fine).
8) Convert the fbx to obj, using FBX again. It will generate two files, .OBJ (mesh) and .MTL (materials)
9) Textures: FBX doesn't convert the textures. So we must do it manually. Go for the textures directory (root of unzipped file/textures), copy all of them to the models directory. Then, open the MTL file generated by FBX when converting to OBJ, as text, look for the materials yo have used, and insert this line:
newmtl material_0_1_0ID Ka 0.000000 0.000000 0.000000 Kd 0.800000 0.800000 0.800000 map_Kd texture0.jpg <--- NEW LINE TO BE ADDED. illum 1 Tr 1.000000
Don't use relative paths, just the name of the texture, since we will put it in the root of the zip where we will pack everything. If you are not sure what textures are to be added to what materials, refer to the COLLADA file (.dae), open it as text (is an XML), and search ".jpg" string...
Pack the .obj file, the .mtl file, and all the textures used in a zip, throw it to the import forniture window of SweetHome3D, and you have it.
Best regards, and thanks for this excellent product (and now even more powerfull!!!)
Argentina
Joined: Sep 8, 2009
Post Count: 40
Status:
Offline
Re: Create forniture from Sketchup
I think there is a more straightforward way. You can set this parameter to spacify any aditional loader: -Dcom.eteks.sweethome3d.j3d.additionalLoaderClasses=the.collada.loader.class Tha jar containing that class should be on the program classpath. You can visit this page to find any suitable Collada loader (I couldn't recommend any, since i haven't used collada) Also, you can search in the Java3d forums: http://forums.java.net/jive/forum.jspa?forumID=70 I hope this is usefull
When I went to the project that is referenced in last post, 3dworkbench, I didn't found the loader (the post is 26th november 2009... maybe it's not deployed yet).
So, I tried the link in the first post, looking the loader from Shiva. This is the only loader I have found.
So I have downloaded that zip, put in classpath, set the windows registry HKEY_USERS\...\Software\JavaSoft\Prefs\com\eteks\sweethome3d\j3d\additionalLoaderClasses=KmzLoader, and then go for some sketchup staff, export in kmz, and try to import to sweethome3d... but it says "format not recognized".
Obviously I'm so far away to know where I fail. I will try something, like calling the class with full name... but I will give up soon if I find no clues about what I'm doing bad.
Thanks for your help, if I have more information, I'll tell.
Argentina
Joined: Sep 8, 2009
Post Count: 40
Status:
Offline
Re: Create forniture from Sketchup
So I have downloaded that zip, put in classpath, set the windows registry HKEY_USERS\...\Software\JavaSoft\Prefs\com\eteks\sweethome3d\j3d\additionalLoaderClasses=KmzLoader, and then go for some sketchup staff, export in kmz, and try to import to sweethome3d... but it says "format not recognized".
is the full quallified class name that implements the loader interface (should be something like
com.shiva.collada.loader
). There must be some javadoc along with the jar or on the web site. (I repeat, I know nothing of collada, but I know of Java3d and SweetHome3D) Unless there is a problem with the collada file, or the Loader does not support some feature, it should work. I did it with a Loader made by my self and it worked straightforward. It saved me lots of pain in the ... brain. Hope it works
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: Create forniture from Sketchup
As support for DAE/Collada format was added in version 2.4, there's a simpler way to reuse 3D models created with Sketchup in Sweet Home 3D now: export it at Collada format directly from Sketchup!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Hello ! Do you know what are the good options to exports models from sketchup ?
My problem is that the DAE exported file does not have any texture nor color in 3D sweet home. Another small problem: the default size of the object is not the same as it is in sketchup.
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: Create forniture from Sketchup
I made a small change about the importation of normals in DAE files in the current beta version 2.5. I don't think it will change anything in your case but could you check if it works better? Could you also post here or send me your SKP file and a screen capture of the options you chose at DAE exportation time? If you don't want to share your whole model, try to create a smaller one that has the same problem.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: Create forniture from Sketchup
Thank you for sending me your model. It helped me to fix a bug in DAE/Collada import program. Until the next release, the correction can be tested in the current beta version 2.5. Some issues I saw in other DAE models were fixed too.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator