France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: How to make a mirror surface
In the current version of Sweet Home 3D, a part of a 3D model is treated as a mirror if the name of that part starts with sweethome3d_window_mirror. As the way to name a part differs from one format to the other, here's the steps to follow if you want to name mirror surfaces modeled with a texture image in a 3D model at any format: - download the mirror model you want, - import it in an empty document in Sweet Home 3D, - export the document at OBJ format, - edit the generated MTL file and find the line(s) starting by map_Kdand followed by the file name containing the mirror texture image found in the same folder as OBJ and MTL files, - in the lines that precedes that map_Kd line, find the first line starting by newmtl and note down the material name that follows newmtl, - now, edit the OBJ file and find the line(s) starting with usemtl and followed by the material name of the mirror you found in the MTL file, - in the g line(s) that preceding the usemtl line(s), add the sweethome3d_window_mirror text in front of the piece name following the g letter, with no space between sweethome3d_window_mirror and the piece name, - save the OBJ file, - import the saved OBJ file in your home and check if it's treated as a mirror with the two best qualities in the Create photo dialog.
I hope you can make it. The first time will be probably difficult, but once you understood the logic, it's quite easy.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: How to make a mirror surface
Great you found out how to do it even when there's no texture image for the mirror part! By the way, you might have encountered a bug during the last step that prevented the reimported OBJ model to appear correctly in the 3D view. I fixed this bug, but until the correction is released, the workaround is to reimport a ZIP file containing the OBJ file, the MTL file and its images, instead of reimporting the OBJ file itself.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: How to make a mirror surface
Hans, Russian and other contributors: Before sharing any model of Google 3D Warehouse, any derived model or any SH3D file containing such a model, let's wait the conclusion of the Redistributing Google 3D Warehouse models question I asked on the Map Maker community discussions dedicated to Google 3D Warehouse questions.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
RUSSIA
Joined: Feb 8, 2010
Post Count: 12
Status:
Offline
Re: How to make a mirror surface
Great you found out how to do it even when there's no texture image for the mirror part!
Yeah, there was only 1 texture (wood) in that file. When I exported it to obj, there was wardrobe_piece_1_1.jpg , but .mtl file had also mentioned materials piece_1_41, piece_1_61 and piece_1_53, and there weren't map_Kd line for these materials.
I copied wardrobe_piece_1_1.jpg to *_1_61.jpg, *_1_53.jpg and *_1_41.jpg, and added the map_Kd lines to each part of .mtl file.
Then I draw a gray rectangle in Paint, and save it like "mirror.jpg".
Then I tried to found, which of the materials is for what parts of wardrobe (just renamed mirror.jpg to wardrobe_piece_1_41.jpg and so on, and imported furniture after every try).
And the last part, was changning the .obj file for mirror material, as you recommended.
May be I did some excessive work, but the result is OK.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: How to make a mirror surface
Bryce S., product manager at 3D warehouse answered to my questions. As long as we respect the copyrights of the creators of 3D models and don't create a service competing with Google 3D Warehouse, I think there's no problem.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator