Retexturing renders using UV passes / compositing in Shake
Mar 13, 2008 in geektalk, shake tools, visual effects
As I'd mentioned before, this blog is going to get more technical and I'll be spawning off a personal blog shortly. For now, bear with me non-technical readers: I'm about to talk geek for a bit. When I was teaching at FullSail, a lot of my "curriculum development" time, as well as a substantial portion of my free time, was spent doing R&D on advanced topics - things that are done at a handful of visual effects studios around the world, or even things that nobody was doing yet except in university settings.
Things like relighting using what's called a bent normals pass (a special render pass that contains information about the direction a point on the face of an object is pointing) - a process that enables you to gain a fair bit of control over how the rendered object appears to be lit, long after the frames have left the render farm. Other experimental tools like an algorithmic forest and crowd generator, or today's topic: retexturing in the comp, instead of at rendertime.
There are a couple of tools for doing this already: basically, you render out a diffuse color pass, full intensity colors, no shading, but instead of finished shaders, the elements are textured with these especially bright and colorful red/green gradients. The color of each pixel corresponds to its relative location on the UV map, so even after the texture is wrapped around an object and that object viewed from an arbitrary camera position, each pixel still holds information about its original position in UV texture space.
Now, most of the tools I've seen for this sort of thing will apply one texture to one UV pass. Certainly an exciting demonstration, but hardly practical: a typical scene will often have dozens of texture maps at the very least, frequently hundreds, even thousands. Naturally, each of these may be rendered as a separate UV pass, and each separate element brought into the comp: but that can make for some pretty unwieldy scenes and a headache to maintain all those passes in the pipeline. Re-render an animation, and the number of potential UV-passes can quickly make each iteration into a big undertaking.
Of course, if you're dealing with 8-bits per channel UV-coordinate textures, like a typical JPEG, then your possible texture size to project onto that is fairly small. 256x256 to be exact, and for practical reasons, maybe only about half of that. Hardly anyone even uses textures that small in games these days, let alone feature films. If you crank those UV-coordinate textures up to 16-bpc, now you wind up with some pretty impressive texture space: each of the red and green channels can now represent up to 65,536 coordinates: the equivalent of 16 4096-pixel-wide textures. Even if we want to be similarly conservative like in our above estimate, you can see where I'm going with this...
So my tool, which I call "OpaqueWhite ReMap Plus" uses nice, big UV coordinate textures, all generated by your rendering application in 16 or 32 bits per channel, rendered as described above as an unshaded UV-coordinate pass and is designed to accept up to 16 separate textures at a time, anywhere from 256x256 to 8192x8192. I provide a collection of high-res, high-bit-depth UV-coordinate textures for users to set up their render with, and a tool that is able to interpret the data from that render pass and automatically re-plot the texture in the render-specific UV space.
There's a lot more stuff going up on the site shortly. It's ALMOST THERE, I swear. To those that might be interested, you can learn a little more about and (soon) download my Shake Tools here.
