Terrain texture (blending at distance)

Started by
3 comments, last by Hiyar 14 years, 6 months ago
Hi, I have a terrain texturing scheme that uses high frequency detail textures for close up and low frequency textures for distant areas, that are blended at certain distance to the camera, (to remove tiling artifacts) However, I want that cliff and mountain materials that are usally applied on the steep areas of the terrain to have a different distance createria for blending. Because I use different tiling for different materials and steep sections are visible from far away and have less tiling. How do I handle slopes and steep sections seperately? Just by using different blending values as material properity? How is this generally handled? Thanks
Advertisement
Can you not pass in the detail distance to the shader per material? That's generally what I do. i.e. if you're rendering steep rocks using SteepRock.fx, pass in a much bigger detail distance than for SomeGrass.fx.
Yes, this is what I would do for now. Blending distance as material parameter.
But I am certainly not using seperate fx files for each material. Material files are not fx files.
And I try to blend layers in one pass. Because I am doing some calculation in the shader i.e. terrain normal would calculated each pass. And this is redundant calculation. So it is one pass blending
Quote:But I am certainly not using seperate fx files for each material. Material files are not fx files.


Absolutely - I was just paraphrasing.

On a slightly different subject, can each of your terrain layers have different diffuse, bump, normal and specular maps? If so, how are you doing all that in one pass if you have 3, 4, 5 or more layers in a terrain patch?
For materials I'm using XML like files. Compositing different materials in one pass is handled by the materialsystem. I can use normalmaps, specularmaps etc.
But of course only a limited number of textures can be sampled simultaneously in the shader. I think Shader Model 3 supports up to 16 texture samplers. My terrain is splitt in patches, so texture sampler limitaion is not really an ussue.
Multipass/Framebuffer blending is not an option for me, because bunch of things would be recalculated in the shader and mutipass means also more drawcalls and this is bad for terrain rendering.

This topic is closed to new replies.

Advertisement