Linear Landscape Features - General Approaches

Started by
0 comments, last by PhillipHamlyn 11 years, 1 month ago

Hi,

I'm happy with texture blending on a large terrain (mine created with a mixture of perlin noise and fractal diamond square) and I've made a first pass at implementing rivers + roads. Examples on the web suggest these are done in the same way - i.e. as a layer on a texture blend map. This seems pretty limited to me as;

1) linear features tend to be narrow and very well defined; texture blend maps tend not to be able to generate this.

2) a texture blend map for linear features on a landscape would be mostly black and, ignoring the role of texture compression which would tend to distort the desired crispness, would waste lots of space.

So long as my roads and rivers are nice and thick, and I dont need a crisp edge to them, it kind of works.... so I'm looking for a recommendation for an alternative approach.

I have experimented with creating a geometry based road out of triangle strips and it worked poorly. The need to closely align my terrrain mesh and my "road" mesh was unweildy and unless they were precise I got the road dipping in and out of the terrain mesh.

My landscape pass at present is about 10-15ms with 100k triangles, so I can afford another pass with the same height map and terrain surface geometry, but I dont know how to get the location of my road into the vertex shader in the first place, and then how to align it exactly with my terrain mesh.

Thanks,

Phillip

Advertisement

... additionally;

I have read briefly that some people use a method where linear geometry features are rendered to a rough match to the landscape geometry and then use a stencil buffer to prevent the landscape being painted on top of it. I'd like to know if thats a recommended approach (i've not touched stencil buffers yet, so want to know its a good direction before plunging in)

Thanks in advance

Phillip

This topic is closed to new replies.

Advertisement