I have been using Substrate materials since 5.3, but this is the first time I have seen this issue. It only appears in 5.8. I’ve seen it in fresh projects, I’ve seen it in migrated projects, etc. Glass renders fine in Lumen, but full black and opaque in Path Tracer. EDIT: In the screenshots, you can see thickness is set to 1.0. This was just me playing around, but even the lower default value of 0.1 yielded the same result.
Steps to Reproduce
In a fresh or existing 5.8 project, creating a Substrate slab with a near-white color plugged into Substrate Transmittance to MeanFreePath, which in turn is plugged into SSS MFP in the slab. Slab is set to Simple Volume Sub Surface type. Blend Mode is TranslucentColoredTransmittance. Index of Refraction is Enabled. Looks fine in Lumen, but renders black and opaque in Path Tracer.
Yes, that is because the path tracer has been improved with random walk for volume inside object I believe, when ther are not thin.
In the rasteriser, we treat all translucent material with SimpleVolume as if they have bIsThinSurface=true on the material. So the mesh is an empty shell. And this result in the rendering you know and expect: the rasterised can only do such rendering today.
But when bIsThinSurface=false, the Path Tracer will execute a random walk as if the mesh is a full enclosed volume, filling the inside of the mesh. So it will look different. If you set bIsThinSurface=true on the material though, the path tracer should look correct. I have tried it and it works.
Another thing: when you set a transmittance color for a thickness of 1 cm on the TransmittanceToMFP node, the mesh might look a lot more translucent when using the default thickness on the root node because the default thickness is 0.01cm. So you might want to plug the output of the TransmittanceToMFP node to the root node and apply artistic modulation on that thickness as you see fit after.
I hope this clarifies the situation and will work for you too. (I could not find any other issue).
If there is anything extra you think I have missed, please send a project I can open and look at with the same settings to make sure I am looking at the same thing.
Hm, that’s interesting, because this screenshot I posted is with thin surface enabled. With it off, the glass ends up looking like chrome. I uploaded the project to the post when I created it, but let me know if you don’t see it.
I took a quick look and there’s definitely something weird going on here. As you said, it seems like a regression introduced in 5.8. The workaround of setting refraction to None will hopefully be sufficient for you for now, but I’ll make sure to get this fixed going forward.
In this case the material is marked as thin and the surface doesn’t have any diffuse component, so the random walk stuff doesn’t apply here.
For the thick case (Is Thin turned off) you need to make sure the Thickness in the TransmittanceToMeanFreePath node is high enough relative to the thickness of the sphere (around 10 in my tests). There is another odd behavior when Refraction is enabled but the Refraction Ior is set to 0.0 as it is here. That is also unexpected, but you can work around it by defining a proper IOR like 1.5.
Hope this helps, thanks for the simple repro project!
Yes, the Refraction being set to 0 was me playing around trying to get something to work. Thank you both for your responses. Setting Refraction to None for now I think should be alright. Glad to be able to bring this to your attention.
Just to update you, the bug that was causing the mismatch on the path tracer side with thin surfaces has been fixed. For solid glass, the remaining issue is that while the path tracer can measure the object thickness correctly, the deferred renderer must take a guess with a constant value. So its harder to get good alignment between the two modes in that case.
We’ll evaluate which release we can push the fix into since it involves some shader changes. In the meantime, the best alternative for the path tracer is probably the legacy ThinTranslucent shading model.