Download

Online

Gallery

Blog

  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: 11
Posts: 11   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 22057 times and has 10 replies Next Thread
califdon
Newbie




Joined: Oct 31, 2009
Post Count: 15
Status: Offline
Reply to this Post  Reply with Quote 
Transparent (glass) furniture??

I have been trying to import glass sliding shower doors for a bathtub, but unsuccessful in getting the glass to be transparent. After a lot of attempts and help from the AoI forum, I'm able to get the effect that I want in the rendering within AoI, but when I export as .obj/.mtl files and import as furniture into SH3D, the doors are solid white or solid black. Is there any way to create such transparency in objects created in AoI for use in SH3D?
[Dec 2, 2009, 3:17:24 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: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

The easiest way should be to modify the MTL file before importing its sibling OBJ file.
A MTL file defines a set of materials i.e. colors with various parameters described in MTL specifications.
If you want to change the transparency of a material, you should change or add a line starting by "d" by setting a value between 0 (completely transparent) and 1 (fully opaque).

For example if your material file contains the following lines:

newmtl gray
Kd 0.25 0.25 0.25
Ks 0 0 0
Ka 0 0 0
illum 1
newmtl white
Kd 1 1 1
Ks 0 0 0
Ka 0 0 0
illum 1


And you want to make the gray color half transparent, you should have a "d" line like this:

newmtl gray
Kd 0.25 0.25 0.25
Ks 0 0 0
Ka 0 0 0
illum 1
d 0.5
newmtl white
Kd 1 1 1
Ks 0 0 0
Ka 0 0 0
illum 1


In fact, I just generated this example with Art Of Illusion, and discovered that you should always define the color of objects in AOI using textures and not materials (materials are not exported to OBJ files), and that AOI should be able to generate this "d" line, since it lets you choose the transparency of a texture.
It would be nice to post a new feature request for this in AOI. wink
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
----------------------------------------
[Edit 1 times, last edit by Puybaret at Dec 20, 2009, 8:13:47 AM]
[Dec 2, 2009, 5:23: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 
califdon
Newbie




Joined: Oct 31, 2009
Post Count: 15
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

Fantastic! I will experiment with this. If I manage to understand this and make it work, I will indeed suggest to AOI that it would be a very desirable feature for their export capability.
[Dec 2, 2009, 6:27:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
califdon
Newbie




Joined: Oct 31, 2009
Post Count: 15
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

Eureka! Yes, now I have determined that I can edit either the .mtl file as you described above, or the .obj file, using a standard texture called glasstransparent. I ended up doing the latter, producing a great pair of shower doors for my tub! It would be nice to have the transparency be carried directly into the exported object by AOI, and I will suggest that, but just to be able to achieve it so easily makes me very happy right now. Many thanks for your help and references!
[Dec 2, 2009, 9:24:55 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
digitalis
Newbie
Member's Avatar

The Netherlands
Joined: Dec 16, 2009
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

I would like to know this trick too! But I don't know how to open (and edit) this MTL-file. Is it done within SweetHome, or in Art of Illusion? Please help!
[Dec 18, 2009, 11:40:17 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: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

The MTL file is just a text file. You can open it with Notepad or Wordpad.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Dec 18, 2009, 5:49:56 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
califdon
Newbie




Joined: Oct 31, 2009
Post Count: 15
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

Puybaret: "A MTL file defines a set of materials i.e. colors with various parameters described in MTL specifications."

I would love to see those specs, but I've been trying that link for several days and it doesn't seem to ever load a page, although the UWA.edu.au site is running. I also wasn't successful in searching Google for the information. Do you know of any other source for the format info?
[Dec 20, 2009, 12:33:30 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: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

I updated the link to MTL specifications in my previous message. I hope that one won't fail in the coming months ! wink
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Dec 20, 2009, 8:16:01 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
digitalis
Newbie
Member's Avatar

The Netherlands
Joined: Dec 16, 2009
Post Count: 9
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

Many thanks... Merci beaucoup!
I gave this file a safe place on my iMac.
[Dec 20, 2009, 11:55:20 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
califdon
Newbie




Joined: Oct 31, 2009
Post Count: 15
Status: Offline
Reply to this Post  Reply with Quote 
Re: Transparent (glass) furniture??

Yes, thanks! That's very helpful.
[Dec 20, 2009, 7:09:33 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 11   Pages: 2   [ 1 2 | Next Page ]
[ 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 2006-2024 eTeks - All rights reserved