Monday, December 28, 2009

Maya/Mental Ray: Portal Light

Was looking around at some lighting/rendering sites and noticed how often some people use the portal light/sky light in mental ray. Not much stuff about that, though, regarding Maya. So I thought I'd throw up a vid about what it is and how one might use it. It's a pretty cool shader/light that solves a couple of specific problems and can actually be used in bunches of other circumstances. Some more info can definitely be found at Zap's site and Andrew's site.

Maya/Mental Ray: Portal Lights

Friday, December 18, 2009

Maya - Rigging a dynamic hair system (or one hair anyways)

Here is a video about how to set up a rig for a strand of hair (or anything else that requires some dynamic simulation, like a tail or a wire or whatever). The basic concept is to use an IK spline and blend shapes to get a rig that is fully blend-able between dynamic and manual animation and still give full control over the dynamic component of the rig. It's a bit long (about 40 min), but has the theory behind the rig and pretty much the full setup in Maya.

Maya Rigging: Dynamic/Manual Hair Setup

One more time, for realsies this time

With feeling this time . . .

The Needful Head is for sale on Amazon! By the gods, it's frackin awesome! (can you tell I've started watching Battlestar Galactica?)
Rich made another banner for this holiday season (last year was kind of wash out with distributor issues) so the push is on. In case you didn't catch it in the business pages, we're up to #158,542 in the amazon dvd sales charts! With a huge holiday surge we can catch "Alluvial Deposits in the Nile Delta: The DVD". Those guys at the Geological Information Network think they're such hot s*$t. Let's take em down a peg!
The link to Amazon is here. (look around and you can also find the downloadable version)
The website is here.
Don't buy this crap:

Thursday, December 17, 2009

Maya - Rigging a no flip pole vector for a leg

Here's a MUCH quicker video about rigging an IK leg with a "no flip" pole vector. I'm definitely on more solid ground with rigging stuff than the Mental Ray stuff :)
Anyways, the idea is to create leg rig with a "knee twist" attribute so that you don't have to animate the pole vectors (most of the time). I prefer animating this way- a bit cleaner and works better for me most of the time.

Maya Rigging: No-Flip-Leg Pole Vectors from zeth willie on Vimeo.

Maya Mental Ray - the basics of linear workflow

Finally had a bit of time, between all of the stuff (work, teaching, life), to create a few videos tutorials!
I love it when people take the time to create detailed tutorials and I've watched more than my share, so I thought it would be fun to make a few myself. Since I'm teaching animation right now, I'm always talking about that and I'll eventually throw some stuff up about animation things related to my class, but for now, I'm mostly doing stuff that I think is more interesting to me lately and maybe a bit more esoteric. Definitely not super advanced stuff for the most part (unless you're a total beginner, which is cool too), but just sort of picking and choosing what I feel like exploring. Some of it is might be a bit complicated and specific, like some rigging stuff, but others are about stuff I'm just learning the finer details of myself, like the mental ray joint that follows.
BTW, I know that I can be a bit over-explainy and pedantic sometimes. So sue me. Too much classroom time (I was a HS teacher in NYC before I started digital stuff). But I hate it when people assume I always know what they're talking about when I don't. Just went to my finacial advisor and WHOOSH. Right over my head. Didn't understand a word. Sometimes the simple stuff is interesting to me too, dude. I went a bit crazy with the first one, so it's in four parts. I also get a bit fast and loose with the specific lingo sometimes (gamma correction, gamma encoding, float, HDR, etc). Feel free to correct anything that's wrong or bugging you in the vids, or let me know and I'll do it.

Anyways, I'll throw a bunch of posts up as I see fit with the rest of these mama-jammas . . .
part1=gamma, part2=basic workflow, part3=real workflow, part4=basic post stuff

Maya/Mental Ray: Linear Workflow Part 1

Maya/Mental Ray: Linear Workflow Part 2

Maya/Mental Ray: Linear Workflow Part 3

Maya/Mental Ray: Linear Workflow Part 4
Here are some of the links I mentioned in the video:
1. The man, the myth, the legend . . . Master Zap

2. djx talks about linear and gamma
3. Andrew at 3dLight talks about linear for Maya/MentalRay
4. floze does a tute about linear rendering in a series of interiors
5. A long CGTalk thread about the topic
6. A much more detailed Mental Images thread
7. A detailed article by Yves Poissant on Tone Correction
Good lord. Here's a couple more for post-production stuff:
1. A bit of AE stuff
2. S'more AE, a bit more complicated this time
3. A good generally useful pdf

