Issues with SSS + Glass + PBR

   9580   5   2
User Avatar
Member
710 posts
Joined: July 2005
Online
Hi all,
I ran into some issues when experimenting with the H11 SSS tools in a scene where scattering requires interaction with glass. The setup: Imagine a label, like on a bottle of wine for example. They are translucent to some degree and I'd like to use SSS to mimic this. In this scenario light will need to travel through glass to interact with the scattering surfaces. But, it doesn't seem like either caustics or brute-force raytracing are setup to play nice with SSS.

Some renders to illustrate:

Our sticker, and a copy facing the other direction so both the label-side and the glue-side are visible at once.
Here with the light behind the camera.




And here viewed from the other side. So far so good.




But what happens if we place a glass pane in front? Oh no, the scattering isn't visible through the glass. D:




Turns out I had Optimize Secondary Rays enabled on my SSS node. When I turn it off we can see the scattering through our glass. Note: I had to feed a vector into the Transmitted input of the Physical SSS VOP node. The help files say this:
If you are simulating fresnel (refracted) outside this node, you can override the fresnel transmission vector. Normally the node computes the refraction angle itself using the fresnel function.
I fed it the transmission output of from the Fresnel VOP. If I don't plug anything in, mantra never manages to render a single bucket, not even after several hours on the lowest settings. A bug perhaps?
The downside is, the label becomes sort of transparent. You can clearly see the checker pattern on the ground behind it. Maybe I need to feed it a different vector or change my SSS settings, not sure… Also, there is a serious sampling issue when using PBR with Optimize Secondary Rays turned off for single scattering. The typical way of upping Min Ray Samples as the primary way of increasing quality can't be used because render times rise drastically with that parameter. Setting Min Ray Samples to 4 is enough to bring renders to a screetching halt. Increasing pixel samples works fine, but the memory hit is unworkable in a real scene.




But moving on… the biggest problem is when I place the glass between the light source and the scattering surfaces. Caustics don't seem to interact with the SSS tools. Note: I turned off the environment light to better illustrate.




The only thing that kind of sort of works is to enable All Paths and then we get some positive results, though if you note, the scattering does not become visible on the left copy of the label for some reason. Enabling All Paths is not really an option because of how much sampling is required. I rendered this one at quarter-res because I didn't want to wait the better part of a day for it to finish.




Any thoughts/suggestions are welcome.
Cheers.

Attachments:
SSS_test.zip (1.4 MB)

User Avatar
Member
168 posts
Joined: March 2008
Offline
Hi there,

I downloaded your scene and made a few tweaks in an attempt to speed it up and resolve some of the issues you were seeing. It is attached below. The main changes I made were the following:

  • Reset the ROP's Reflect Limit, Refract Limit, and Diffuse Limit to reduce render times.
  • Reset the ROP's Pixel Samples to 3x3. You may want to increase this for improved quality.
  • Reset each object's Shading Quality and Ray Shading Quality to reduce render times.
  • Disabled each object's pre-dicing.
  • Turned off Optimize Secondary Rays (more on this below).
  • Replaced your glass shader with a Mantra surface based glass shader.


    Secondary ray optimization is much more useful for surfaces that are nearly opaque (marble comes to mind). This feature replaces the usual SSS calculation (which involves ray-tracing) with a simple BRDF.

    I replaced the glass shader with one based off of the Mantra surface in order to reduce noise that I was seeing on the glass. This seemed to work well. Also, if you suspect that the SSS is too noisy, try increasing the Samples parameter (Single Scattering tab) on the Physical SSS Vop rather than increasing a global setting such as the Pixel Samples or Shading Quality. This should help keep your render times sane.

    Anyways, give this scene a try and see if it is a step in the right direction. Let me know if I can be of any further help!

    Cheers,
    –Ian

    P.S. I haven't gotten around to tasting Houdini 11 flavoured wine yet. How is it?

Attachments:
SSS_test.tar.gz (1.4 MB)

Ian Kerr
3D Software Developer
User Avatar
Member
710 posts
Joined: July 2005
Online
Hi Ian,
First of all, thanks for taking the time to look at the file, really appreciate it.

The render speedups are sure welcome, but actually, optimization is not what I'm worried about right now. The big problem I'm trying to solve is that light passing through glass does not allow for any scattering. You can see this in the second-to-last image where the parts of the label that are in the glass' shadow don't have any scattering effects visible. There doesn't appear to be a mechanism to support this. You can try to brute force it by allowing the All Paths option, but no matter how well optimized the scene is, it's not efficient enough to sample with any reasonable settings.

There are ways to fake this I suppose, with shadow masks and duplicate lights etc, but when you start doing that, rendering with PBR in the first place becomes a lot less attractive. I really don't want to resort to old hacks and cheats with physically based rendering.


P.S. It's exquisite!
User Avatar
Member
168 posts
Joined: March 2008
Offline
I've attached a second stab at the problem. The key here is that I've enabled “Faux Caustics” on the Mantra Surface used to render the glass. The reason you weren't seeing scattering is because when the SSS traced a ray from the label to the light, the glass surface was encountered and had an opacity of 1. You could do something similar in a custom shader by using the “isshadowray” VOP, setting some opacity less than 1 in this case.

Attachments:
SSS_test.tar.gz (1.4 MB)
sss_cam4.png (1.4 MB)
sss_cam3.png (1.0 MB)
sss_cam2.png (1.0 MB)
sss_cam1.png (1.0 MB)

Ian Kerr
3D Software Developer
User Avatar
Member
330 posts
Joined: July 2005
Offline
Houdini (20)11 is a good vintage
User Avatar
Member
710 posts
Joined: July 2005
Online
I'll take it!
I completely forgot about faux caustic, which should be a more than adequate solution in this case. I'll have a play with it, thank you again Ian! :]
  • Quick Links