Jump to content
  • Advertisement
Sign in to follow this  
saturn1

Generate depth map for sprite?

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

Hello, im doing a game in 2.5D.
For depth sorting i want to use depth map with a shader.

I would like to know if there is some tools/technique, to generate a depth map from sprite?

Thank you.

Share this post


Link to post
Share on other sites
Advertisement
If you create your sprites by modeling the characters in 3D then rendering the image frames, then most 3D packages will support rendering out depth information as well. For instance, in blender you can use compositing nodes to obtain the depth buffer and save it out as a separate image.

If the sprites are hand-drawn, then there really is no easy way to do it. You'll have to try to draw it in by hand, or you could try to model a rough 3D geometry that corresponds to the sprite, then render a depth map from that.

Share this post


Link to post
Share on other sites
Thank you JTippetts.

Now, i have some problem with my depth map.

Here is my depth map cube:

719537Cube25Dzdef.png

Front-back placement it's ok.


333387frontbackok.png



Left right it's ko.
935377leftrightko.png


I think it's my depth map cube which is not good.

Have you an idea how i should paint my depth map to resolve left, right cofiguration?

Thank you.

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!