shadow implementation

Started by
8 comments, last by sriniatig 18 years, 4 months ago
Hi I'm currently learning how to create fast and practical shadows for low end devices like mobile phones. These target devices have enough power to render shadows on a very practical scale. I want to know from you guys on what would be the most suitable shadowing method on such a constraint platform. Also I would like to have realtime shadows of objects. Plz advice.
Advertisement
Don't know what is avalible on a mobile phone but I'd go for one or more of the following

a) Fake shadows, fake it with a dark fuzzy blob on the ground
b) Planer shadows
c) Bake the shadows into the textures for the static objects

GOCP
Proper realtime shadow implementation is possible on mobile phones. So the blob shadow is not required. These phones also support hardware acceleration and support OpenGL ES. These phones have an ARM 9 processor but they support only fixed point operations. Will have a look at the planar shadow implementation. Do you think it is fast?
what about stencil buffers, do they have them?
Without a fast hardware stencil buffer, you're going to run into huge bandwidth/fill rate issues with shadow volumes. You might be able to get away with a low-resolution shadow map though, which should do quite nicely if the final output is relatively low resolution as well. I don't know enough about the capabilities of the specific processor though to give you a better recommendation.
Interesting, I m implementing exactly what you have in mind on Opengl ES 1.0

Some advice:

Can't use the stencil method; no way to read from the stencil buffer on Opengl ES 1.0

If you use the projective shadow mapping method, you have to write your texture to the screen buffer because again, can't read from the stencil buffer, as recommended by the algorithm.

Can't help you further because I m not done
I also plan to use projective shadows....I've started with the base code....do i need to consider any other option....
I also plan to use projective shadows....I've started with the base code....do i need to consider any other option....

I think planar shadows is by far the fastest method but as it's name suggests its limited to projecting onto planar surfaces. So if you only need shadows on a flat ground then I would definately go with this. I'm pritty sure the method requires you to render the object once in the scene, then once again with a dark flat color using a specialy created "goofy" matrix that flattens your model onto some plane. Sounds pritty fast to me since all you have to do is push a matrix, change a couple lighting states, then draw.
yes, even I agree planar shadows will be the fastest. but it will only work on flat surfaces. Projection shadows can be applied to any type of surface.

This topic is closed to new replies.

Advertisement