More VFX History

This is another rant I went on many years ago. I’m posting it because, hey, I need content, and I think it’s kind of interesting. I’m not forcing you to read this shit.

Float has to do with Bit depth. In shake, we can store the information in 3 different bit depths, 8, 16 & “float” or 32 bit.

8 & 16 bit are pretty much the way most of us are used to compositing. We divide the brightness of the image from black to white into so many steps. In 8 bit, it’s 256 steps, or levels of grey. In 16 bit, it’s 65536 steps. Obviously with 16 bit, we have a lot more gradations between black and white.

Floating point is new, and until recently somewhat unique to shake. Essentially, the idea is that instead of breaking up the shades from black to white into discrete, separate levels of grey, we can code those numbers as “infinitely” small decimal values. So between black and white, instead of roughly 65k steps, we can have an infinite number of steps.

There’s another aspect of floating point that can give us problems, especially if you come from other packages. Instead of just having black and white, and all the shades in between, I can have superwhite & superblack. White that is whiter than white.

Shake likes to deal with what we’d call “normalized” numbers. What that means is we’ve all agreed that the number “0” means black, and the number “1” means white. It’s arbitrary, though there are perfectly good reasons for this convention.

Floating point lets me have numbers higher than 1, or less than 0. Since this is kind of new to most people, that can be weird. And a lot of the gags we are used to doing in other packages (like adding a couple of mattes to make a combined matte) don’t work the way we expect in floating point.

Your problem is that your data in the Z channel is also stored in floating point. This makes good sense for z information. Z info is not made for human eyes. It’s data, indicating how far in depth something is from the camera.

So what you want to do is “normalize” your z-depth information so that you can view it. This is conceptually simply (get a luma of a z-channel, is what most people say), but it’s technically more complicated.

Our biggest problem is that we don’t know what the numbers are in the z channel without examining it, and we can’t “see” the information because it wasn’t made for human eyes. So, here’s what I do.

Take your image with z information. put a bytes operator on, and set it to 4 bytes (or floating point). This makes sure that the rgb channels can store the sort of information that normally lives in the Z-channel.

Okay, now put a reorder on the Bytes, and set the reorder to “zzzz”. This copies the z information into the red, green, blue & alpha channels.

Fine, but you can’t see anything. The image might be all black, or all white, it depends on how the z information was created and what it represents. Now the rest of the explanation, I have to wing it, because:

  1. I don’t have shake access to shake anymore.
  2. the values you get will be different based on the image.

Okay, look at the image coming out of the reorder. Like I said, probably all black. Go to pixel analyzer (it’s a tool in the tab on the upper right hand quadrant). There should be a button there that will let you analyze the whole image. Click that on.

Now, you see the patches, I forget, they’re marked something like low, avg & high. Click on the swatch that is low, and you should see numbers showing up in the red, green, blue values. For conversation, let’s just say the numbers you’re getting here are -527.

I want to set this number to black (or 0). So go get an add operator from color, and type in 527 into the red, green, blue & alpha wells. That’s set the lowest value to 0 now. Render this image in the viewer. It’s probably still messed up, maybe it’s all white now.

Fine, go back to the pixel analyzer, do the same thing, but this time you want to find out what the highest values are, so click on the high swatch. So, let’s say the number you’re getting here says something like 20.

Good, now put a fade on after the add. In value, type in 1/20, or 1/whateverNumber was in the high values.

Finally, you should see your z information. Okay, just to make it easier on you from now on, why not just throw a Bytes operator on after the fade, and set it to either 2 or 1 bytes (I would probably go with 1, but there are plenty of good reasons to go with 2).

Leave a comment

Your email address will not be published. Required fields are marked *