Index  | Recent Threads  | List Attachments  | 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: 9
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 13915 times and has 8 replies Next Thread
RUSSIAN
Newbie



RUSSIA
Joined: Feb 8, 2010
Post Count: 12
Status: Offline
Reply to this Post  Reply with Quote 
How to make a mirror surface

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.
[May 27, 2010, 6:23:06 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
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. smile
The first time will be probably difficult, but once you understood the logic, it's quite easy.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 27, 2010, 10:50:56 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
RUSSIAN
Newbie



RUSSIA
Joined: Feb 8, 2010
Post Count: 12
Status: Offline
Reply to this Post  Reply with Quote 
Re: How to make a mirror surface

Wow. That's work.

Now I have a nice wardrobe with specular doors.

Thanx!
[May 27, 2010, 1:34:34 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3991
Status: Offline
Reply to this Post  Reply with Quote 
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
----------------------------------------
Hans

new website - under constuction
hansdirkse.info
[May 27, 2010, 2:11:46 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
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! smile
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
[May 27, 2010, 2:15:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
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
[May 27, 2010, 2:22:57 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
RUSSIAN
Newbie



RUSSIA
Joined: Feb 8, 2010
Post Count: 12
Status: Offline
Reply to this Post  Reply with Quote 
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!
[May 27, 2010, 2:40:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3991
Status: Offline
Reply to this Post  Reply with Quote 
Re: How to make a mirror surface

Emmanuel:

If ever you're bored with programming, you would make a fine lawyer! :-)

Hans
----------------------------------------
Hans

new website - under constuction
hansdirkse.info
[May 27, 2010, 2:55:04 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
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. smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 27, 2010, 9:02:41 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ 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 2024 Space Mushrooms - All rights reserved