Sunday, December 21, 2008

RGB light passes

Just a little thing about lighting/rendering/comping, based on what Josh Harvey and Eric Concepcion were doing for the Fusion Fall cinematic in the last post. This may be familiar to some people, but I hadn't seen it before in production, so I thought I'd give a little example. Josh was cool enough to explain it a few times to those of us who were interested and I think it's pretty cool.

The basic idea:
This is a really cool way to extend your flexibility in post-production. The concept is that rather than render RGB passes for the scene (or each light or whatever), you actually assign each light to a color channel and render each lighting pass with three individual light passes included. In essence, each light pass (render) will include one light in the red channel, one in the blue and one in the green. These are then used to reveal an ambient color pass of the scene based on each light channel. Let me show you with a simple example.

Example of RGB Light Passes (a simple version for clarity):
Let's say this is my scene. I'll do a simple 3 point light setup with a key light (directional), a fill (spot) and a rim (spot). I've added a bit of simple color to the character to make things more clear. Normally, I'd set up the lights, adjust their color and render a beauty pass (diffuse +/- spec, etc). maybe I'd add a shadow pass, amb occlusion, other passes, etc. But the idea would be that certainly the beauty pass would include all the lights. If I wanted to break out the lights for more control I would render a seperate RGBA pass for each light.
The idea here is a bit different. I'm leaving any light color info until post, so all I need to do is render the luminance (or diffuse/spec MINUS color) for each light. So I can use only one channel per light. It's a pretty easy setup actually. Only two passes (+ an amb occl pass, for fun)
First I'll take care of my color info. To do this I'll hide my three real lights and create an ambient light. You can do this from within the textures, by turning up the ambience, but I think it's much easier to turn off the ambience in the textures (you probly never had it on) and just make an ambient light. The only catch here is that the ambient light defaults to having an "ambient shade" value of 0.5, which sort of defeats the purpose. So turn that to 0.0 and make sure you've got no other lights on and render.

You'll get a pure color pass. Doesn't say much for my textures, but this is what I wanted.
This becomes the "base" for the lighting setup.

Now I'll take each light in turn and assign it's color to R, G, or B. My key light becomes pure red, fill pure green and rim pure blue.

Once each light is given a color, the render looks something like this. It seems very colorful, but really that's only because we've got a "false color" thing going on. The keylight isn't really pure red, it's just in the red channel to get it to post. Same with the other lights. (BTW, if you have more lights, you'd just do another pass with other lights in the RGB channels. You'd just do this whole process twice or more). Here's what the individual channels look like:

Now once we take it to post we can see why this method is actually pretty powerful.

Here I'm using Shake, just cause it's easier to see stuff and a bit less work/layers for comping. Could easily be done in After Effects or whatever. These are the only two layers I'm bringing for now (I'll bring in an AO pass later).

The trick is to seperate out the channels for each light and use THAT to matte out the color pass. So the light (from each channel) actually reveals the pure color, or doesn't. Basically making our own diffuse color pass. In Shake that's done with a "reorder", in After Effect it'd be a "shift channel", I think. (BTW, I'm sure there are few other ways to do this . . .)

You can see I created three reorders and pump the light pass into each one. Each channel gets shifted to red for the key, green for the fill, etc. Each one of those goes into a copy of the color pass as a mask (so it has the correct colors to reveal). So I end up with this node tree. (note: below the color passes are some "switch matte" nodes just to put the correct alpha channel back. I also added the Ambient Occlusion pass at the bottom of the tree)

To clarify each color pass looks like this when matted with the correct light channel.

Since we're just adding "light" to the scene, you can then just "add" each of these passes to each other to get the final fully lit image. (In After Effects or Photoshop, I'll just use transfer mode "add" to lay one on top of the other.) As I noted, I multiplied an occlusion pass at the end, also.

Finally, we can get to what's cool ab0ut this . . . Here's the image as it stands:

The power comes from my ability to now start adjusting each light/color pass. In Shake I just stick some nodes under each pass (in this case I just used a mult node to color each pass and fade node for the transparency of each pass):

By changing the transparency of each pass and the color of each pass you can end up with a huge array of options.

More theatrical?

More alien?

I changed all of that instantly, without any rerendering of anything. Notice that I've actually changed not only the color, but the intensity of each individual light on the fly. I could also change the gamma, etc for each light as I see fit, any color correction really.

This image is a bit dark and lo-res, etc, so it might not be the best example, but it shows the basic principles. There are lots of variations. You could do groups of lights per pass in a more complex scene, or render a FG pass, then add some subtle lighting effects to that with this method, etc. It's a great idea to render shadow passes this way by making the shadows from each light R, G, or B and seperating them in post. I wouldn't do this for everything, but for things where there's a more stylized look, I think the flexibility is invaluable. As I said, Josh and Eric rendered all of Fusion Fall this way.
Another bonus is the disc space it saves if you want this much control. Instead of an RGBA pass for each light you get three passes in one. I love the idea a reusing the channels for other things besides color. I'll do something later about RGB combo passes and ID mattes, etc. But that's enough tech stuff for now.

Sunday, December 14, 2008

Cartoon Network - Fusion Fall

