For an experiment I am trying to build a ground material (landscape) whose texture size remains constant regardless of the view distance from the camera. I am considering two options:
the texture would needs to be seen from front always regardless of the camera position. In this case the texture would probably need to be mapped in a screen 2D space, but limited to the 3D surface.
or
the texture would be 3D mapped (depth), but its size would remain constant regardless of the camera position
I will opt for one option or the other depending on how good it looks for my need.
I have tried to mess with PixelDepth to modulate the tiling based on camera distance but I don’t obtain good results. If you have any hints about how I can achieve that, thanks in advance!
There’s a lot of resources around on how to do similar things.
You’ll want to get the distance between the camera position and the world position and then use some math multiplied by a texture coordinate node before plugging into the result into the uv pin of the texture.
option 1 is a 2d billboard.
option 2 is not possible, because you would have to assign different texture sizes to one material in the (landscape) mesh for the parts that are closer and further away.
I am trying to overlay some texture at far distance to provide some matter effect (like a noise). But this overlay needs to be kept a some constant resolution else it will not show up properly. Think it like a post process effect that will affect some textures only and at a certain distance.
There is a details by distance node in materials. There are LOD materials, and there is also some other things. Setting temporal aa can help with landscape textures at distance. I would suggest using static mesh if it’s extremely important background, and setting lod, and lod materials. Unreal* Engine 4 Optimization Tutorial, Part 2
This is a good article for different detail by distance, but the wording that your using to explain what effect you want “Exactly” might not give you the greatest answers.
My landscape looks good at distance. I think you might want to try to set the mapping scale node Landscape coordinate node for that exact texture in your landscape material, or adjust streaming multiplier. It would be better to give an example of the effect to create though.
I mitigated the “swimming” effect using quantization steps for the UVs. This provides good result, but there is a “scanline” between steps, hopefully it is not really visible when walking on the landscape since the view angle is flat. If the landscape is seen from top through this can be more visible.
My issue is not only on background static meshes but on the landscape textures. I don’t think we can control the LOD management for them.
So below is a picture, this is a grain effect I am applying based on distance, but since it is quantized it creates a scanline effect when transitioning between resolutions. This is barely visible on a screenshot, but more visible when animated. I am trying to find a solution that doesn’t have this side-effect !