What happened to the .lights property?

Software: Away3D 4.x

fig8, Newbie
Posted: 28 February 2012 01:28 AM   Total Posts: 10

I just switched to the latest beta and suddenly I wasn’t able to assign lights to my materials any more. The property just vanished from the MaterialBase. I’m pretty sure that’s on purpose because of the texturing renders. However, how do I solve something like this (which worked in 4.x already, it’s just some days older):

var map BitmapMaterial mesh.material as BitmapMaterial;
    
map.shadowMethod = new SoftShadowMapMethod(_light);
    
map.lights [_light];
... 

Just any hint to some related docs would help as well. I just kinda missed a post or article about this change.

Thanks in advance!

   

fig8, Newbie
Posted: 28 February 2012 01:36 AM   Total Posts: 10   [ # 1 ]

Okay, I’ve gotta enhance my question a bit. I finally found:

material.lightPicker = new StaticLightPicker([light]);
material.diffuseLightSources LightSources.LIGHTS

Which now leads me to (follow by an #1009 error):

Use texture composition instead of inheritance


david, you really made it hard for us smile
any help? btw. it’s a loaded 3DS file and i’m iterating through it’s meshes.

   

fig8, Newbie
Posted: 28 February 2012 01:41 AM   Total Posts: 10   [ # 2 ]

alright, forget about all of it smile i found david’s post (geez, how was i able to miss it even while searching for it?). everything’s running as before now, cheers. i’ll let this topic undeleted if anybody may once google for the same issue. => basically.. just use texturematerials instead of bitmapmaterials.

> http://www.derschmale.com/2011/12/27/the-away3d-dev-branch/

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X