Absorption Method for Rendering Cum
Wanted to make a post explain how the this material works/commenting for future me. Here is a link if you're interested in using this material. I plan on updating it in the future as I develop the material and will post those updates here (v.0.6). Any feedback or criticism is greatly appreciated.
I'm still working on a proper cum simulation and will post updates as I develop that (accidentally rendered at 2x speed)
This material uses Beer-Lambert's Law with uniform attenuation to approximate the thicker and thinner parts of the fluid.
From this we can use
While it would be possible to calculate the attenuation coefficient for every part of the material this would be incredibly resource intensive and not worth it for the outcome in this case. This shader uses an Absorption Value that is chosen by the artist (μ) to approximate this value. We get from blender light path node using the ray depth output.
Here, we're using T=e^(-) were is the absorption depth and T is the outcome between 0 and 1, so it can be used for the value in HSV. With this, we get a lighter value for thinner fluid and darker value for thicker fluid. It can also be used to mix two colors together, giving only the thicker fluid a different color. With cum there isn't that much of a change, but I added a slight yellowish/brown hue to the thicker parts as visible in the last rendered image. I found this to be a more believable than having just solid white
This method was developed by Gottfried Hofmann for use of sss before it was added natively to blender, a video of his explanation is here. This is an older version of blender so I've trimmed off some of the work blender now does by default.
The absorption controls an translucent bsdf that is then mixed with a principle bsdf to brighten the colors and add some specularity. Without the principle bsdf, the material looks foggy and flat. I plan on doing more R&D to remove the principle shader and only add the needed nodes for specularity for greater optimization, but currently do not know how to do this.
Sources