Clouds in Pathtracing not illuminated by sky

Is there a way to get full illumination onto the Volumetric Clouds when using Pathtracing? Currently the clouds seem to behave the same way they do in Lit Deferred mode, where only the Sun light illuminates them, ignoring any illumination from the sky or inter cloud illumination.

The attached images shows the default Level rendered in Pathtracing and a Cube added to shadow the Sunlight. This simple test clearly demostrates the lack of illumination from the skyAtmosphere onto the clouds.

This would obviously be expensive to render but necessary if Pathtracing is used to establish a ground truth.

Steps to Reproduce
Open “Basic” New Level.

Create Basic Shape “Cube”

Scale 15k to Shadow Sun from Clouds.

Clouds will have no illumination (just Depth Cueing from SkyAtmos)

Hi,

Thanks for reaching out. If you set r.PathTracing.CloudMultipleScatterMode to 2, a more accurate form of multi-scattering will be used instead of the approximate method which is also used by the rasterization (Lit) mode. This is from the docs:

  • Volumetric Cloud components are now supported starting in Unreal Engine 5.6. By default, an approximate form of multiple scattering is used to ensure compatibility with the rasterization pipeline and to improve performance. True multiple scattering in clouds can be enabled using r.PathTracing.CloudMultipleScatterMode 2 although this can substantially increase the rendering time. The default value of 1 uses the parameters configured in the Volumetric Advanced Output node in the cloud material.

That should get rid of the flat looking shadowed clouds in path tracing mode, but will also take significantly more render time. Below is a comparison of the multiscatter modes (1 at top, 2 at bottom, time is disabled in the cloud material to avoid blurry clouds):

[Image Removed]

If this doesn’t help, can you please share your test scene (I was not able to get the same results with the repro steps on my end)?

Thanks,

Sam

Heya Sam, thanks for the fast reply.

I had already tried that command line(r.PathTracing.CloudMultipleScatterMode=2) , but as I understand it, this parameter only improves the shading of the clouds, but the issue as I see it is that there is no incoming illumination from the “Sky”. Meaning if there is a bright blue sky there should be illumination onto the clouds from it. At the moment there seems to be only illumination from the sun.

I will prepare a test scene for you. It will be a scene similar to this photo of the clouds during twilight( to avoid any illumination from direct sunlight) from a top-down vantage point (to avoid skyAtmosphere “depth cueing” that might mask the issue).

Thanks for the update and clarifying the issue.

>> I will prepare a test scene for you. It will be a scene similar to this photo of the clouds during twilight( to avoid any illumination from direct sunlight) from a top-down vantage point

Thank you, I’m looking forward to investigating this deeper (including the shaders) and based on the findings file a bug report and/or feature request with Epic.

Sam

Hey Sam,

Apologies for the delay, while creating the test scene some of the issues mentioned above became more clear (although it did open some new questions).

As discussed, to more clearly test the command r.PathTracing.CloudMultipleScatterMode=2 the lighting scenario involved a civil or even a nautical twilight where the sun was up to 8 degrees below horizon. In such scenario. most of the direct sun light is actually shadowed by the earth. In rasterization mode this means most of the clouds at lower altitudes will not be affected by the sun (and hence turn really dark, only lifted slightly by the skyatmos Aerial perspective). Using the parameter above during raytracing on the other hand illuminates all the clouds from indirect contribution from the sun onto the sky and other clouds; the result is a cloud vista much more inline to what is expected. Some examples of Rasterization vs Pathtracing (ScatterMode=2).

Example A

[Image Removed]

Example B

[Image Removed]

ScatterMode=0 or 1 seem to give similar results that are both very different to either rasterization or to ScatterMode=2. This was surprising. The difference seems to become a lot more pronounce in these type of extreme lighting scenarios of late twilight. Example below between Rasterization / ScatterMode 0 /ScatterMode 2 [Image Removed]

Hi,

thanks for the update. Those renders (scatter mode 2) look quite stunning! I have not been able to get my test clouds look anywhere near that.

>> ScatterMode=0 or 1 seem to give similar results that are both very different to either rasterization or to ScatterMode=2. This was surprising.

I had a look at the code that implemented this new multiscatter mode (it can be found in this commit) and there is a new parameter called CloudRoughnessCutoff (it does not evaluate volumetric clouds beyond the specified roughness level to improve performance) which can be controlled through r.PathTracing.CloudRoughnessCutoff and is only applied when r.PathTracing.CloudMultipleScatterMode is set to either 0 or 1. When it’s set to 2, CloudRoughnessCutoff will be set to 1, essentially disabling the cutoff, according to this bit of code in Pathtracer.cpp:

if (bVolumeCloudsVisible &&
		PathTracingData.CloudRoughnessCutoff > 0 &&
		PathTracingData.CloudRoughnessCutoff < 1 &&
		CVarPathTracingCloudMultipleScatterMode.GetValueOnRenderThread() == 2)
	{
		// User had clouds visible, but wants multiple scattering to be done by brute force -- enable this here
		PathTracingData.CloudRoughnessCutoff = 1.0f;
	}

I hope that somehow helps clarify the differences in visual appearance between the modes. Let me know if you have any further questions.

Best regards,

Sam

Thanks for all the help Sam, and apologies about the false alarm about the parameter not working.

I will do some more testing with the cuttoff next, in any case, we can consider this matter close.

Cheers

No problem, glad it helped. I’ll close the ticket, but feel free to open a new one when you have more questions.

Best,

Sam