alphaBlending bug

Software: Away3D 4.x

Avatar
loth, Sr. Member
Posted: 25 August 2011 10:35 AM   Total Posts: 236

Hello i have error on alphaBlending with .bothSides=true;
full object become transparent
can be usfull for glass

   

Richard Olsson, Administrator
Posted: 25 August 2011 01:25 PM   Total Posts: 1192   [ # 1 ]

I’m not sure I understand the issue. Can you explain it a bit more thoroughly, and perhaps post a screenshot?

   

Avatar
theMightyAtom, Sr. Member
Posted: 25 August 2011 04:23 PM   Total Posts: 669   [ # 2 ]

Hi loth, for glass try a reflective material (see examples)

https://github.com/away3d/away3d-examples-broomstick/blob/master/src/EnvMapDiffuseTest.as

Then use a ColorMaterial as the base, with a low alpha value.
alphaBlending is for putting “holes” in your material via it’s alpha channel.
(BitmapMaterials only)

bothSides doesn’t work at the moment, if your scene has lights.
I think it has to do with the normals only going one way (?)
The only work around I’ve found is a double mesh, i.e. two planes facing in opposite directions instead of one. Just think of it as double glazing…

Good luck!

   

Avatar
theMightyAtom, Sr. Member
Posted: 26 August 2011 12:04 PM   Total Posts: 669   [ # 3 ]

here’s one I prepared earlier….

glass = new ColorMaterial(0x0000001);
glass.addMethod(new EnvMapMethod(envMap));

glass.specular 3;
glass.alpha 0.3;
glass.gloss 1000

where envMap is a cube map.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X