Generate depth map for sprite?

Started by
1 comment, last by saturn1 12 years, 3 months ago
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.
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.
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.

This topic is closed to new replies.

Advertisement