Use raytracing renderer in Prefab . It works fine . :)

Sent from my iPhone

On Sep 29, 2010, at 12:24 PM, Jose <[email protected]> wrote:

> 
> Hi, i'm testing the posibilities of Prebaking but I can't work with
> shadows.
> I have two Spheres with BitmapMaterial.
> 
> sph1 = new Sphere ();
> sph1 .radius = _SPEHERERADIUS_;
> sph1 .z = -900;
> sph1 .bothsides = true;
> container.addChild(sph1);
> 
> sph2 = new Sphere ();
> sph2 .radius = _SPEHERERADIUS_;
> sph2 .x = -200;
> sph2 .bothsides = true;
> container.addChild(sph2);
> 
> [..]
> 
> _bitmapMaterial = new
> BitmapMaterial(Cast.bitmap(e.target.content.bitmapData));
> sph1.material = sph2.material = _bitmapMaterial;
> 
> 
> I have a PointLight3D too:
> 
> light = new PointLight3D ();
> 
> light.color = 0x989898;
> light.brightness = 0.6;
> light.specular = 0.6;
> light.ambient = 0.6;
> light.radius = 3000;
> light.fallOff = 2000;
> 
> light.z = -1500;
> 
> scene.addLight(light);
> 
> And:
> 
> var LPB:LightPrebaker = new LightPrebaker(container, [ light ], 0.6,
> true);
> LPB.addOnTraceComplete(traceComplete);
> LPB.apply();
> 
> If I use fast rendering everything works fine. When I use shadows, I
> can only see the spheres with scena ambient.
> What am I doing wrong?. Thanks.

Reply via email to