Archived

This topic is now archived and is closed to further replies.

FogGobbler

Jim´s RPG Book. Shadow question

Recommended Posts

Hi! I´m trying things out with Jim´s RPG Book and have a question concerning the 3D in 2D example. Is it possible to draw a shadow of the 3D monster-character onto the 2D bitmap-background? Thanks for your help, Michael

Share this post


Link to post
Share on other sites
D3DXMatrixShadow will flatten the geometry into a plane, perfect for building shadows. Check up on it in the SDK-docs to see if that''s what you want.


--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites
Since geometry is still being used to fill in the Z-Buffer, you can also project the geometry out and use the stencil buffer. That way, your shadows will also fall properly on the geometry.

The DirectX SDK has a wonderful stencil buffer example, but just as a warning: stencil buffers won''t work on all cards, so be sure to check the caps bits on your cards before trying to use stencil buffers.

RomSteady - Able to leap off tall buildings in a single bound

Share this post


Link to post
Share on other sites