NormalMap for ColorMaterial

Software: Away3D 4.x

RIPI, Jr. Member
Posted: 08 December 2011 08:14 PM   Total Posts: 33

Hey Guys!

I’m trying to add a simple normalmap to a colormaterial, but didn’t succeed… because i don’t want to die trying i just like to ask politely… is it possible?

i tried different thinks, but if i set a normalmap to a colormaterial, the mesh just disappears…

here’s some code:

_colorizableMaterial = new ColorMaterial(_modelColor);
_colorizableMaterial.normalMap AbstractAway3DContainer.NORMAL().bitmapData;
_colorizableMaterial.ambientColor _modelColor;
_colorizableMaterial.specular=.8;
_colorizableMaterial.gloss=10;
_colorizableMaterial.lights [_light1_light2]

later, i’m setting the material like this:

for (var int 0_modelLoader.numChildren; ++i{
    mesh 
Mesh(_modelLoader.getChildAt(i));

    switch (
i{
     
case :
      
mesh.material _textilMaterial;
      break;
     case 
:
      
mesh.material _colorizableMaterial;
      break;
     case 
3:
      
mesh.material _textilMaterialDark;
      break;
     case 
4:
      
mesh.material _textilMaterialDark;
      break;
     case 
7:
      
mesh.material _textilMaterialDark;
      break;
     default :
      
mesh.material _whiteMaterial;
      break;
    
}
   } 

 

 

   

RIPI, Jr. Member
Posted: 15 December 2011 04:37 PM   Total Posts: 33   [ # 1 ]

*push* has anyone an idea? is it even possible to attach normalMaps to a ColorMaterial?

Greetings!

   

John Brookes, Moderator
Posted: 15 December 2011 06:21 PM   Total Posts: 732   [ # 2 ]

normal map does work with colormaterial.

Maybe its whatever “AbstractAway3DContainer.NORMAL().bitmapData;” is/does

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X