Jump to content
  • Advertisement
Sign in to follow this  
Hiyar

Terrain texture (blending at distance)

This topic is 3170 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

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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!