maandag 25 augustus 2014

New terrain system!

Hi folks!

Today we have some new info for you about our in-house terrain system.

This blog post will be about the blending of different textures between parts of each terrain tile and between each tile itself.



Our terrain is derived from a heightmap sculpt which then is converted into a mesh.
This mesh gets further sculpted inside Mudbox and then the final import is done to 3ds max.

From here on we create the roads and the rivers and other waterbodies.

Because the terrain consists of horse track trails and cliffsides it was impossible to use standard tiling textures.

We decided we would make the cliffs stand out and give them dedicated textures that wouldn't be distorted by uv-unwrapping like the standard heightmap terrain has.

This generates a problem.

Because the cliffsides polygons of certain terrain tiles are using non-tiling textures we need to correctly uv-map them on to it.

This creates a seam between the polygons from cliff and the polygons from the terrain.

To fix this problem we tried a few approaches:

1.
The use of "decal/duplicate polygons" , this means the terrain tile is one mesh and the trails and cliffs are created inside the terrain tile.
Where the 100% trail transitions into the terrain 100% polygons we create overlapping faces or decals.
In this way we can use vertex colors painted on these polygons whereas blue channel would be 100% trail tex and the red channel was then used for transparency to blend between the terrain.
This method "worked" but it came with certain flaws, the overlapping polygons would be darken out because of the destination colors of the terrain.



2.
The use of "MegaTextures"
This has a short answer , MegaTextures are nice but they are big memory eaters , not very handy to paint a mistake and certain tools are unavailable to us.
But it could also help in certain ways that we only have one mesh which means one object and the shader would only need to render the megatexture onto the tile which means only one draw call.

3.
The use of "Multi-uv's"

This is our final and currently working method.
Because of multiple uv's we could create it for the cliff/road and tiling terrain.
We still use vertex colors to specify texture channels but a little magic is done by our custom shaders for the game.
And the result is finally what we wanted it to be.
(The images still show non-smooth transitions because the mesh used for the test is not optimal nor does it display the game's world.







Stay tuned for the next blog post which will be our "in-depth terrain vegetation system".

Till then
The BeastGameWare Team

Geen opmerkingen:

Een reactie posten