confused imported glass not transparent

This topic has been viewed 5961 times and has 9 replies
Thread status: Active
Still a problem with your graphic card? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
User avatar
pencilart
Posts: 188
Joined: Tue Oct 02, 2007 4:37 pm

imported glass not transparent

Post by pencilart »

I have recently upgraded Art Of Illusion, which I use to make my models and I used to make glass and export it as an obj and the glass would be transparent (after having assigned a transparent texture to it). Using this new version of AOI (2.9) when I export a glass (tried it with a material and without a material) and import it into the latest version of SweetHome3D (3.4) the glass appears either gray or black, no transparency at all.

I don't know if the problem is with A.O.I. or SweetHome3D. How can I tell? And how do I fix this?
sclee
Posts: 44
Joined: Mon Jan 03, 2011 12:32 am
Country: Taipei, Taiwan
Contact:

Re: imported glass not transparent

Post by sclee »

Modifying the furniture, you try to use color, instead of using the textures.
It needs to increase transparency in the next version of the floor, Transparency of separate wall and floor.
User avatar
pencilart
Posts: 188
Joined: Tue Oct 02, 2007 4:37 pm

Re: imported glass not transparent

Post by pencilart »

After playing around with this all day, I found that I had to go back to using this (the old way) by opening the .obj in a text editor:

Code: Select all

g sweethome3d_window_pane
usemtl flltgrey
User avatar
pencilart
Posts: 188
Joined: Tue Oct 02, 2007 4:37 pm

Re: imported glass not transparent

Post by pencilart »

ok, never mind.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: imported glass not transparent

Post by Puybaret »

If OBJ models created with a previous version of AOI are still correctly imported, it means that AOI changed something (it looks like a possible regression since version 2.9 brought changes on textures and materials). You can change it the way you did, but you can also change the value following "d" in the MTL file, 0 being fully transparent and 1 fully opaque.
If you're sure it's a bug, it would be nice to report it to AOI developer.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
pencilart
Posts: 188
Joined: Tue Oct 02, 2007 4:37 pm

Re: imported glass not transparent

Post by pencilart »

There seems to be no simple "d" in the .mtl file.
This is the info that AOI puts into it:

Code: Select all

#Produced by Art of Illusion 2.9, Mon Dec 26 16:19:27 EST 2011
newmtl Glass
Kd 0.0928 0.0928 0.0928
Ks 0.144 0.144 0.144
Ka 0 0 0
illum 2
Ns 127
I tried making the "Kd" line as 0.0 0.0 0.0 but that did not work. I also tried it as 0 0 0 but that too did not work. The vase imported into SH3D was still black.

So, I went with:

Code: Select all

g sweethome3d_window_pane_vase
usemtl glasstransparent
in the .obj file.

Be expecting this vase ( http://www.storm-artists.net/view/117760 ) in the models contributions shortly. :D
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: imported glass not transparent

Post by Puybaret »

You could add the "d" line yourself. For example:

Code: Select all

d 0.5
Your vase is really nice. Thanks for your contribution. [:)]
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
pencilart
Posts: 188
Joined: Tue Oct 02, 2007 4:37 pm

Re: imported glass not transparent

Post by pencilart »

So, the

Code: Select all

d 0.5
could be placed between

Code: Select all

newmtl Glass
and

Code: Select all

Kd 0.0928 0.0928 0.0928
?

Or should it be placed at the bottom of

Code: Select all

Ns 127
?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: imported glass not transparent

Post by Puybaret »

You can place the d line anywhere between a newmtl line and the next newmtl line if there are more than one material defined in the MTL file.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
pencilart
Posts: 188
Joined: Tue Oct 02, 2007 4:37 pm

Re: imported glass not transparent

Post by pencilart »

that worked! The glass is rather dark though. So now I have 3 versions: A light one, (usemtl glasstransparent) a medium shaded one, (usemtlglass) and now this one (using the method you just taught me).
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest