Material Development
I did some really fun material node work for the placenta that didn’t ultimately end up making it into the final product, and I wanted to share that workflow before it’s buried and gone!
My intention was to have the edges of the placenta “fray” and become small vasculature, so it didn’t look like a solid organ like a spleen or something, and instead the soft mucosal mass that a placenta is supposed to look like.
I had already set up a hand-painted transparency map that controlled the subsurface scattering.
I had set this up to control the opacity as well, but an issue I was running into was – since the edges were completely transparent – when you looked at the placenta edge-on like this, you could see the two edges (the top and bottom) of the placenta, with a gap in the middle. Transmission wouldn’t work, as it doesn’t remove reflections, and doesn’t become as transparent as I wanted – scattering would still fill in the model, and you could still see the hard edges.
My solution was to use a depth pass to add onto my transparency map, so the closer to the camera the object was, the less transparent – that was, the edge facing the viewer would not be transparent.
However, RedShift doesn’t have a built in Depth Node. To get around this, I used a State node (with the state looking at the Camera position) and fed out the rayposition. I isolated the ZDepth – that is, the axis facing the camera – and converted it into a scalar value. Here, I really had to reduce the values to see the results.
I wanted the values to be a bit more dramatic, because the opacity should go from 0 to 100, so I used a Color Change Range to remap the subtle greys (5.5% and 7%!) to 0% and 100%. Then, I fed this into an invert node, as white is full opacity, and black is full transparency, and multiplied it with my hand-painted depth. Take a look at the result below!
I was really happy with the results – the opacity worked as I planned!
However, I ran into an issue when I zoomed out. Turns out the values I set were for that particular zoom level, and when I backed out, the entire ZDepth map went black – I was too close when setting it up. I decided to not pursue this challenge further, for now, for a couple of reasons:
1) The placenta is never centered in my animation, and it was unlikely anyone would notice the “double edge” that was bothering me so much.
2) The placenta is normally blurred by Depth of Field anyway, so my work might not pay off anyway.
I will keep playing with the concept, though, when I have more free time! I have ideas for how to fix my blunder. Perhaps with math, XPresso, depth of field on the camera, or I might look into how LUTs are calculated and use those values. We’ll see! You’ll hear from me again about this.