Transparent (glass) furniture??

This topic has been viewed 34257 times and has 10 replies
Thread status: Active
How can I do this? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
califdon
Posts: 15
Joined: Sat Oct 31, 2009 6:48 pm

Transparent (glass) furniture??

Post by califdon »

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?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Transparent (glass) furniture??

Post by Puybaret »

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:

Code: Select all

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:

Code: Select all

newmtl gray
Kd 0.25 0.25 0.25
Ks 0 0 0
Ka 0 0 0
illum 1
[b]d 0.5[/b]
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
califdon
Posts: 15
Joined: Sat Oct 31, 2009 6:48 pm

Re: Transparent (glass) furniture??

Post by califdon »

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.
califdon
Posts: 15
Joined: Sat Oct 31, 2009 6:48 pm

Re: Transparent (glass) furniture??

Post by califdon »

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!
User avatar
digitalis
Posts: 9
Joined: Wed Dec 16, 2009 8:40 am
Country: The Netherlands

Re: Transparent (glass) furniture??

Post by digitalis »

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!
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Transparent (glass) furniture??

Post by Puybaret »

The MTL file is just a text file. You can open it with Notepad or Wordpad.
Emmanuel Puybaret, Sweet Home 3D creator
califdon
Posts: 15
Joined: Sat Oct 31, 2009 6:48 pm

Re: Transparent (glass) furniture??

Post by califdon »

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?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Transparent (glass) furniture??

Post by Puybaret »

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
User avatar
digitalis
Posts: 9
Joined: Wed Dec 16, 2009 8:40 am
Country: The Netherlands

Re: Transparent (glass) furniture??

Post by digitalis »

Many thanks... Merci beaucoup!
I gave this file a safe place on my iMac.
califdon
Posts: 15
Joined: Sat Oct 31, 2009 6:48 pm

Re: Transparent (glass) furniture??

Post by califdon »

Yes, thanks! That's very helpful.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest