Compositing Subsurface and Transmissive Shaders


For our second project, we studied the refraction of light through different gemstones. Everyone in the class had a different stone form amethyst to selenite to tiger’s eye, each one presenting a different challenge in replicating its look!

The gemstone I picked was a perfectly polished rose quartz, with some pretty ribbons of different shades of quartz inside of it.

As with the first project and any match to live task, we had to take pictures with our integration kit! Two of my friends and I got together to shoot some small still lives to put our models in. We were allowed to take video for this project if we were familiar with tracking, but I chose not to so that I could focus more on the aspects I didn’t know how to do. I have plenty of experience with a lot of difficult tracks anyways!

Here are the images I used for this project, minus the HDR. Pictured is a single exposure.

Again I’m not particularly thrilled with the lighting of this setup, it’s not particularly dynamic. I really need to get more exploratory with my photography! I also tend to have a pretty light hand in everything from drawing to setting up lighting, so sometimes images I make come out a bit flat like this. It’s something I acknowledge and am trying to work on!

Anyways, here’s my grey ball render in comparison to the real world grey ball.

So, setting up this lighting was a bit of a challenge for me. The HDR did an alright portion of the color and lights, but the windows behind and the string lights had a difficult time coming through in the indirect lighting. So, I tossed in two area lights with blue tones where the windows would be and a yellow toned light that acted as the key light. I also toned the plane the ball sat on to be the same yellow as the table runner to get that yellow bounce light on the underside of the ball.

The shadows are pretty soft yet defined in this image, and avoiding a long stripe across the ball from the spot light was difficult. I counterbalanced that by allowing the indirect light to make up for the softness of the light. I also kept the shadow of the ball relatively defined like the reference plate. Looking at it now I see a bit of a double shadow, but where the vases in the left corner cast shadows the same phenomenon happens. The underside of that ruffle just amplifies the shadow stretching over it.

I also figured out the occlusion!!! I was really excited about that! I was essentially missing a step last time- rather than having a color corrected full shadow plate with an additional mask of correction in the occlusion zone, I was only multiplying my shadow by the mask of the occlusion which just shrunk the shadow. But I get it now!! Two color corrections. Although this might be a bit darkness on the occlusion.

Here’s my node tree for that.

I also wanted to work on my node tree layout. I try to keep a pretty linear workflow, but I wasn’t sure how to properly lay out my cg comps. After studying a few of Nuke’s example files, I think this is a little closer. Still not perfect by any means, but much neater than my workflow before. I tend to sometimes follow my own internal logic of B PIPE DOWN NO DIAGONAL LINES EVER too strictly sometimes. What can I say, I’m a neurotic organizer.

So, the shaders! Phew, we’re getting there, I promise. Long post, stick with me!

I tried a few different methods of balancing the subsurface and transmissive properties. I started with a mix shader that relied heavily on subsurface since rose quartz isn’t particularly clear. To get the ribbons of white and pink quartz, I used a procedural noise/marble texture in Maya. I stretched and edited it to look similar to the lines in the stone, and connected a ramp to the color to get all the gradations. I’m pretty alright with the result!

To get the clear shininess of the outer layer, I ended up rendering out a separate transmission pass that looked like a hazy pink glass. I then rendered out a Fresnel mask by making a facing ratio based shader that faded to red as it got further to the edge of the object. Here are some renders of the subsurface, transmission, and fresnel shaders.

I also rendered out the standard shadow and occlusion passes, but those aren’t too exciting.

Also this model can be found at Lots of people used the Stanford models, but I like being able to use photogrammetry and I fell in love with these funky little lions! Aren’t they cute?

For this project, I also decided to use AOVs rather than manually splitting render layers, and I gotta say, I enjoy that a lot better. I prefer having all my layers in one file to render all at once, and I didn’t find it to be limiting as far as my control over what goes into the layers. But I know every artist prefers a different setup, and I’m happy to know both.

I rendered out a direct, indirect, specular, specular indirect, subsurface, subsurface albedo, and point passes. I of course didn’t render out the subsurface passes on my transmission shader, that would be pointless.

Well, actually, I didn’t end up rendering any AOVs on my transmission pass, purely on accident. I had removed AOVS to render out the shadow and fresnel masks on my home machine while the heavier subsurface pass rendered on the renderfarm, but had forgotten to turn it back on before I tossed the transmission shader on the farm. Luckily I didn’t find that it made a difference since all the specular data was in the subsurface and the transmission was such a small part of my final comp. Just thought you should be aware that this is why it is not in my final nuke script.


All that was left was a little bit of color correcting to accommodate for the heavy yellow and blue tones in the scene, and a buildup! All done. I’m significantly happier with this composite than with my very first one, and that’s really exciting! That means I’m learning It was just so much fun to try and capture all the nuance of this setup from lighting to shader to comp.

I’m excited to see what the critique is for this project so I can push it over into the realm of photoreal!