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 i : int = 0; i < _modelLoader.numChildren; ++i) {
mesh = Mesh(_modelLoader.getChildAt(i));
switch (i) {
case 1 :
mesh.material = _textilMaterial;
break;
case 2 :
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;
}
}