Glass material

Software: Away3D 4.x

Avatar
GoroMatsumoto, Sr. Member
Posted: 24 December 2012 06:04 AM   Total Posts: 166

I want to get glass material like this car’s windows.
http://away3d.com/showcase/detail/car_visualizer
http://carvisualizer.plus360degrees.com/away3d/

I set 0x00000000 bitmapData for TextureMaterial
and alphaBlending = true, my mesh is disappeared.

I used FresnelEnvMap, RefractionEnvMap,
but I haven’t gotten enough result.

Can anybody teach me?

   

Avatar
loth, Sr. Member
Posted: 24 December 2012 12:37 PM   Total Posts: 236   [ # 1 ]

sure the first 00 is alpha so 00 is completly hide
0x22000000 is transparente but black
so 0x22505022 is transparente and a bit yellow
0xff505022 is not transparent

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 25 December 2012 01:52 AM   Total Posts: 166   [ # 2 ]

Thanks loth.

Yeah. I know.
But, I want absolute transparent material like above link’s glass material. And that’s EnvMap’s alpha seems not so lower.

I check your racing example source, but I can’t understand the way…
https://github.com/lo-th/loth_labs/blob/master/src/Intermediate_Car.as
On your way, Is AutoMapper important for glass material??

   

Ivan Moreno, Newbie
Posted: 28 December 2012 10:23 PM   Total Posts: 22   [ # 3 ]

Hi guys,

I did something like this:

var glassReflection:EnvMapMethod = new EnvMapMethod(YourCubeTextures);//play with other type of reflections
var glassMaterial:ColorMaterial = new ColorMaterial(0xffffff, 0.4);
glassMaterial.addMethod(glassReflection);

Play with the alpha, specular and glossiness values of the material as well as the color gradient to make the glass more or less opaque, transparent and reflective. Also the realism of the material varies depending on the cube textures you use. If you use real time reflections the results can look different from some angles and probably you will have to add a little extra custom shading.

I hope this helps. smile

Cheers.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 29 December 2012 12:05 PM   Total Posts: 166   [ # 4 ]

Thnaks Ivan.

I have tested that way too.
I think that FresnelEnvMap is better than EnvMap.

myMaterial.alpha .4;
var 
fre:FresnelEnvMapMethod = new FresnelEnvMapMethod(cubeTexture1);
fre.fresnelPower 100;
fre.normalReflectance .8;
myMaterial.addMethod(fre); 

Try this too.
Cheers.

   

Ivan Moreno, Newbie
Posted: 30 December 2012 03:56 AM   Total Posts: 22   [ # 5 ]

Hi Goro,

Indeed fresnel equations give better angle reflections and refractions, also help to illuminate more realistically the material without adding extra lights. It is useful if you want to make high reflective metal/conductive materials like chrome or gold, or polarized glasses. For transparent materials it is not that cool in my opinion, unless your mesh is more a concave shape and needs to have a visible IOT result at the same time that an IOR result (E.g. soap bubbles, some wine glasses or water among others situations). But it can be use for flat/planar glass as well.
smile

If you want to have the same visuals as your example, the way to achieve it is in the way I described above. But playing with some values for your needs.
smile

Cheers.

   

Avatar
GoroMatsumoto, Sr. Member
Posted: 01 January 2013 09:20 PM   Total Posts: 166   [ # 6 ]

Thanks for explaining.
I want and tested the glass material on more complex geometry than plane.
So, Fresnel had seem better than Env.

But I haven’t get true glass like material.
The glass material that I want is like this:
* diffuse alpha = 0
* specular alpha = 0
* reflection alpha = .5
I could not set each properties separately on Away3D.
It seems diffuse’s alpha affect other method’s alpha.

Although this may be a issue of the rendering process,
I will keep researching.

If you know about this topic,
please remind me.

Cheers, and happy new year.

   
   
‹‹ PathExtrude Deprecated

X

Away3D Forum

Member Login

Username

Password

Remember_me



X