Jump to content
  • Advertisement
Sign in to follow this  
sriniatig

shadow implementation

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
what about stencil buffers, do they have them?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!