Jump to content
  • Advertisement
Sign in to follow this  
GiantPaul

DirectX, and shadows

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

Howcome alot of games don't use .x files but use DirectX. Are there books for DirectX 9.0 that come with a cd and a working and nice looking 3d level with great lighting and shadows. Never figured out how to do shadows thus posting in the beginner's section about how to do shadows for characters walking around a level. Read some tutorials about shadows but they did not help at all.

Share this post


Link to post
Share on other sites
Advertisement
Did you actually try to implement the shadows as per the tutorials you've read?

It is actually very easy to implement basic shadow mapping; first, I recommend that you just project a black blob texture to your scene by using a matrix representing the view from the lamp, then improve it by replacing the black blob with black image of your shadow caster.

The final, most difficult phase is to project the depth values from your lamp to the scene and compare the depths to determine the correct shadow extents. However, very basic shadowing (no self-shadows, potential shadow between lamp and shadow caster) can be implemented without this step.

Share this post


Link to post
Share on other sites
Games don't use .X files because they usually come up with a custom format that's suited to the engine their using. .X files are pretty generic and only support a limited feature set: for example, it would be difficult or impossible to integrate say physics information into the stored model.

As for shadows...these days shadow maps are pretty much the de-facto solution. There's a sample in the SDK that can get you started.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!