Joined: Oct 31, 2009
Post Count: 15
Status:
Offline
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?
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
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.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
----------------------------------------
[Edit 1 times,
last edit by Puybaret at Dec 20, 2009, 8:13:47 AM]
Joined: Oct 31, 2009
Post Count: 15
Status:
Offline
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.
Joined: Oct 31, 2009
Post Count: 15
Status:
Offline
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!
The Netherlands
Joined: Dec 16, 2009
Post Count: 9
Status:
Offline
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!
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
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 creator
Joined: Oct 31, 2009
Post Count: 15
Status:
Offline
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?
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
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 !
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator