Monday, April 04, 2005

I'm a Geek, Part 10

OK, now my render pipeline is really done. Really.

Once I got my matte and dirt passes all set -- each of which had further things to work out which I don't need to get into -- I moved on to the depth pass. And found that I was not happy w/available depth shaders for Maya -- b/c I want to be able to pull focus in a few shots, and be specific about the DOF and so forth. Someone has written a nice shader for Mental Ray to accomplish this, but as I'm using this as a blur pass as well, I needed something that worked in Maya Software.

So I made one.

A pretty nice one, too: It's controlled by a curve, the position of which represents the camera's focal point in the scene. The curve also has attributes for specifying the overall min and max depth range, and an "F-Stop" attribute for controlling how wide the DOF is. It doesn't correspond mathematically to a real f-stop, but it's a natural way for me to think of it so I scaled it to work more or less appropriately at values like 5.6, 1.4 and 22. It also has an attribute to control the falloff from the focal point to the edges. All of the attributes, including the position of the curve, are keyable.

Then to go with it, yet another MEL script that gets executed at render time that hooks up that curve to whatever camera is being used to render the scene, so that the distance is calculated from that camera, rather than some other point in space. I guess if I wanted it to be really accurate, I could have it grouped under the camera node so that the camera maintains manual focus when it moves, as opposed to "autofocus." But not right now.

So when in a month from now, I'm wondering why I'm still scrambling to finish animation -- I can read these last few posts and know why.

But hey, I want it to look good, too. And who knows, even though I keep thinking I wouldn't want to do this scripting/pipeline/rigging stuff professionally, I seem to spend a suspicious amount of time on it.

0 Comments:

Post a Comment

<< Home