I’m trying to implement a couple of changelists from UE5.8 main branch concerning Megalights (especially the ones that touches the subsurface scattering with Substrate adaptive gbuffer). I managed to make it compile and most of it looks fine, except the direct lighting is extremely blown out (mostly pure white) when Substrate + per pixel SSS profile + AdaptiveGbuffer + Megalights. I tried fiddling around the demodulated base color and lightdata color without success.
I’ve listed some links that relates to the CLs we implemented and I was hopeful that you may have some insight on which part I missed to make this work. Thank you!
I’m not sure, as it is not very easy to help without data. Would you be able to share a capture maybe to visualize where it the issue could be (and compare to our 5.8 branch)?
I’ve shared images here of what is currently happening. This sphere is a Complex slab from Substrate with SSS diffusion running on the Adaptive Gbuffer path. With our changes to implement transmission and per pixel diffusion (the upper mentionned CLs), the shading is nearly pure white when enabling it with Megalights (in this example I have a simple directionnal light, but it’s the same result with any point lights). Debugging a bit, the issue appears to be around
in MegalightsMaterial.ush, but I couldn’t figure out yet the exact issue. I understand that we’re trying to fit something that might not be compatible, but I feel like I’m just missing something small to get it to work properly (side note is that we can’t do the full 5.8 upgrade yet, but we still need those SSS changes for Megalights).
No SSS enable, just basic Substrate Complex slab, Megalights enabled:
[Image Removed]
SSS Diffusion, but Megalights is disabled, basically our expected result:
[Image Removed]
SSS Diffusion with our 5.8 pulls, same setup, per pixel values (Color should be coming from Transmission-to-MFP), but when enabling Megalights: [Image Removed]
Here’s an extract of our rendering settings, I can’t get you an exact log because of some sensitive information I can’t strip. Hopefully it gets you the info you are looking for!
Thanks! Could you try to disable this in your project r.Substrate.OpaqueMaterialRoughRefraction. If I recall correctly, this is not compatible with Megalights. We should add a warning about it.
Hey Charles! Thank you so much for your update. It did indeed fixed the situation, our 5.8 pulls work really well now with the feature disabled. Any ETA on implementation support for Rough Refraction for opaque materials with Megalights? Thank you so much!