LOD Or Mip Map Issue

As you can see from these images there is a difference in LOD shown by the engine based on my distance. I want to know how I could turn this feature off. In this terrain I am using both parallax occlusion mapping and tessellation. I have tried to tweak the terrain LOD options shown in the details pannel along with the texture LOD by turning it to cinematic. It almost feels like this is a material LOD issue; which I don’t think is a feature. Is there something I am missing?

Thank you,

Shaun

From those screens it’s not easy to tell what’s the actual problem. Please post the same (or similar) screens with wireframe mode. That will help to say whether it’s Landscape LOD (reducing vertex and tri count with distance) or not.

If it is - then you simply force base LOD 24/7. Set the ‘MaxLODLevel’ of the landscape details to 0. It’s a brute-force solution which will most probably affect performance, but will let you see whether that is the problem or not.

If it’s not then it means you did something with the material - because a stock material doesn’t do things like that. If I had to guess I’d say it’s the geometry - because of the shadows. You did not move that far away to loose so much shadow quality on a shadow texture space, more likely it’s the less ‘spikey’ geometry.

Thanks for the response vipeout. It is very appreciated. I had just written a long response that didn’t get uploaded and lost the text, so I will try to remember all that I wrote.

I set the terrain Max LOD Level to 0 which did not retain shadow detail.

I believe this is not a geometry issue because as shown on the last linked image i am having this shadow loss issue on a regular static mesh. Also if u look closely at the silhouette of the terrain it appears to retain silhouette information even when the shadow information is lost.

I went ahead and deleted part of my terrain that is not visible in the scene and this had the affect of making the tessellation have more displacement under the same material input numbers.

As a side note, I messed with my light source and when it is set to movable instead of static the shadow loss now happens in 3 stages.

I have linked the images because I think this caused the problem to uploading the comment. Sorry about this. The images correspond to each other in pairs.

Thanks,

Shaun

link text

link text

link text

link text

link text

link text

link text

You see the ‘Preview’ text on your shadows? That means you have to rebuild lighting. With dynamic lighting you don’t need to do that, which means it probably worked when you set to movable, but there are 3 cascades by default (3 shadow textures that swap depending on distance) which is what you could see with the 3 stages. That is normal and is considered an optimization. You can tweak it by changing the options in ‘Cascaded Shadow Maps’ section of your directional light.

If you want the shadows to stay the way they would on a cooked game then build the lighting and look at it. Increase the lightmap resolution on landscape if need be. What you are seeing right now is just a preview from within the editor, which is dynamic (the engine does not build lightmaps on the fly).

Keep in mind it takes some time to bake the lighting. Depending on your level setup, lightmap sizes, quality and your PC power it may take long. Start with preview quality, then go higher if you need. The quality setting does not affect performance of the gameplay, it will only affect the quality of final lightmaps and building time.

You can choose the quality of the baked lighting here:

70001-lighting.jpg

Thanks again for the response vipeout. I went ahead and baked the lighting. Unfortunately this has no affect on creating shadow information from tessellation. I believe that only dynamic light properties allow for shadowing of tessellated materials, but the engine limits the distance at which this can be seen. With cascade maps set to the highest distance and ray trace plus distance field AO turned on and tweaked for the best results at my desired camera view it does not show the correct shadow information. I don’t think what I want to do is yet possible within the engine. However I must thank you in helping me figure out the source of the problem.

Please if you have any thoughts on this matter let me know.

Thanks,

Shaun

Unfortunately, I have never dealt with tessellated materials so I cannot confirm nor deny your idea. I’d temporarily remove the tessellation component from the material and bake the lighting / tweak the dynamic light and see whether it works as expected. If it does, then you may be sure this is it. If it still does not work however, I’d dig deeper.

In UE3 I had a problem with shadows not updating correctly when mesh LOD was changing. The shadows stayed the same (cast from base LOD), which made ugly artifacts in some places. The solution was, to force base LOD in those places. A little performance hit was visible, but we couldn’t just leave it like that.

We’ve had several other issues with shadows as well. Some of these fixes were done by config changes. If there is a distance at which the shadow gets ‘optimized out’ by the engine, then that distance needs to be somewhere. As far as I see, Epic rarely ever hard-codes stuff like that and there might be a CVAR somewhere. Maybe even accessible from the r.Shadow.XXX set of functions. Might be worth a look into it.

If it is not an optimization, and simply the tessellation gets lost with distance (which is what I believe it does anyway, it can’t be all tessellated all the time) then there is no geometry to cast that shadow you want. Working as intended - the further you are, the less you see, so the PC can manage. How to get around that? Either dig deep in code and force tessellation on all the time or try with Lightmass replacer nodes in material (there was something like that in UE3, no idea if it’s present in UE4). These nodes basically allowed you to manipulate what happened on the lightmap.

Thing is, you can’t change a lightmap on the fly without a huge performance hit, so you’d have to force that lightmap to have the tesselation shadow on it. Might work, but might also look bad from the bigger distance. Is it worth a shot? Well, I’m certain you’ll learn a lot by trying. Question is, do you have the time? :wink: