Prebaking

2 views
Skip to first unread message

Jose

unread,
Sep 29, 2010, 6:24:51 AM9/29/10
to Away3D.dev

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.

Michael Iv

unread,
Sep 29, 2010, 7:00:09 AM9/29/10
to away3...@googlegroups.com
Use raytracing renderer in Prefab . It works fine . :)

Sent from my iPhone

Jose

unread,
Sep 29, 2010, 9:07:19 AM9/29/10
to Away3D.dev
Hi Michael,

I want to move some objects to make diferents scenes and later render
it to get a final image closer to reality. It is not a predefined
scene, it can change.

Is it possible? Thanks.


On 29 sep, 13:00, Michael Iv <explomas...@gmail.com> wrote:
> Use raytracing renderer in Prefab . It works fine . :)
>
> Sent from my iPhone
>

Michael Iv

unread,
Sep 29, 2010, 12:49:39 PM9/29/10
to away3...@googlegroups.com
Do you mean baking in real time? I have not done this in Away . I usually bake with Prefab or 3dsMax .Are you sure LightPrrbaker doesn't work? Sometimes the problem is your light source which doesn't overlap all the objects which should cast shadows .

Sent from my iPhone

Jose

unread,
Oct 4, 2010, 4:55:54 AM10/4/10
to Away3D.dev
Yes, I need to do in runtime mode. No matter if is 3 minutes.
I need to mount a stage and then render to get the best result.

Thanks.

On 29 sep, 18:49, Michael Iv <explomas...@gmail.com> wrote:
> Do you mean baking in real time? I have not done this in Away . I usually bake with Prefab or 3dsMax .Are you sure LightPrrbaker doesn't work? Sometimes the problem is your light source which doesn't overlap all the objects which should cast shadows .
>
> Sent from my iPhone
>
Reply all
Reply to author
Forward
0 new messages