terrains and texturing

Started by
3 comments, last by Matt Aufderheide 16 years, 10 months ago
I have a grid mesh and I apply a heightmap to it to create a terrain mesh. I also stretch/tile textures over it. The problem is with steep mountain peaks, the surface area is increased but I am using the same texture resolution as if it were relatively flat. I was wondering what the best way to handle this would be. I was thinking to just use 3d meshes to model cliffs/steep mountains. What other options do I have?
-----Quat
Advertisement
I got reasonably good results by using UV unwrapping on the heightmap to solve this problem. I wrote about it back in September 2005 [smile]

It wasn't perfect because you could still get edge artifacts due to different sized neighbouring texels, but I did improve this with some heavy post-processing on the texture map (never wrote about that part though).

I've seen some discussion of using projective texturing to solve this problem. Basically store the texture as a cube or sphere map and project according to the surface normal. This way the flat terrain gets projected to the top of the cubemap and the cliffs get projected to the sides of the cubemap. It wastes a lot of VRAM but seemed to have some potential to me...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by jollyjeffers
I've seen some discussion of using projective texturing to solve this problem. Basically store the texture as a cube or sphere map and project according to the surface normal. This way the flat terrain gets projected to the top of the cubemap and the cliffs get projected to the sides of the cubemap. It wastes a lot of VRAM but seemed to have some potential to me...

You don't really need a cubemap. You can emulate the cubemap functionality in the pixel shader (if you can afford the performance penalty). If you haven't already done so, check out the cascades demo from nVidia. I know it's DX10 but the tri-planar texture mapping they mention (actually it's cubemapping with 2D textures) can be done in DX9 class hardware. Here is the presentation.

HellRaiZer
HellRaiZer
Thanks for the ideas.

The tri-planar texture mapping seems promising to me. So to get an effect like grass for flat areas and rock for steep areas, I would use a grass texture for the xz-plane, and a rock texture for the yz- and xy-planes?

And, of course, I could have an artist assign the blend weights in an editor at each vertex, rather than using the normal.
-----Quat
Here is a method I have thought of.. it may be similar to this tri planar method: just calculate 3 texture projection matrices, using orthagonal projection, from the right/top/above angles.. then blend the textures using the vertex normals..

This topic is closed to new replies.

Advertisement