PCG - Pass landscape physical-material via custom HLSL node - 554

Hi, so to reply, and at least mark a solution to this one..

The issue with the physics being sampled in the HLSL was tied to my use of RVTs to store what drove the physics-layers. In some cases, sampling the physics-layer would work since it was newly rebuilt and everything was fresh. But once I did something like edit the landscape-material, or something that would touch that RVT-pile, it would desync and stop working properly until the pile was rebuilt.

I believe the issue is due to the nature of feedback to the RVT and how some samples might not trigger the ‘oh I need to actually re-render that tile’ in the engine when sampling the RVT. Post-process suffers from this limitation (as noted in the docs) and whilst I cannot confirm for physics, I feel it’s in the same ballpark.

Regardless…I didn’t ever test without the RVT, don’t plan to here, I’ve since moved onto sampling the RVT directly in HLSL and bypassing everything, including the problem. Better, it’s more-performant. Landscape-grass would be near-instant in game, but come with a heavy-runtime price. Once I chunked up the world via PCG per what I was doing back when I created this thread, it might take a few seconds to lay out 4k by 4k worth of grass, with a better runtime overhead. A vast-improvement. However, with HLSL, it’s literally instant; night/day in terms of performance, so I moved off physics altogether.

I think the solution here is that physics will surely work in HLSL, but RVTs will make the stack unreliable unless you know it’s going to be entirely static. I’ve not tested this statement in a cooked game.

My ultimate solution is here: Procedural Landscape Layers - #31 by Frenetic

The graph itself is very simple, the logic is in a standalone PCG library file (kernel source override):slight_smile:

I would HIGHLY recommend following this guy, since he helped write/create PCG in Unreal: