Iso Tile transitions
Hi all,
The subject says it all!
I guess there are 2 ways to do transitions:
1. Draw each and every combination possible, eg. grass->sand, sand->water. One can use a rule whereby grass and water never touch, but there's always sand between them. That saves lots of transitions.
This solution requires only one layer for the terrain as all transitions would have been pre-drawn.
2. Draw transition masks, eg. grass masks where a part of the tile is grass whilst the other part would be a mask and transparent.
This solution requires at least 2 layers. The bottom layer will consist of lowest terrain types such as water and sand. The top layer will be the grass masks.
Furthermore, if we have a simple map such as:
ggggg
gsssg
gswsg
gsssg
ggggg
where g = grass, s = sand, w = water. Without using tile transitions, the whole thing would look 'blocky'. Once transition tiles are applied, how will these transitions be saved? With the map and calculated everytime on-the-fly during rendering?
What is the best technique to use? Any other techniques that are available?
Regards,
cryo
[Edited by - cryo75 on August 19, 2008 9:09:08 AM]
you could use texture blending and instead of defining each tile as grass, sand, or water, you define it as having two textures and an alpha map. It really depends how you want to do it. If you want to be able to draw the exact parts that are grass and which are sand (and the varying "shades" in between) then this would be the way to go.
Otherwise, I'd just create a few tiles as intermediaries for the various tile types. So long as you don't make too many of your tiles able to "blend" into each other, then you won't have to make too many extra tiles.
Otherwise, I'd just create a few tiles as intermediaries for the various tile types. So long as you don't make too many of your tiles able to "blend" into each other, then you won't have to make too many extra tiles.
These might help :
Tile/Map-Based Game Techniques: Handling Terrain Transitions
Texture Splatting in Direct3D
Tile/Map-Based Game Techniques: Handling Terrain Transitions
Texture Splatting in Direct3D
I'm using c# and xna.
I know about the first article. What it doesn't explain is that algorithm that is used to draw the transition tiles.
I know about the first article. What it doesn't explain is that algorithm that is used to draw the transition tiles.
Yes it does; for each terrain type, a set of transition tiles are hand-drawn. These transitions are transparent over much of their area, so they can be drawn overtop any other terrain.
If you are doing 3D terrain, that style of transitions is overkill for you.
If you are doing 3D terrain, that style of transitions is overkill for you.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement