Hi everyone, please refer to the attached images below regarding my following question:
Currently, I was experimenting with the idea that since the landscape VRT Height data can be used to make meshes conform to the landscape’s height, that this might be a good way to make larger scaled mesh clumps for things like grass and various ground cover that conform correctly when being placed on non-flat areas of landscape (like being spawned with PCG).
However, as you can see in the below images for the meshes and the test Material I made, the WPO slot does not seem to work well with Nanite meshes. The rocks and grass clump down at ground level have Nanite turned off and look fine (though this isn’t ideal based on their very high poly count if I try spreading several dozen of these around the landscape). The other mesh though, that I have raised up to view it better, has lots of missing triangles depending on how close and what angle the camera is to it. The grass clump for example if I turn Nanite back on, will just disappear all together when I’m within 5-7 meters of it.
I also figured out pretty quick that I can’t just use Nanite displacement either instead of WPO, because Nanite displacement is based on the mesh normals, and doesn’t seem to play well with doing an effect based more on the world normals (ie my mesh just exploded into triangles going off everywhere).
Not sure if there is a solution or work around for this issue, or if it is just a current limitation of the system, but any help or advise would be greatly appreciated.
However, whenever I played with it and nanite, I always got those hard edges, staccato-triangles like you seem to be getting. I gather it was somehow related to the way I generated my heightmaps/displacement-maps and/or the settings I was using.
For nanite: I could never make it work-well enough, but I still don’t know if that was me or the tech.
Reminder: WPO maths on nanite are run Thrice (3x), so the pass is the same cost, but it’s run more than once… Plus, nanite tends to have more vertices to run that pass across so that’s a nice double-ding…
I would say to avoid Nanite like the plague that it appears to be until we have proof positive that they aren’t going to exclude ut from the engine alltogeter on account of it being not an improvement…
I think the main issue I’m having is that WPO does not play nice with Nanite under any major changes by WPO. So I’ve been looking at how I can map the data into the displacement slot of the material instead. Currently, this slot only works in local space, so I’ve been looking for ways to try and work around the limitation, and managed to get this from ChatGPT:
Example Material Setup:
Here’s a more detailed node breakdown for your material setup:
World Position → Get the world position of the current mesh vertex.
Transform Vector (World Position to Landscape Space) → Transform the world position to landscape space using the Transform Vector node.
RVT Sample (WorldHeight) → Use this to sample the height from the RVT using the transformed landscape coordinates.
Height Difference → Subtract the landscape height from the world position’s Z-component.
Multiply by Displacement Factor → Multiply the result by a scalar value to control the amount of displacement (how far you want to push the mesh based on the landscape height).
Displacement Slot → Finally, connect this calculated displacement to the Displacement input in the material.
The solution doesn’t work (transform node doesn’t even have a “Landscape Space”), but it may be onto something with using the transform node to try and change world space data into local spaced data. I just need to search around for a HUMAN tested and proven method of doing this, if it’s possible right now with the current tech?
Hi, the Nanite meshes triangles are quite possibly being culled from occlusion on their non-WPO positions - a work around could be to ensure the mesh is fully visible before applying the WPO.
You’ll run into other problems doing it that way though - for instance, meshes with wind will be using the original pivot point to rotate the vertices rather than the height-difference pivot etc.