Away3D 4 beta, ambientColor, ambient no longer working?

Software: Away3D 4.x

Stephen Hopkins, Sr. Member
Posted: 27 February 2012 01:23 AM   Total Posts: 110

I have a mesh that uses a ColorMaterial, which I know works properly since I can change the color of the mesh using the colorMaterial.color

My project has code like this

colorMaterial.ambientColor = 0xFF0000;
colorMaterial.ambient = 0.6;

In the older version of Away3D 4.0, this would cause the material to tint to red a little bit. Is this still possible? This method does not work anymore.

 Signature 

http://www-scf.usc.edu/~shopkins

   

Avatar
kurono, Sr. Member
Posted: 27 February 2012 03:57 AM   Total Posts: 103   [ # 1 ]

The same problem for me…

   

Karim Beyrouti, Administrator
Posted: 27 February 2012 12:06 PM   Total Posts: 30   [ # 2 ]

Me too - For now I have had results tweaking the light.ambient property as opposed to the material.ambient….

   

Karim Beyrouti, Administrator
Posted: 28 February 2012 10:46 AM   Total Posts: 30   [ # 3 ]

That answers this question:

Ambient lighting

There have been some changes in how ambient lighting works. Before, the ambient and ambientColor of the materials dictated how much ambient light is coming from the lights, rather than how much ambient light is actually reflected by the material. That has been changed, and lights now have ambient and ambientColor properties as well. As a result, ambient light now functions similar to diffuse and specular light. The lights emit it, the material reflects it. It’s usually best to only set ambient light properties on DirectionalLight objects, since ambient light is global. PointLight objects can get culled if they’re not affecting anything in the frustum and their ambient contribution would be dropped as a result.

Lifted copy from here:
http://www.derschmale.com/2011/12/27/the-away3d-dev-branch/

   

Stephen Hopkins, Sr. Member
Posted: 28 February 2012 08:47 PM   Total Posts: 110   [ # 4 ]

I see, thanks

I set the ambient of my directionalLight to 1.0 and now everything works as before.

 Signature 

http://www-scf.usc.edu/~shopkins

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X