Jump to content
  • Advertisement

Archived

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

fil_gamedev

2d/3d sorting

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

I''m looking for a method to arrange a scene of 3d and 2d objects represented by bounding cubes, for rendering. In other words I want to feed in a raw list of these objects and get back an ordered one based up on the cameras view. The problem I run into is similar to the painters algorithm for polygons, where there are several instances of ambiguity. Is there a way to determine if one object is in front of the other? Furthermore, does anyone know what is the right way of mixing 3d and 2d? sort of like FF or other adventure games? but with out specifying layers. Thanx.

Share this post


Link to post
Share on other sites
Advertisement
You could use a Z-Buffer. This will solve all of your problems for 3D and 2D.

The sprites Z value would be the same across the sprite.

I would explain Z-Buffers, but many others have done a better job at that than I ever could. Check out Articles & Resources here on GameDev, or google for it.

Cheers,
Will

Share this post


Link to post
Share on other sites

  • 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!