Isometric tile based multi-level depth sorting

Started by
2 comments, last by sormjs 16 years, 3 months ago
I have created a simple isometric game engine. I am encountering some rendering issues with objects transitioning between tiles that are taller than one unit. I've looked at several forums and articles about isometric depth sorting, but didn't find anything that worked. The basic algorithm involves rendering from back to front and bottom up (back to front on a per level basis, since I have multiple heights). The obvious problem is that the object that is higher than one unit is cut off by other objects at the higher level. To resolve this issue, I modified the algorithm to draw by level up until an object that is higher than one unit and then draw the level(s) above until all the objects "behind" the higher object is drawn. After this, I go back to the unfinished lower level and finish it, then continue as before drawing by level. This does cause some other issues, however. It is not clear which objects are "behind" the taller object when it is transitioning between tiles. Does anyone have any ideas or suggestions? Thanks in advance.
Advertisement
Your first algorithm is probably more accurate. You may have to consider reducing the height of the higher objects, increasing the viewing angle, or making the elevated objects translucent, however.

I'm no expert, though.
Signature go here.
Quote:Original post by sormjsThe basic algorithm involves rendering from back to front and bottom up (back to front on a per level basis, since I have multiple heights).


Hi!

I'm not sure if I'm visualizing your problem correctly or interpreting what you meant by "back to front per level". Are you rendering all of one level of all visible tiles, then going back and rendering the next level? It seems to me that you should be rendering all levels of a given tile, in a single back to front sweep. I'm picturing a tree in front of a rock on a flat grassy plain. The tree graphic will overlap the rock if they occupy the same pixels, no matter what height the two are drawn at.

Happy New Year. :)
--------------------------~The Feature Creep of the Family~
Hi Tok,

Thanks for your feedback.

You are right for static objects, but I'm doing an application were the objects can move in between tiles. That's why I'm using a "per level" algorithm.

So think a character moving on a tile base grid. If we are using only a back to front algorithm, the character will be moving in between rendering "plane" and the, is feet will be render before the floor that is in a lower plane or if he's walking on a set of objects, before theses objects. Se we'll loose his feet every time is walking.

That's why I'm using a per-level system.

But I progressed on my problem. By working on the algorithm, I achieved to solve almost all my rendering issues. My only remaining problems are with ramps, when my object is moving "in-between" levels... I'm still working on this!

Js

This topic is closed to new replies.

Advertisement