One of the projects I worked on earlier in the year got posted recently, so I can show it. Eventually, I'll get this cut into my reel or on my real site, but the link will have to do for now.
Watch it here.
I got to meet lots of cool and talented people on this job: Josh Harvey, Nick Weigel, Stanley Ilin, Erol Gunduz, Roger An, Eric Concepcion, Ricardo Vicens, Dylan Maxwell, Ian Brauner, Jed, and all the cool peeps at Freestyle . . .
I did most of the rigging on it (all the human(oid) characters and the big green monster, plus some stuff on the bugs, the cars, etc). The most memorable thing about this job was that it was a psycho schedule and my daughter, Juliette, was born right smack dab in the middle of it (6 weeks early to boot). Since both she and the project turned out great, I have fond memories . . .

Some random Maya scripts

Sorry for a technical post, but thought it worth throwing these up here, if only so I could have them available wherever I'm working, in case I forget my drive ;)
BTW, I just threw these together while working to help myself out, make no claims as to their value to anyone else or my competence in putting them together. . .
zbw_playblast: (rt-click to dnload)
For when I'm animating. Nothing here that you can't do from the gui, just all in one place. buttons for toggling overscan, title/action safe and gate, renaming the playblast, changing the bkgrnd color, etc. When I was working on the Nickelodeon job (more later when it comes out), we had tons of things in the scene, so there's also a button to toggle on/off the curves/geo/other stuff.
zbw_groupOrient:(rt-click to dnload)
select the object/joint, then select the control for it and the script will create a group over the control, orient the group to the object, then rename the group to the control name + "_GRP". Useful for rigging.

zbw_changeColor: (rt_click to dnload)
Turns on the color override for selected objects and gives a slider to change color. Lets you do multiple objects at once, which is useful. Again, pretty much just for rigging.

I wrote a full body rigging script, which I'm still tweaking. That's a bit more complicated, so maybe I'll post something about that later.
UPDATE: Fixed links, sorry.

3D stock images

Been working with my Lovely, Talented, Smart and Lovely wife on a bunch of images to submit to a stock agency. Basically, just images based on globes. I can see why there aren't loads of 3D images in stock. They have to be rendered at around 6K (6,000 x 6,000 pixels). A lot of the ones we've been doing have depth of field, transparency and so forth, which takes FOREVER. About 3-5 hours per frame (I know that's not forever for some renders, but I'm doing 5 versions per image (US, S. Amer., Eur., Asia, Africa), each precomped on various colored backgrounds (15 images per concept). Some things don't work and some do (I rendered about 30 images at 4K, only to realize that wasn't high enough rez). I'm rendering them in little elements that Steph is then comping together. The upside is that with 30-40 pictures, we could probably get a couple hundred images through all the permutations. It just takes ages. Since I'm not a Render Ninja by any stretch, I'm trying to figure out the best way to attack these hi-res images as best I can.
Here are a couple, smallish, of course.

Wednesday, December 10, 2008

Nil doodle - animated

Just playing around for a few minutes in Flash. Don't know how anyone ever used Flash or Photoshop without a Wacom pen/tablet (I did for years). Absolutely different programs when you can draw kind of properly.
Anyways, as I said, I was doodling in Flash and started playing with a character that Rich and I were discussing the other day, Nil. We were talking about his head shape and translating it to 3D and I just started drawing him (not nearly as well as Richard does). Anyhoo, the resulting test is below. It was fun to draw something again, even just for 20 minutes. BTW, it was 12 fps drawn on two layers (head, arms). Hopefully more about the real Nil project later.

click pic to play the .gif

Oh yeah, also wanted to mention that I've been reading Ken Perlin's blog and put a link on the right side (over there --->). I've worked briefly with Ken on a project and he's near about the smartest computer-y type guy out there. But he's also a really fun blog writer ("blogger", I guess) about a lot of different topics, most of which require no p.h.d. so I'm throwing it out there.

Tuesday, December 02, 2008

Sure I'll work on your movie. Where's my trailer?

Rich and I got some work animating a few sequences for a movie some friends are making!
The Brothers Barnes shot a documentary about Todd Snider, called "Peace Queer: The Movie" and had a few interstitial moments they wanted to fill. They called me about some animation. The schedule was basically 3 minutes in less than 2 weeks to make their deadline for the South by Southwest festival. Yikes. So after throwing up in my mouth a little bit, I said the only thing I think I could do would be something along the lines of Ilksville. I showed then what we had done and Viola! They liked the style and I whipped up some storyboards and now Rich and I are furiously making the characters, backgrounds and animating away. When it's all said and done, I'll post some stuff up. It's basically just some Ilksville-ish charicatures of the subjects of the movie that Rich drew up, with the same rigging and animation procedures and such as I've mentioned here before. The only new thing is that there are some cuts to tell the stories a bit better.

It's a lot of work (relatively) in a short amount of time, but it's fun. I love working with the Barnes. Worked with them on some jobs for IBM/Lenovo and always like their stuff. Good to be back working with them again. So never let anyone tell you blogging doesn't pay off!
I won't forget my roots when I become big and famous. I bet Rich will. . .