Friday, July 29, 2005

MaxScripted Character Rig

I'm taking a break from shaders for awhile to jump headlong into something else - MaxScritpt! I've started work on a new script that will allow me to build all of the bones and rigging for a character with one click. It's been a little bit of a challenge for me to get started doing this since I have to look up almost every thing that I want to do - but it will be worth it.

The cool thing is that I can put a lot of effort into this script upfront so that it creates a really nice rig. Then all my future characrters can have a very nice rig. In the past I've only had time to build nice rigs for the main characters in the game and the others had to have simple ones mainly because of the demands of the schedule. With a scripted rig, all the character rigs can be very very good - because they all come from the same script. I can use my time to refine the script, customize each rig a bit, and make the skinning better instead of doing the tedious work of laying out bones, creating controllers, wiring things together, etc. The script will take care of all of that for me. I'm excited about it.

So far I've got a script that creates the legs of the character. I'll post updates here when I make more progress.

Thursday, July 21, 2005

My Company Is Hiring

The company that I work for, Vicious Cycle, is currently looking for several new people to fill out our team and staff up for upcoming game projects. If you have experience working in the video game industry as an artist, programmer, or level designer this just might be the position you're looking for. You can find out more information on my company's web site here:

http://www.viciouscycleinc.com/careers.php

When you apply, be sure to tell them that you heard about the postion from me.

Tuesday, July 19, 2005

Additions to Normal Map Shader

Some of the guys over on the Polycount board have been asking for some additional features to my normal map specular shader (the one with support for three lights) so I updated the shader to add them. Here's what I changed:

The shader will now work on ATi cards! Instead of doing all three lights in one pass and blowing the instruction count budget, I split it up so that each light gets its own pass.

I added a color specular mask texture. This means that you can control the color of the specular highlight per-pixel with a texture map. Before I was just using the alpha channel of the diffuse texture as the specular mask - so per-pixel color adjustments weren't possible. Now they are.

I added a check box that allows you to quickly switch back and forth between the ATi and Nvidia formated normal maps (negative and positive Y). This makes working with both formats more convenient. Right now it's happening in the pixel shader - but I may try to switch that so it happens in the vertex shader for better performance.

I'm happy with the way this one turned out. With these changes, it should be a useful tool for working with normal mapped models in 3ds Max. You can get the updated version of this shader here:

http://www.bencloward.com/shaders_NormalMapSpecular3lights.shtml

Also available on that page is a new version of the shader that uses the alpha channel of the diffuse texture for transparency. I think I'm going to work on this version of the shader a bit more and then maybe I'll add these features and updates to all of the other shaders - where they apply.

Saturday, July 02, 2005

More New Shaders

Recently I've been working on lots of personal projects. I've been writing new shaders as well as learning the basics of Max Script. I've learned a lot, but I haven't had much time for blog entries.

On the MaxScript front, I'd like to learn to write Max Scripts for character rig automation, so you can just run the script and it builds the rig for you. So far, I've written a script that generates some point helpers. Then you put the helpers where you want the character's joints to go. Then I wrote a second script that connects those points with bones. It's all very basic so far. I'm just getting my feet wet.

On the Shader front, I've created two new shaders that I posted on CgTalk. Take a look at them here.

The first one is an eyeball shader that does refraction of the iris and caustics from the cornea. I'm pretty happy with how it turned out. Here's a sample pic:

Eyeball Shader

The second one is a metal shader. It lets you control the shininess/reflectivity of the surface per-pixel with the alpha channel of the diffuse texture. You can use it for all different types of metal. Here are some of the metal types I came up with:

Metal Shader

The thing that I like most about this one is that I finally figured out how to use actual high dynamic range floating point cube maps for image based lighting. These really add a lot to the realism of the scene and make everything look more vibrant. I couldn't use them before because FX shaders in Max only support DDS textures (and a few other LDR formats). Now that Photoshp CS2 has support for high dynamic range images (it has great tools for working with them), I'm able to save my cube maps in 16 or 32 bit floating point DDS!

Feedback on these is much appreciated.