We found that in order to get a match between Pathtracing and Lumen renders of a VDB volume, we have to substantially lower the object’s density (using a shader) on Pathtracing side in order to get a match with the object look on Lumen side at density of 1.
Is there a constant number that is being used on Pathtracing side as a multiplier?
Thanks
Pathtracing using material density of 1.0:
[Image Removed]
Lowering material density to 0.02 and comparing to a Lumen render that uses material density of 1.0:
Update: we discovered that we can get rid of the black artefacts by increasing r.PathTracing.MaxRaymarchSteps 2048. (But the difference between pathtracing and Lumen results is still there)
There shouldn’t be a difference in principle. As you’ve noted, at high density you may need to increase the r.PathTracing.MaxRaymarchSteps cvar for the render to look correct.
Some differences in look are expected since Lumen can’t really simulate multiple scattering, which the path tracer does by default.
Would you be able to share your test scene so we can compare? I am curious what kind of density values are in the vdb itself (relative to its scale).
Hey Chris, we had a meeting with Epic yesterday, we are prepping up a pdf version of our document where we logged all of our test environment/parameter values. Once you guys take a look we can pick this back up from there.
Sorry for the delay, we finally got some cycles to take a look at your project in detail. [mention removed] and I tracked the difference in density between Lumen and the Path Tracer down to handling of the scale in the transform.
The vdb in the scene you provided has an implicit scale factor of 10. If we “cancel out” this scale factor in the engine by scaling the heterogeneous volume by 0.1 uniformly, the lit and path traced views agree much more closely. You should expect some lighting differences due to the fact the path tracer bounces light inside the volume by default. You can eliminate that variable by setting your path tracing max bounces to 1 in the PostProcessVolume. That should also help align with the default behavior in your production renderer as well.
Patrick is going to be looking at tracking down the mismatch coming from the scale. For now the workaround would be to avoid scaling the volume if you can, but we hopefully can get a fix into the next build of UE 5.6.
Another observation [mention removed] has mentioned is that it appears much of what you are running into appear to be associated with the voxelizer running out of memory. That being said, these two CVars will increase the bottom-level memory pool for the path tracing implementation: