3D Static Texture Test from Sarah Talbot on Vimeo.
I've been thinking quite a bit about the look of my thesis, and how I want to try to create a papery, watercolor texture over on the models and environment - or have some interesting patterns and flexibility in my color scheme. I have also been clocking a lot of hours in After Effects working at Datto and I've been watching a lot of cartoons (as if those aren't already a given). I love styles I have seen in 2D shows and films in which characters move along in the environment, but the textures on their clothes, props, skin, hair, etc. appear static. I know a large community of animators might point out the Cartoon Network show "Chowder" as a prime example of this technique. Having a firm understanding of photoshop layers and compositing, I can see easily how this can be done in a 2D environment. So I said to myself, "Self, how could you get that look in a 3D animation?" And to myself I replied, "I'm crazy enough to drop everything try that right now."
My first hypothesis was to project a texture onto a model and find a way to prevent it from following the camera, or to hook the uv coordinates up to the movement of the model, or to work some crazy math in a shader, but I decided that sometimes the simpler answer can be more effective. Having dealt with scaling UVs connected to model scale on the vine in my last film, I know a lot of heartache can be saved by cutting losses in the 3D environment and working in a compositing program.
So I plotted out the steps I would need to take to get the proper alphas I would need to create an edge shader in which the middle of the model was transparent.
To summarize my steps quickly:
1. Create an edge shader with an alpha as the inner model
2. Render separate black and white images as alphas for the whole model
3. Compositing in after effects using alpha mattes
My first hypothesis was to project a texture onto a model and find a way to prevent it from following the camera, or to hook the uv coordinates up to the movement of the model, or to work some crazy math in a shader, but I decided that sometimes the simpler answer can be more effective. Having dealt with scaling UVs connected to model scale on the vine in my last film, I know a lot of heartache can be saved by cutting losses in the 3D environment and working in a compositing program.
So I plotted out the steps I would need to take to get the proper alphas I would need to create an edge shader in which the middle of the model was transparent.
To summarize my steps quickly:
1. Create an edge shader with an alpha as the inner model
2. Render separate black and white images as alphas for the whole model
3. Compositing in after effects using alpha mattes
1. Creating the Edge Shader
I wanted an edge to follow the model "cartoon style" in order to help maintain the silhouette. Although I am using a torus as a test object, I imagined that if I created a character and cut out the alpha of their animation, I would lose limbs or other parts of the body at some points in the animation. The edge shader is fairly simple - I have a surface shader with a color ramp with sampler info feeding into the v coordinate if the UVs. You know, fresnel.
Initially I had an identical fresnel network (but in black and white) hooked up to the transparency of the model and I thought, it looked great! The inner parts of the model were already cut out! yay! Saves me some time...
Until I saw that the back outlines still show through. Drat.
I would like to look into another solution for preventing the back-face normals from reading as renderable, but for now I settled with setting the inner part of the edge shader to pure black. Since it is a surface shader, the light will not effect it, and I can take the black out as an alpha later.
So I jimmied up a quick rig and made a test animation!
2. So Many Alphas!
After completing the animation, I needed to set up a few different render passes for compositing. I used different render layers in order to create images with the proper levels of black and white so that if they didn't render with alphas, at least they could be converted into masks or keyed. The first pass is the "Beauty" from which I want only to see the orange outlines. Since there is nothing in the background, the images should render with an alpha background, and the black inside will be premultiplied out.
The second render layer just uses black and white surface shaders on the model and an object in the background. The black surface shader accounts for the whole model - including the part covered by the line. This is necessary to mask out the model from the background, since the beauty alpha will only have two white stripes in the positive portion of its alpha.
3. Compositing is Magic
I'd love to try this in Nuke, but After Effects is what I have on hand - and a darn good tool to have on hand anyway! I brought the final renders into AE as image sequences.
I created a quick patterned background in photoshop - this is the pattern I wanted to show only inside the torus.
Next, I used the "full alpha" as an alpha inverted track matte... | and dropped the edge images on top! Starting to look pretty slick! |
I dropped in an additional background for some appeal! I almost stopped there, but I did have an ambient occlusion pass...
I decided that a touch of AO would hint the animation's 3d origins - and help get a bit more of the depth detail back. I multiplied the AO on top of the final image, and ViolĂ ! I got the final composited animation. Overall I'm fairly pleased and would love to experiment with different models and methods for this effect. Looking forward to it!