Sunday, December 13, 2009

Maya - AddDoubleLinear node, the better way

This is a quickie. I've actually got a few videos with some slightly more interesting (I think) tutorials that I'll post up later.
I hate the +/- Avg node in Maya for adding two numbers. It usually takes some fussing to get it work correctly (I think it might even be buggy, or at least poorly conceived). So I usually use the script editor on the bottom left corner to create an "addDoubleLinear" node. This is more straightforward . . . takes two scalar inputs adds em and gives a result. Just type "createNode addDoubleLinear -n *name it what you want*".
The only problem is that this add node doesn't show up in the hypershade, which is where I do most of my connections. So here's a better way. . .
Create the ADL node like you'd create a mult/div node or other utilities with MEL. Instead of "createNode", use "shadingNode -asUtility addDoubleLinear".

This creates the ADL as a utility which shows up in the HS window under the Utility tab. Now you can finally sleep at night!

Tuesday, September 29, 2009

s'more scripts

A couple new scripts and some slight revisions of previously posted ones. First the old . . .
zbw_attributes.mel (rt_click "save as" to download)
Previously, I had a color slider just to change the color (via color override) of multiple controls at once. I've added some new stuff (or rather I made a different script and added the color stuff to that). Basically, this script will lock or hide (or unlock/unhide) all or any of the standard tranforms from the channel box. So for an FK controls that just use rotation, you could select all of them and lock and/or hide all of the tranlates, scale and visibility. The color stuff is also here, but in canvas format instead of slider format. The slider was just a bit too random for my taste.

Same playblast script that was up before, just changed the background toggle to a canvas format for ease and added green so you can quickly key a test playblast into your comp or storyreel.

I'm working on a job that requires me to have LOTS of objects in the scene and mess with them a bit to add a bit of randomness, so I wrote two quick scripts. This one will take a selection of objects and randomly remove a certain percentage. So if you wanted to change the shader on some objects or offset the animation on some objects, you'd select them all, then run the script and remove whatever percentage of them and go for it as a subgroup of the whole. This runs a random check on each object vs. the percent you enter.

This script takes a selection and performs a random transform on each object based on the info you enter. You can do translation, rotation or scale (or all of them) either in world space or based on the current position. It cycles through the objects and calculates random values for each attribute for each object, so for lots of objects it may take some time. The example below was 2500 objects and 6 attributes and it took a couple of minutes. But I've had lots of situations where this would be useful, so I thought I'd script-ize it up.

As always, the code is a bit crude at times (no dummy checks on object types, etc). Maybe I'll clean it up later, maybe not ;)

The basis for the randomizing scripts was something like this:

As I said, there are about 2500 objects in the scene (placed by hand). I used the selection script to select a few squares here and there to change shaders to dirty up the mosaic. I wanted the pieces to blow away (based on objects in the 2d comp) but didn't want to deal with dynamics. So The random transform script was used to add a key frame to each object. Basically this whole animation is two keyframes on each object. One in place and one with the random transform script. I then selected a few and offset those two keys a frame or two a couple of different times. Took about 5 minutes total (2 of which were waiting for the random calculations). Not perfect, but quick and dirty (like I like it).

Monday, September 07, 2009

OMG - The Needful Head is available!

