I’ve been playing around with Nanite landscapes and I’ve noticed some pretty severe quality issues when it’s enabled for a landscape. Shadowing gets super messed up, and there’s obvious stairstepping in the geometry almost as though the height map has been compressed, or the Z position of the vertices is being aggressively quantized. Has anyone else seen this, and does anyone know of ways to fix it? There are no precision settings for Nanite Landscape like there are for regular nanite meshes.
I have found the same issues with Nanite Landscapes and Dynamic Shadows. Lots of black shadows exist, but if I disable dynamic shadows on the landscape they go away.
I have encountered the same problem. Considering the default landscape you get converts to nanite just fine, i also assume it has something to do with the Z-scaling. If only there was a way we could apply the transform just like we do in blender to reset all the scales to 1 without changing the actual size.
I did try exporting the heightmap over to blender to try and scale it there and applying the transformation, but with a map my size, blender would straight up take all my 64 GB of ram before crashing. It is worth a try if your heightmap is smaller than 4k by 4k for example.
Update:
On the same landscape i had, the normal scaling would be 123, 123 and 1953 on the x, y and z axes respectively. Converting to nanite showed the terracing. However when i set the z-scale to the default 100, and applied a custom blueprint landscape brush and converted the small mountain it created, it converted just fine without terracing.
This confirms that the axis scaling might be the problem.
So here’s a proposed solution: make a blueprint for a custom landscape brush that just scales the landscape. It should be quite simple, but i have yet to find a good tutorial on this. So i’ll be working towards that to test it.
Alright I have been doing some research and it seems to be working.
You can scale your landscape with this instead of the Z-scale option
There is a caveat however. You can only scale up your landscape with a custom brush like this so much until you start running into the maximum height. At a z-scale of 100, the height is mapped one to one with the 16 bit height, effectively giving you ± 32k to -32k as maximum height. So it’s gonna be a mix and match with the z-scale and the brush scaling if you go this route.
Edit: You need to make this material (functions like pack/unpack are near the brush file location) and select it in the CustomBrush_MaterialOnly
I was trying out Nanite on my landscape as well and found two things.
Memory wise it keeps your entire landscape and Nanite version so memory demand basically doubles. That has to change, IMHO.
I also noticed these stepped and ugly shadows that appear when using Nanite that you identify. I think it has to do with the ‘Cast Shadows’ option, on the Landscape.
Since this controls whether the primitive should cast shadows. Disable this and the primitive triangle of Nanite doesn’t cast shadows anymore, you will still get shadows from the hills etc just not the triangles that create it.
Hey, I have the same problem. “Staircase” effects in the landscape at Naninte through scale values on Z in the landscape. Could you do a tutorial or describe in more detail how you were able to achieve the Landscape height using CustomBrush_OnlyMaterial and Landscape Z remains at 100?
Would probably be safer to wait until a “less alpha” version of nanite for landscape is released instead of messing with Z scaling.
Stair stepping is often the case of missing data.
Its possible the nanite system is oversimplifiying the heightmap or the point positioning.
Op points this out - almost as if the heightmap has been compressed -
It probably has. If not directly, by the point precision of the nanite mesh throwing things off.
If you really are in a rush for whatever reason, nightly github releases have the most current version of the engine. You can compare what was released then, vs what work they improved on.
They really need nanite to work to make landacapes viable, otherwise their whole engine is pretty much a wash.
Eventually, they will patch this up…
Unforunately, Epic considers the current state of Nanite Landscape ‘Production Ready’ and there have been no commits to the system since last August.
I’ve done some experiments and poking around and @jordirules123 is right about what’s going on. Nanite landscape is feeding the local transforms of the vertices into the converter using the default ‘Auto’ precision setting, and then the resulting meshes are being scaled to the lanscape scale.
Due to Nanite’s quantization of vertex positions we get the stairstepping when the landscape’s Z-scale isn’t uniform with X and Y.
I’m planning on doing a test where I hardcode the precision setting to something more precise than what automatic is picking to see what I get.
The ideal solution would be to have the converter using the world position of the verts, and then invert the scale of nanite meshes so they’re still correct, but I haven’t been able to figure out where that is in the code.
Doesn’t mean much.
As someone who commits to various repos daily, some time the extent of the comment is “gtfo with your bad code practices jeff” …
If you arent Jeff, you wouldnt know what it is you did wrong…
Epic is not that bad about commits, but you also don’t get to see the internal dev commits, where you’d be more likely to find a note on what changes took place before it got merged back into the branch and the comment was forgotten…
Instead, look for a specific file in the repo, then look at its changes between versions.
That way you get to see exactly what was changed without having to bother reading comments.
Also, though possible, I doubt epic considers anytning UE5 to really be “production ready”.
And if they really do, then they really are delusional…