Voxelize vs World Position Offset

Hello,

We have a forest in our current game, using Nanite and WPO with distance fade.

If we had to start again we would probably use Nanite assemblies and skinning as shown in Witcher 4 demo but it’s out of the picture at the moment.

We tried Voxelization for shape preservation and it gives us a nice performance boost in GPU (our current bottleneck). The problem is of course that it doesn’t work with WPO.

As we only use WPO on close range and voxelization on distance, I would like to find a way to have the best of both worlds. Is there a way to achieve one of this things ?

  • Disable Voxels while WPO is active
  • Disable WPO when Voxels kicks in
  • Prevent meshes from going Voxel under “50m” of the camera

Based on my tests, we can’t control when the mesh goes into voxels, it depends on too many factors, some trees goes voxel at 5 meters from the camera and some after 100m.

[Attachment Removed]

Hi there,

I don’t believe there exists any API exposing Nanite voxelisation at runtime sufficient to achieve any of those results you are after.

It is possible to stop or limit WPO at a set distance, which I’m happy to go into, but I’m also aware that this is only part of the problem you have described.

It is better to use skeletal-based animation to avoid the flaws that come with using voxels and WPO together that currently exist. Also of note is WPO’s impact on Nanite’s rendering overhead due to bounds recalculations (which can be mitigated somewhat with Max World Position Offset Displacement), as well as its impact on VSM invalidation.

Whether you stick with WPO, or utilise skeletal animations, I would recommend you disable these at a set distance for performance reasons. That being said, Nanite’s Voxel preservation method does currently recommend skeletal animation.

Thanks,

Hayden

[Attachment Removed]