Using 3D boxes for isometric view
Hi guys,
I've been developing an isometric engine for about 3 weeks now and I'm really getting mad. It's a 2D engine with software z-ordering -- I guess you know what that mean: Restrictions, restrictions, hacks, cheats, and restrictions. :(
Then I found a thread by O-san (http://www.gamedev.net/community/forums/topic.asp?topic_id=447054&whichpage=1) showing his isometric engine using real 3D boxes with texture coordinates mapped to the camera -- awesome! I like his approach and definitely want to switch mine.
So how does that work in detail? Do you
- create cubes and then rotate the view?
- create already rotated cubes (by using appropriate vertex coordinates) and just rotate the camera 60° down the x-axis?
My first attempt was the second one. This way it's easy to get the right box size, but I still have the typical isometric coordinates which I actually wanted to get rid of (means: x, y get translated to x - y, x + y).
Another question that came into my mind is: How do I correctly calculate the needed size of a cube? If, for example, a sprite is 64 * 64 pixels (where the grid size of my maps is 64 * 32 pixels), how do I calculate the proper cube dimensions?
Would be nice to get some hints. I've searched the whole forums back to 2004 but couldn't find something that answers my questions. ;)
If it were me I think I'd go with creating the cubes and rotating the view.
I'm not sure what your using, or how you're doing your non-map sprites but with this approach to the map, you could then use simple billboards for sprites.
This way you have your map built out on a sort of X,Y field and can place your billboards as such, only worrying about two map coodinates (3 if you have height) in a simple 1 to 1.
Using this approach the cube's floor face would mirror the texture size (note that I would think using 3d this way would make using the 2d diamond shape tiles I assume (based on the dimensions) you have complicated).
I would think that would simplify the math needed a bit, and all you'd have to do is swing the camera around and: tada, traditional Iso view.
Hope that helps and isn't too confusing. I often have a tough time explaining such concepts.
I'm not sure what your using, or how you're doing your non-map sprites but with this approach to the map, you could then use simple billboards for sprites.
This way you have your map built out on a sort of X,Y field and can place your billboards as such, only worrying about two map coodinates (3 if you have height) in a simple 1 to 1.
Using this approach the cube's floor face would mirror the texture size (note that I would think using 3d this way would make using the 2d diamond shape tiles I assume (based on the dimensions) you have complicated).
I would think that would simplify the math needed a bit, and all you'd have to do is swing the camera around and: tada, traditional Iso view.
Hope that helps and isn't too confusing. I often have a tough time explaining such concepts.
At first, thanks for your reply!
That's exactly the case -- up to now. Thank god I haven't drawn hundreds of assets, yet. ;) So you're right, the images contain diamond shaped graphics.
Wasn't confusing, but helpful. The only problem I see is what you mentioned above, namely box sizes to match the texture. If it's possible (and more or less easy to handle) I'd keep the diamond shaped tiles. Otherwise it'll be hard to paint walls, for example. I would have to use real 3D geometry for them.
Maybe it's more helpful for the reader to see what's in my mind:
It's a screenshot of my current engine with software z-ordering and I'd like to keep the graphics -- or at least the geometry of them.
Quote:Using this approach the cube's floor face would mirror the texture size (note that I would think using 3d this way would make using the 2d diamond shape tiles I assume (based on the dimensions) you have complicated).
That's exactly the case -- up to now. Thank god I haven't drawn hundreds of assets, yet. ;) So you're right, the images contain diamond shaped graphics.
Quote:Hope that helps and isn't too confusing. I often have a tough time explaining such concepts.
Wasn't confusing, but helpful. The only problem I see is what you mentioned above, namely box sizes to match the texture. If it's possible (and more or less easy to handle) I'd keep the diamond shaped tiles. Otherwise it'll be hard to paint walls, for example. I would have to use real 3D geometry for them.
Maybe it's more helpful for the reader to see what's in my mind:
It's a screenshot of my current engine with software z-ordering and I'd like to keep the graphics -- or at least the geometry of them.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement