Problem with light in Obj materials

Software: Away3D 4.x

sasiad, Newbie
Posted: 09 January 2015 12:13 PM   Total Posts: 1

I have problem with light adding to my .obj materials
.obj materials have his own color in .mlt
I don’t want to create a new color material
I want add lightPicker and shadowMethod to my m.material
Is it possible?

Here is my code
myMesh = e.asset as Mesh;
 
  for each (var m:SubMesh in myMesh.subMeshes){
    trace(m.material.name)
    var t:TextureMaterial = m.material as TextureMaterial;
    t.lightPicker = staticLightPicker;
    }

a trace
k909090~C1_Atom
k909090~C2_Atom
k909090~C3_Atom
k909090~C4_Atom
k909090~C5_Atom
kffffff~H6_Atom
kffffff~H7_Atom
k909090~C8_Atom

   

Avatar
Fabrice Closier, Administrator
Posted: 10 January 2015 04:22 PM   Total Posts: 1265   [ # 1 ]

Sound correct to me. You must ensure that there are lights added to the picker and that they have influence. For instance if a pointLight is used and surface is further than the lightposition minus falloff. or that a directionallight actually points at the right direction and that both type have diffuse settings that are correct.
You could reproduce within Prefab or I guess with AwayBuilder, to check if your code is correct. If correct, then there is a potential bug going on.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X