Print at Aug 10, 2020, 11:28:17 AM View all posts in this thread on one page
Posted by kbios at Sep 11, 2011, 6:45:38 PM
Problem with DAE model
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/detail...4ccf1ce0968dae64bdf69b2ca
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

Posted by Puybaret at Sep 11, 2011, 9:40:47 PM
Re: Problem with DAE model
Where did you store the texture image files of the DAE file in Furniture.jar?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer

Posted by kbios at Sep 12, 2011, 12:39:00 AM
Re: Problem with DAE model
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>

Posted by Puybaret at Sep 12, 2011, 7:08:38 AM
Re: Problem with DAE model
You should make two changes:

  • add the following line to the properties file:
    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 developer

Posted by kbios at Sep 12, 2011, 11:14:50 AM
Re: Problem with DAE model
Thanks, that worked perfectly!