Problem with DAE model

This topic has been viewed 3998 times and has 4 replies
Thread status: Active
Still a problem with your graphic card? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
kbios
Posts: 3
Joined: Sun Sep 11, 2011 6:29 pm

Problem with DAE model

Post by kbios »

Hi, the following is with sweethome3d 3.3 on ubuntu lucid 32 bit, java 1.6.0_26.
I'm trying to use the door at
http://sketchup.google.com/3dwarehouse/ ... 4bdf69b2ca
in my project. If I import it through the import furniture wizard, everything works fine, but I do not get the "occupation arch" in the 2d view (as expected). So instead I added it to Furniture.jar, setting the parameters as follows:

name#66=Open wood door
category#66=Doors and windows
icon#66=/com/eteks/sweethome3d/io/resources/openwooddoor.png
model#66=/com/eteks/sweethome3d/io/resources/openwooddoor/models/openwooddoor.dae
width#66=91.5
depth#66=68
height#66=208.5
movable#66=false
doorOrWindow#66=true
doorOrWindowWallThickness#66=7.5
doorOrWindowWallDistance#66=1
doorOrWindowSashXAxis#66=5
doorOrWindowSashYAxis#66=8.5
doorOrWindowSashWidth#66=81.5
doorOrWindowSashStartAngle#66=0
doorOrWindowSashEndAngle#66=-90

This way I can import the model as if it was a default one and everything works as expected (including the occupation arch and photo rendering).
BUT, if I save the project, exit from sweethome3d and reopen it, the door loses its texture (it is all white), both in the 3d view and in the photo rendering, and the only thing I can do to get it back is to delete it and add it again.

Any help? Thanks
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Problem with DAE model

Post by Puybaret »

Where did you store the texture image files of the DAE file in Furniture.jar?
Emmanuel Puybaret, Sweet Home 3D creator
kbios
Posts: 3
Joined: Sun Sep 11, 2011 6:29 pm

Re: Problem with DAE model

Post by kbios »

I left them under /com/eteks/sweethome3d/io/resources/openwooddoor/images/.

There is a file called textures.txt with the following content in /com/eteks/sweethome3d/io/resources/openwooddoor/:
<../images/texture0.jpg> <../images/texture0.jpg>
<../images/texture1.jpg> <../images/texture1.jpg>
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Problem with DAE model

Post by Puybaret »

You should make two changes:
  • add the following line to the properties file:

    Code: Select all

    multiPartModel#66=true
    
    When multiPartModel is set to true, Sweet Home 3D saves in the .sh3d file the 3D model file and all the other files found in the model folder. This means here that it will save the file /com/eteks/sweethome3d/io/resources/openwooddoor/models/openwooddoor.dae and all the files found in /com/eteks/sweethome3d/io/resources/openwooddoor/models.
  • move images folder containing the model textures in the /com/eteks/sweethome3d/io/resources/openwooddoor/models folder and edit the .dae file with a text editor to remove the "../" text in front of images/texture0.jpg and images/texture1.jpg.

Sorry, if the multipart property isn't very convenient to include dae files proposed by Google Warehouse. When I added multiPartModel property, I didn't want to parse the saved model to find the dependent files and thought that including all the files found in the same folder as the model would be enough. I added support for dae format a long time after that.
Emmanuel Puybaret, Sweet Home 3D creator
kbios
Posts: 3
Joined: Sun Sep 11, 2011 6:29 pm

Re: Problem with DAE model

Post by kbios »

Thanks, that worked perfectly!
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest