Sign in to follow this  

terrains and texturing

This topic is 3840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

This topic is 3840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this