Page 1 of 1

Tiled terrain

Posted: Sun Apr 07, 2013 11:04 am
by eejin
Hi,
I've been trying to create a tiled terrain by which I mean something like this:
Image
Now as you see there are multiple textures on a terrain and they all blend nicely.
Textures are assigned to tile and then are blended with nearby tiles.

Now I'm trying to recreate this using Irrlicht.
What would be the best way to do this?

Thanks in advance.

Re: Tiled terrain

Posted: Sun Apr 07, 2013 4:58 pm
by MrGuy
Multilayer splatting for example.

Re: Tiled terrain

Posted: Sun Apr 07, 2013 7:39 pm
by hendu
The pic you posted is pretty clearly artist-made 2d art combinations, no algorithm.

They have drawn each combination for each place.

Re: Tiled terrain

Posted: Mon Apr 08, 2013 11:18 am
by gerdb
hi,

there are many approaches,

the modern ways are with multitexturing ( one layer for dirt, one layer for grass with an alpha component saying where grass is fully visible or not, or in between ) and shaders,
the old way ( which uses only one texture stage ) creates a texture atlas with all combinations of border tiles from 2 or more textures.

Re: Tiled terrain

Posted: Mon Apr 08, 2013 4:07 pm
by eejin
Can the multitexturing way support more than 4 types of terrain. I need more than grass, dirt and some others.
Won't this method also create very large filesizes because you need a full scale alpha map for every layer?

Re: Tiled terrain

Posted: Mon Apr 08, 2013 4:25 pm
by hendu
Yep, use an atlas. Then you can have 2^32 tiles.

Re: Tiled terrain

Posted: Mon Apr 08, 2013 4:27 pm
by CuteAlien
One layer per tile. You probably won't need more than 4. The point is just that you don't create combinations for each border, but instead you can can for each terrain-type just have border-tiles (which are independent of the terrain-type with which they combine). You still need for each tile several variations. And then you draw them in a certain order (dirt first and then gras on top for example).

Re: Tiled terrain

Posted: Mon Apr 08, 2013 4:52 pm
by MrGuy
If you have textures that cant ever mix like grass and stone you can pack those in the same layer with different colors so the shader can decide which texture to use. That way you reduce the amount of layers needed.
But with half way modern hardware thats not needed. I have the crappiest hardware ever (well no. But a laptop with an ATI Graphics 3100 ... Not even ATI wants to know that thing. There are no drivers, no nothing. They act like "Wut? Thats not of us. We would never produce such poop!" )and splatting is no problem... :)