Jump to content
  • Advertisement
Sign in to follow this  
Ademan555

Shadows and Alpha

This topic is 5407 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

Well... i was playing doom III the other day and i noticed that one shadow cast by a grate with alpha, showed the grate's details... Which, obviously shouldnt be, or at least not if geometry is what casts shadows... and yet there it was... i was pretty sure it wasnt a projected texture because it seemed to ahve hard edges... but im not sure what to make of it... How would they do this? I guess... it kinda hasta be a projected texture huh? Or is there some technique out there that i dont know about?... thanks -Dan

Share this post


Link to post
Share on other sites
Advertisement
While there is math involved here, I feel this post belongs in one of the graphics API forums. Since Doom III uses OpenGL, I'm moving it to the OpenGL forum. I'm sure someone there will have a comment!

Share this post


Link to post
Share on other sites
im really not sure what you mean by 'showed the grate's details'

If you mean you have a single polygon for example, with an alpha blended texture that *looks* like a grate, but actually shows the grate 'mesh' as a shadow (which wouldn't make sense because the only actual geometry is a single quad for example), then I would say a projected texture. However, I thought all shadow rendering was done with volumes? It's quite possible that a copy of geometry is kept for stenciling shadows, while for actually rendering the geometry it's shader just tells it to render the alpha blended quad. that's the kind of trick I would expect id software to do for a speed increase.

EDIT: I also realized I'm not entirely sure what a projected texture is anyway.

Share this post


Link to post
Share on other sites
All shadows in Doom3 are shadow volumes, which only work on solid (usually closed) surfaces and meshes. The grates are a trick, its actually not used in the shadow volume generation ('cos with its alpha testing it wouldn't work right) yet the level designer has tagged a projected texture with the appearence of a fuzzy grate onto the light source. This gives the appearence that the fuzzy grate's shadow is being generated at run time rather than being precalculated.

Its used several times, particularly good is the use of an animated, projected texture for the fuzzy shadows of the revolving fans.

Purists will probably call that a hack, but its a damn good looking one. I'd wager that the level editor has a way of flagging faces so that they don't cast shadows (the grate), or maybe this happens automatically for alpha-tested geometry.

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!