How could I have forgotten? Redoing a couple of jammy's on the site, but The Needful Head is now available on! Really shameful lack of shameful self promotion by me! Let me correct that. . . .
Here is where you can buy the DVD. It's nice. No really. There is a little making of section (mostly for my family, so they can see what I do) and you can listen to Halli's music and read the original book and there's a commentary and all kinds of other great stuff. (actually I think that's it).
You can also direct download it, too. Actually all of the options are here. If you want to purchase the institutional version (?) I strongly encourage that, too. :)
We thank you for your support . . . (Bartle's and James wine coolers anyone?)

Some more work doodles - vids soon

I'm actually in the process of figuring out how to get some demo videos up with good quality. My animation class is starting soon and I'm gonna put some of the stuff (or least Related stuff, hopefully animation, modeling and rigging vids) up here as videos, probably through Vimeo. Work has kept me really busy, though. I'll post some of the work stuff up here soon, too. Have bunches of it from the summer, but too lazy to pick it from my clients. Anyways, here are some more random doodles.
BTW, Richard Bailey is working on a new series over on his blog. Good stuff as always from ol' Richy.
As always, click for larger.
really no idea what this is. Maybe related to Dan Simmons' "Ilium". Liked that book. "the Terror" too.
I'm thinking about an animation about a science experiment gone wrong. These are some prelim doodles.
Been watching some physics lectures from Stanford on YouTube. I'm a nerd, this is Prof Susskind
no idea, but somebody pissed at something.

Tuesday, July 14, 2009

Work doodles from June July

Been Working a lot in the past month or so. Which, of course, is good. But leaves less time for doing other stuff, like fun things for the blog, Ilksville, Psychemy, and some more tutorials for my NYU class. But I get paid (not paid like Eric B. and Rakim "Paid in Full", but paid like normal slobs like me get paid), which makes up for a lot.
Because I was doing quite a bit of rendering, I had some time to doodle. Thought I would throw some up here. These are just things on scraps of paper while I'm sitting around. . . (click any of em for larger)

roller ball pen, guess I was into sports that day
pencil, rock n roll!
pencil, shmarmy dude
pencil, one of the guys I just worked with had impossibly good posture
sketchbook pro

I'm thinking about doing some "cel" animation, but i'm not loving the way Flash is drawing. Wouldn't want to use Photoshop and exporting things are a bit of pain from Sketchbook. Maybe I'll try drawing in Corel. I hear they have some animation layers/tools. Anyone have any ideas?

Friday, June 05, 2009

a few bits and bobs to start the summer

I've been pretty bad about posting with any regularity. Been a bit busy with the family and a lot of the things I've been working on aren't terribly conducive to interesting blog posts, some MEL scripting and playing around in XSI, Nuke, etc. Hopefully I'll get more up to speed this summer.
A few random things . . .

1) added a couple new things to my reel. Again. Not a ton of new stuff, just some 3d tracking stuff and some bits of the Nick stuff (which never got used). Here's a quick hit of a couple of the many Nick pieces we did. (FYI, I modeled a bunch of it, rigged much of it, and animated all of the first bits and some of the last bits)

2) Rich and I did another quick Ilksville thing, "half-shell smile". Trying to keep chugging along with it. It's tough cuz we've both been busy. Got one more cooking as we speak.
videolarger version here
BTW, congrats to Rich on his installation at the Artomatic show! If you're in DC in the next month or so, go and check it out!

3)Here are a few of the doodles from Corel Painter that I've been playing with.

click for larger

4) I've also gone back to modeling a bit more of the Psychemy guy. As I've talked a bit in my animation class at NYU about modeling for animation (however briefly), maybe I'll post up some of the modeling process for the body and such.

5) After a big of a hassle with distributors, I've finally reorganized things to get The Needful Head DVD a proper home. It may take a few days to for things to get sorted with Amazon, but once it's all working, rest assured, I will pass along all the relevant links.

Thursday, April 23, 2009

3 channel dirt passes

Another technical post about using multiple channels in one image to allow more control in post production, this time with dirt maps (I know some people/software use the term to refer to ambient occlusion maps, but I'm talking here about actual dirt or grime).

The basic premise here being 2-fold: 1) the use dirt maps to create a more realistic look, rather than worrying about bump maps and the like, and 2) to be able to use generic dirt maps to create a bunch of different looks in the final render by combining them in one rgb pass.
I'm going on the basic premise here that often in production you don't actually need bump maps to rough up a surface. Adding dirt to the specular/color components is often just fine to create a rough surface look. This technique is actually applicable if you do use bump maps, you'd just add another pass of three combined bump maps in the color channels (more later).

So what am I talking about? Let's say we have the following image:
(click for larger images)
and we want to dirty it up to get something like this:

Just a bit of dirt to give it some texture or character.
If you knew what you wanted, etc. you could just add the dirt maps to the spec shader, tweak it out to get what you want and render. But the way I'm approaching this allows for loads of changes in post and requires little thought in 3D. This isn't necessarily for every shot or production, but its really useful when you just want to generally dirty stuff up.
Here's how we do it, again using multiple channels to hold multiple images.

This scene in Maya is super simple: Just a sphere and some lights.

I've got three different dirt maps that vary in the size and "frequency" of the dirt (it's basically just black and white images of splotches and splooches if you know what I mean). Here's what they look like mapped onto the sphere:

So I have 3 B&W dirt maps. I map them individually to the R, G and B color channels of a material or surface shader. (one to R, one to G, etc) This will give me a false color image with 3 different images in each of the color channels which I'll pull apart later in post. I also have my spec shader and my color shader.

If I was clever, I would have done the combining of the images in photoshop to get something like this:

