Realistic 3D landscape texturing

Started by blue_tomato, October 02, 2005, 17:50:58

Previous topic - Next topic

blue_tomato

I am working on a landscape engine, and want to improve how the textures look in steep hills.

Normally when rendering landscapes, a texture is simply projected down on the height-mapped polygons from above. This works fine in most cases where, but when a hill is very steep, the texture will be stretched and the result looks unnatural like in this screenshot:



Notice the steeper the hill, the more stretched the texture becomes because of the lack of vertical texture information.

Normally this is solved by using a new texture for slopes that are steeper than a given angle. A stone texture is often used for example, like here:



In my case, I want one surface texture to be used over the whole landscape, but instead of being stretched on downhill and uphill, I want the engine to always paint the same amount of texture pixels per m2 at all times.

Any ideas on how this can be accomplished? Thanks :)

Fool Running

You could calculate the distance between vertexes and put enough of the texture to cover the distance. (I assume you can pre-compute this information  :lol: )
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

blue_tomato

Quote from: "Fool Running"You could calculate the distance between vertexes and put enough of the texture to cover the distance. (I assume you can pre-compute this information  :lol: )

Yeah, this is the first solution that came into my mind too, have a repeating detail texture and non-linear uv coordinate distribution.

But, would this not mean the textures would get distorted, as the repeating textures would no longer be properly aligned?

I did not actually try it, anyone has experience with it?

hvor

Only good solution that I came to is to have more polygons on very steep hills. I don't know how you could  paint the same amount of texture pixels per m2 at all time, if you are constrained with vertex information - you can attach texel to vertex.
b]Hvor Games[/b]