2.5D compute depth

Started by
3 comments, last by Wyrframe 12 years, 5 months ago
Hello, i develop a game in 2.5D.
For the depth computation i use a math algorithm with plane and raycast. But this algorithm use lot of processor when there is lot of entities...


So i wonder if it's not possible using billboarding to draw my sprite and benefit of 3D depth?

My question is how to reprensent a sprite in vertices, (usually for billboarding it's 6 vertices) i need more vertices to represent depth.

I am a beginner in 3D rendering technique, so tell me if it's possible?
And if it's possible some tips to get it.


Thank you.
Advertisement
It's possible, but that depends what you want to do. If you mean placing your billboards in 3D space and using the z-buffer to sort it out, yes, it can work.

Also, you only need 4 vertices for your billboard. One at each corner on a plane. You then map the UV coordinates at the correct coordinates on your texture containing the sprite.
Developer for Novus Dawn : a [s]Flash[/s] Unity Isometric Tactical RPG - Forums - Facebook - DevLog
But it's not possible to add a Depth for sprite for exemple my sprite is 100Width100Height and add 100Depth on z axes?

Because billboarding with 4 vertices won't give depth to my sprite.

Thank you.
I heard about depth sprites, but I don't know the specifics.
Developer for Novus Dawn : a [s]Flash[/s] Unity Isometric Tactical RPG - Forums - Facebook - DevLog
If I'm understanding "depth sprites" correctly, it's basically just a voxel height layer to the sprite, where you do per-pixel depth reads and writes, instead of interpolating depth across the triangle/quad face.

I've usually only seen it used to give proper volumetric effects to particle effects like dust clouds and smoke, where you use the depth from the sprite "front" to the nearest opaque geometry as an extra parameter in the alpha component. However, if what saturn1 is trying to do is get a plain sprite to still have a 3D appearance in combination with depth-supporting monitors, the voxel technique is sufficient to trick the 3D card into the correct use of the depth buffer.

saturn1; what "depth computation" are you doing that takes up CPU time, and what "benefit of 3D depth" are you hoping to get?
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement