Shader Issues

Started by houndie, April 07, 2011, 11:28:54 AM

Previous topic - Next topic

houndie

I am experiencing some shader issues in that I have a heightmap that is 1024x1024 in size and split into 512x512 tiles made from L3DT.  What I have been doing is importing the TER file for each tile into Terragen 2 and then using shaders to create splatmaps based on height and slope and for the most part it works great.  The problem I am having however is this new set of tiles I am using encompasses both low ground and high ground for lowlands and mountains.  Well on one tile the shader works great and I get the proper effect and it recognizes that the height goes from 0 to 1000, but on another tile it considers the whole area under 100 feet and so I cannot get it to recognize the mountain area.

When I look in the Heightfield shader the heightmap looks correct with the proper heights, but when I go into the splatmap shader I have to set the minimum altitude for the blue (mountain rock texture) to 25 which is ridiculously low and same goes for the slope I have to set it to 20 in order for the green (slope texture) to be on the map.  In the end this is causing a lot of grief when it comes to texturing because nothing is truly correct and so all the texturing is wrong and of course doesn't match the other tiles at all.

Any thoughts on why Terragen is having an issue with this?

RArcher

A quick thought on this would be that the further away from the 0,0,0 location you get the more inaccurate your heights are going to be due to the curvature of the planet.  Try playing around with the "Use Y for altitude" option as this may (or may not) help.

houndie

Unfortunately no that didnt help, what seems to have made a difference is the Gradient Patch size in the Compute Terrain option.  But I am not sure if that is the correct use of that feature as I changed it from 1 to 1000.  I'm worried now that doing that is going to fubar the other three tiles in such a way that I won't be able to get the splat maps to match up at all.

cyphyr

You could try adding a "Heightfield adjust vertical" shader between your "Heightfield load" and your "Heightfield shader". There you could add 100 to the shaders height.
By the way what's a splatmap?
:)
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)