Hello.
Is there any way to make a mirror surface?
I've downloaded some mirror furniture from google warehouse, but all of them don't reflect anything in render.
Could I change something in .dae file to make it a real mirror?
p.s. couldn't use blender and so on, wanna use only sweethome3d and text editor.
How to make a mirror surface
This topic has been viewed 15075 times and has 8 replies
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_Kd and 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.
- 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_Kd and 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
Re: How to make a mirror surface
Russian:
Well done! Maybe you could share the file with us? That would be really nice.
You could upload it to www.mediafire.com and share the link here.
Hans
Well done! Maybe you could share the file with us? That would be really nice.
You could upload it to www.mediafire.com and share the link here.
Hans
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.
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
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.
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
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.
Thanx for the main idea!
Re: How to make a mirror surface
Emmanuel:
If ever you're bored with programming, you would make a fine lawyer!
Hans
If ever you're bored with programming, you would make a fine lawyer!
Hans
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. [:)]
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
Who is online
Users browsing this forum: No registered users and 1 guest