hi all , another noob question ....
is there a way to add light(s) to a texture material? (bitmap material dont work anymore , an i haven’t understand the light picker mechanics ..yet)
thanks!
Texture MaterialSoftware: Away3D 4.x |
||
bardo, Member
Posted: 01 March 2012 12:01 PM Total Posts: 79 hi all , another noob question .... is there a way to add light(s) to a texture material? (bitmap material dont work anymore , an i haven’t understand the light picker mechanics ..yet) thanks! |
||
Torham, Newbie
Posted: 01 March 2012 01:56 PM Total Posts: 2 [ # 1 ] I had the same problem and I have found the answer from Advanced_TerrainDemo example file. Here:
import away3d.lights.DirectionalLight; Worked for me, hope that helps. |
||
bardo, Member
Posted: 01 March 2012 01:56 PM Total Posts: 79 [ # 2 ] k , iset up a directional lighter and lightpicker , but it seems to not work : https://www.socialnetworkserver.it/wrball/ -> example
directionalLight = new DirectionalLight(); it seems no plane is affected by lights! |
||
|
||
|
||
Mr Margaret Scratcher, Sr. Member
Posted: 02 March 2012 02:59 AM Total Posts: 344 [ # 5 ] The above does not work for me:
caseMaterials = new TextureMaterial(new BitmapTexture(caseBMD)) gives me the error:
|
||
Torham, Newbie
Posted: 02 March 2012 07:42 AM Total Posts: 2 [ # 6 ] @bardo : Yes, my plane is definitely affected by the light, because I can see the difference when I do not set the lightPicker property. @Margeret : the correct line should be “caseMaterials.lightPicker = lightPicker;” where the property name is “lightPicker” with capital “P”. |
||
|
||
|
||
Mr Margaret Scratcher, Sr. Member
Posted: 06 March 2012 08:06 PM Total Posts: 344 [ # 9 ] @Torham… DOH! Thanks! |