Then I would map each channel to the corresponding channel in the dirt material. But I'm wasn't clever here and used each image separately in Maya. No real difference, just more parts.
Then I'll set up my render layers. One for color, one for spec, and one for the dirt.

And here are my renders. Again the dirt will be pulled apart to give us more options in post.

So onto Shake (though, of course, After Effects or Nuke or whatever could be used). . .
The idea is that I'll use each channel of the dirt map separately and get 3 dirt maps from this, which I'll use to muck up both the color and the spec passes.
The basic operation I'll use in Shake is a "reorder" which just puts one channel into all of the other channels (ex. red channel into red, green and blue channels). I keep the alpha. I use a "compress" node to dial up the blacks and whites to the values I want (like transparency but just with color).

Here is the comp below. I've pulled two of the channels of the dirt on the left side, multiplied them together (we want only the dark bits) and multiplied them to the spec pass. This roughs up the spec. Then on the right side, I just copied the dirt nodes, changed the compression a bit and multed them to the color pass to dirty that up a bit also. Then I "added" the dirtied spec to the dirtied color.

Here are the passes once I've tweaked them in Shake (color, spec, dirt):

Once again, here is the final result, with the spec added to the color and both roughed up by the dirt maps.

I know it seems like a lot of work to do this in post rather than doing it in the render, but in fact, once you get the hang of it, it's actually easier and certainly more flexible. For example, I can instantly change both the look and intensity of the dirt right in Shake.

If I wanted to include bump mapping in this, I would simply create three bump nodes in Maya with a basic texture and map the color ouputs of those into the R, G and B channels of another shader (say, a surface shader) to get a "super bump" pass. I could then dial up and down any of the three bump maps in post the same way.
As I said, this isn't always the most efficient technique for every job, but if you export out the dirt map shader, you can instantly add grunge to any object you like and then have some more specific control in post.

Thursday, April 02, 2009

Watch out for the render ninjas . . .

On ur computrz, ajustin ur gamma.

a bit of painting. . . and jealousy

. . . So the other day I checked out the blog of this dude, Mark Behm, and I was blown away. I LOVE his paintings. I scroll down a bit and turns out he's also an awesome illustrator. Ok, makes sense. Keep scrolling and see that he's also a sick sculptor. Wow. Turns out he's also an amazing 3D modeler and texture artist. What? And he's got videos that demonstrate that some of his paintings are done in, like, 10 minutes. On screen. Man oh man, that's impressive! I click on a link and it turns out that he also animates feature films. Ok . . . now I want to kill this guy.
What the hell? Sooooo much talent. I linked to his site over there ------>
He is the first person I've linked to that I don't actually know. Does he care? Probably not. Too busy doing all that fancy art stuff of his better than 99.99% of people in the industy. Dick.

Anyways . . . he inspired me to realize that I suck, so I've decided to try being a bit more serious about drawing and painting. Not too serious, cuz then i might feel foolish, but a bit. Of course, ACTUALLY painting is a big step. So, instead, I'm gonna try to do a quick number in Corel Paint each day. Only for 30 mins or so (ok maybe an hour) just to try to get back in the swing of things, that is, to the degree that I was ever in the swing of things. Here are my first few efforts. If I ever do anything thereafter that I decide I like, I'll post it, but certainly not daily. This is more of a public benchmark for myself, I guess, to see if I get better later.

the "under coat". This is the stuff I forgot that I don't really know how to do well. . .

this is with muck painted over the last image.

today I saw a stupid trailer for "Wolverine" and then did this.

Hopefully next week I'll be able to post up some new Ilksvilles and maybe some other work. Otherwise, you can find me staring at this guy's blog and crying . . .

Monday, March 30, 2009

Been way too long - Ilksville update, doodles, etc

It's been a while since I've posted, mostly not my Fault. We moved (only 10 blocks, but the hassle is still pretty much the same). Been working a ton. Teaching twice a week. Daughter's first birthday. Ex-cet-er-a, Ex-cet-er-a.
But I'm back and I promise to never to be gone for so long. Until such time as I need to be.
Anyways, I'll post a couple of technical things later, but just a quick catch up.

• Been playing a bit in Sketchbook Pro. Really cool program. So simple. I know Photoshop can do all kinds of crazy things and you can make your own brushes and defrost your Xmas turkey and blah blah, but all I really want is something to doodle in that can reasonably simulate pencils, rollerball pens and some markers. I love that there is almost no interface and almost no options other than transparency. Great for quick little sketches, storyboarding doodles and the like. Wouldn't do a serious image in it, but great for jotting down ideas.

