Landscape detail texture distance fade
I made terrain using Landscape tool, and applied various detail textures using landscape layers. And it's all nice and cool but the problem is, that detail texture actually renders at all times across entire terrain.
Since i use those texture to blend them with one huge texture that goes over entire terrain and is mapped 1:1, you see detail texture tileing in the distance, wich is really looking bad. Around and near player, it looks great, but in far distance, it looks horrible.
So is there any way to make those detail texture face at certain distance?
I already tried playing around with CameraWorldPosition, but with no luck.
Bump on this question,
I'm having the same issue and would love a solution!
You guys are lucky I've been researching this.
There might be other methods. I'm still digging into this for a "Fog of War" idea, and Landscape Details around the camera/player.
The player position-based material is great for third person cameras, although it can get computationally expensive, and creating multiple materials that source that same kismet sequence can be cumbersome. I think what OP is looking for is something like a detail normal-type setup, that uses Pixel Depth to lerp between a detail map being on or off. Something like this:
In that example instead of adding to the Normal (as I would with a detail normal setup), I added to the diffuse to highlight how the effect fades as the object recedes into the distance.
Use the distance (in units) at which you want your detail map to start fading in, divided by Pixel Depth, and use that as the Alpha to Lerp between nothing and your detail map. This doesn't have to Lerp between off and your map and add to your diffuse (or normal), you can use the Range / Pixel Depth setup to Lerp between different textures as well.
That would be a much simpler shader to start with. Thanks Ozzmeister00, that's bringing up a lot of good techniques.