![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Programming tutorials All Knowledge Info and links to posted here |
![]() |
|
Isometrics Graphics - Engine Layers Position , how to work out layers, which objects
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
with how objects are layered. Eg. which 2d pictures (that look 3d from the way they're drawn because of the isometrics) should be drawn infront of which other 2d pictures depending on there position, to give the illusion of 3d-ness. I've got a good sorting algorith that will sort an Array List according to a certain value, this can be wasily edited and stuff. I'm not sure how to do this, atfirst and naively i thought that it would be correct just to order the list from which all the images were drawn by a sorting the objects in the draw list according to there Y coordinate position on screen, but when i got longer objects, the layering wasn't working properly, so i'm not sure how to do it, so any advice would be very nice |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Fixed Error!
Posts: 4,202
Join Date: Mar 2007
Rep Power: 6
IM:
|
In isometric projection, assuming the camera pointing to the orign, the camera could be in one of the 8 octants: front-left-up, back-right-up, etc. So the order should be defined accordly. If you have already each object drawn in a isometric projection, I am assuming that we see the following three faces: top, front and right. If different of that, just change the faces to adjust them to the general sorting: objects (or their drawings) are renderd from left to right, from lower to upper, from back to front, such that the last object is the rightmost, upmost and frontmost. Another way of describing the same is to draw from -x to +x, from -y to +y, from -z to +z. Anyway, you can't determine the order by the screen position, but 3D space position. So you will ever redraw each moving object and, sometimes, some static objects that are more at right, up or front than the moved ones. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|