Dynamic square shadow simulation

Software: Away3D 4.x

Dmitriy Yukhanov, Newbie
Posted: 17 July 2012 04:10 PM   Total Posts: 2

Hey, guys.

Could you suggest a best way of the cube’s dynamic shadow simulation?

First and most direct way is to use DirectionalLight, but it too costly for me 0 I’m working on mobile project and wish it to run on devices like iPad1.

When I thought about TextureProjector, but looks like it currently doesn’t work (I filled an issue on GitHub).

I have cubes grid with small padding and one cube above all that cubes. Some cubes from grid can move along the Y axes (up\down). Cube above the grid could move along the X and Z axes (left\right\front\back), along the grid itself.

So I wonder how can I simulate the shadow dropped by the moving cube to the cubes grid.

Moving cube doesn’t rotates, so the shadow will be the square all the time.

I’d glad to know how can I simulate the square shadow most efficiently.
Thanks!

   

Richard Olsson, Administrator
Posted: 18 July 2012 04:01 PM   Total Posts: 1192   [ # 1 ]

The texture projector would probably be the best way, unless you can use a single plane with a semi-transparent shadow on it, but that is of course only possible if you have a flat, continuous surface onto which the texture would be cast.

The texture projector issue is being looked at, and is tracked here:
https://github.com/away3d/away3d-core-fp11/issues/351

It’s unknown at this point whether this is a bug or a user error.

   

Dmitriy Yukhanov, Newbie
Posted: 18 July 2012 04:29 PM   Total Posts: 2   [ # 2 ]

Thanks for your reply, Richard!
So, looks like the TextureProjection is an only option for me since I have no continuous surface - I have padding between surface’s tiles (cubes).

And I guess it’s my error regarding to the Issue on the GitHub - I just not understand atm how to use TextureProjector properly - I posted usage example and things confusing me there.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X