Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Help  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 12
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 31766 times and has 11 replies Next Thread
mariobrosss
Newbie




Joined: Nov 30, 2009
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
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... :)

Steps:
1) Download Autodesk FBX converter. It's free for downloading, at http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=6837478

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!!!)
[Nov 30, 2009 4:21:15 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
mariobrosss
Newbie




Joined: Nov 30, 2009
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: Create forniture from Sketchup

Ups! an error! the Google Earth file is .KMZ extension, not .KML... sorry.
[Nov 30, 2009 4:25:54 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
alied
Member
Member's Avatar

Argentina
Joined: Sep 8, 2009
Post Count: 40
Status: Offline
Reply to this Post  Reply with Quote 
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
[Nov 30, 2009 9:43:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
alied
Member
Member's Avatar

Argentina
Joined: Sep 8, 2009
Post Count: 40
Status: Offline
Reply to this Post  Reply with Quote 
Re: Create forniture from Sketchup

sorry, forgot some links:
http://java3d.j3d.org/utilities/loaders.html
https://java3d.dev.java.net/
[Nov 30, 2009 9:50:23 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
mariobrosss
Newbie




Joined: Nov 30, 2009
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
Re: Create forniture from Sketchup

Buf.

I have tried to apply your solution, alied. But I couldn't.

There was no collada loader in the links you provided. Searching forums, I found this thread:
http://forums.java.net/jive/thread.jspa?messageID=371298񚩢

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.

http://shinoblogbyshiva.blogspot.com/search/label/Collada

Down, there is a link to the jar version of the loader.

http://www.ylab.ai.kyutech.ac.jp/~shiva/jws/kmzloader/kmzloader.jar

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.
[Dec 3, 2009 12:14:07 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
alied
Member
Member's Avatar

Argentina
Joined: Sep 8, 2009
Post Count: 40
Status: Offline
Reply to this Post  Reply with Quote 
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".

What you need to assign to
-Dcom.eteks.sweethome3d.j3d.additionalLoaderClasses=the.collada.loader.class
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
[Dec 3, 2009 4:13:17 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
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! smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[May 26, 2010 7:02:12 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
zarg404
Newbie




Joined: Jun 7, 2010
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Create forniture from Sketchup

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.

Any idea ?

Thank you
[Jun 7, 2010 3:42:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
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 developer
[Jun 11, 2010 10:24:45 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 5837
Status: Offline
Reply to this Post  Reply with Quote 
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 developer
[Jun 13, 2010 3:25:35 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.eteks.com [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2017 eTeks - All rights reserved