Hi all,

I made a little demo using "PhongPBMaterial". I have a simple cube
that has a diffuse texture and a normal map texture. I made a
PointLight3D light orbiting around this cube.

The weird thing is that when the light goes behind the cube, the
entire cube gets no light at all (the cube becomes pitch black and
therefore disappears)

The code to instanciate my cube and the material is the following :

var normalMap = new _Texture_bois_nmp().bitmapData;
var diffuseMap = new _Texture_bois().bitmapData;
_phongShaderMaterial = new
PhongPBMaterial( diffuseMap,normalMap,_Cube,null,{specular: 0.5,gloss:
20,smooth : true});

_Cube = new Cube();
_Cube.width = 150;
_Cube.height = 80;
_Cube.depth = 80;
_Cube.material = _phongShaderMaterial;
_View.scene.addChild(_Cube);

The declaration of the light is done like this :

_pointLight = new PointLight3D({color: 0xffeedd});
_View.scene.addChild(_pointLight);
_pointLight.brightness = 0.8;
_pointLight.specular = 0.5;
_pointLight.radius = 56000;
_pointLight.fallOff = 60000;
_pointLight.x=-150;
_pointLight.z = -200;

 Am I missing a parameter somewhere that I should set? Like :
"cube.getsLightWhenLightIsBehind=true" :) ?

Sylvain

Reply via email to