• On another app note, just finished a serious 3D tracking gig and got to say PFTrack is still my favorite 3D tracker. As if you care.

• Rich and I are back on Ilksville, after much delay. Spent a day or so adding some front and back cards, cleaning up the sound and reframing the older ones and another day making a new one, "one woman show". Believe it or not, this is STILL just audio we picked up while we were hanging out. No "acting". (you'll see what I mean when you hear it). Rich and I planning to start carrying around the audio recorder more often to build up our library of stuff. There's a couple more we can work with from what we have, but the well is running dry.
You can see the bigger versions of all the revamped clips here (temporarily).

• Would love to be able to post some stuff I've worked on the last year. Maybe soon. I'll just post a pic of one of the numerous Nickelodeon things I animated for a "rebrand" effort at Freestyle. Brian Drucker has bunches of images of it here. He designed it, so I'll let him show it off. My goodness, he has a lot of cool work on his site.

Saturday, January 31, 2009

Wrapping a 3D object in post

Another long technical post. Studio work brings it out in me. This one is for Rich.

Been working for the last few weeks on a big broadcast thing (can't say what). But came across a situation in Maya that I've come across a few time before and never had a good solution for. It's probably that I'm just dense and there is an easy solution, and I've certainly never researched it extensively, but it's kind of annoying. Here's the situation:

I have a circular object (or a sphere, or a spiral or whatever) and I need it flowing or spinning around an object. Normally, not a problem, I'd just put the center object (or a card with video of the object) in the 3D scene and render it that way. Just did that recently on shot with faces inside 3D bubbles. But often, as is the case here, the video that needs to go inside (or sandwiched between) the 3D object(s), needs to be put there by someone else after the 3D render, in the edit.

In this case we've got clips of talent and video that hasn't even been shot yet, let alone color corrected or finalized in any way. So I need to somehow make a tool kit that allows for things to go IN FRONT OF AND BEHIND ONE OBJECT AT THE SAME TIME in an easy way that an Avid editor can do without much instruction from me.

Example. How do I comp this assuming things are moving around and flowing, etc.

The most obvious way is to just mask things by hand (ie. lay the 3D on top and mask out the back sections). But in these shots I'm working on, there are LOTS of pieces and they're all spinning and moving,etc. Don't want to ask someone else to do it and I definitely don't want to get stuck with it. The other solution is to just reframe stuff or change the shots. That would make me feel JV, and wasn't really an option here.
So I thought about for a few minutes and came up with two solutions, both kind of similar, but slightly different in terms of workflow:
1) create a depth shader for the 3D objects that is binary. That is, beyond a certain distance it's black and in front of that distance it's white. Then I'd render the scene normally and use the output of the shader to mask either the front or the back.
2) use the camera clipping planes to chop the render in half and render two separate passes, one for the front half and one for the back half.

I ended up choosing route #2 because it seemed to be the easier thing to pass off to the guys in post. I also KNOW what will come out, basically. The renders on this project are relatively simple, etc, so I think it'll work just fine. I think there are advantages to both methods, and I suspect now that the depth based solution would be the more robust one in many cases, but granting that, here's how I created a workable solution:

As I said, the objects and cameras are moving around, so I needed something a bit more flexible than just typing in numbers. I wrote a script that creates a distance tool between an object (can be whatever transform you want) and the camera. The script just uses some conditional nodes to pump in the distance to the object's pivot to the far and near clipping planes and switches them based on an attribute in a null group. So I can just select the circle (or a locator parented to the circle) and the camera and run the script. Then I set up render layers with the switch set to "near" and then "far" and render the two layers. I get the scene rendered with just the front and then just the back and I can just hand off those two renders.

In post you just sandwich some video in between these two renders. Easy to understand, I hope, for the editors.


Here's the script I wrote: zbw_splitPlane.mel
Some limitations of my method (which is why I'll probably redo it the masking method, at some point) are that you won't get reflections (I don't think) from objects in front of the split plane. Not really a problem in my shots, cuz there's almost no reflection and things are really zipping around.
The only thing I could see possibly going wrong the masking/depth method would be that things crossing (front/back) could create issues when you actually want to see something in back, but it is occluded by an object in front. There would be no way to get images of JUST the things in back.
Anyways, if anyone has any other thoughts or ideas or solutions for this type of thing, I'd love to hear them.
As always, re: scripts, my code is inelegant and usually just me hunting and pecking around for ideas that work. Don't judge me, just love me.