Blinn-Phong vs. Phong (dirty rumors about the half-angle vector)

Most “standard” real-time lighting models are based on either a Blinn-Phong or Phong specular reflection model. Dirty Rumor #1: Phong is often touted as being more accurate because it uses the actual reflection vector, whereas Blinn makes use of the half-angle vector. I have seen several posts saying things along the lines of “you should use the hlsl reflect() function to get the true phong reflection instead of using the half-angle vector”.  Seems reasonable, right? 🙂 The funny thing is, it’s not! According to verification against observed data, Blinn is...

read more

Look out for Quiet NaNs!

NaN stands for Not a Number, and is “a value or symbol that is usually produced as the result of an operation on invalid input operands, especially in floating-point calculations.” My first experience with NaNs in CG was when I was working on Scooby Doo 2. I was simulating curtains on top of live-action footage in Maya using Syflex Cloth and rendering them using mental ray. I kept getting strange black specks in my renders (only a single pixel in size), especially while rendering with heavy motion blur. After doing some digging I realized the black specks were NaNs being generated...

read more

Some trouble with cubes and spaces

Today I had a pretty unexpected problem. In a full-fledged “wtf” moment, I suddenly realized that our cubemap reflection shaders have been utterly wrong throughout the entire development cycle. I don’t mean just a little incorrect, something that is a bit hard to discern. I mean like this wrong: Yeah. Don’t ask me how, or why. I can’t believe that no one has noticed this, or if they have, didn’t say anything! A bit annoyed at the interruption in my workflow (I thought I was about to whip out some animated self-illumination for our reflective metal shader),...

read more

Shader writing tools and resources

As Technical Art Director on our largest project, I’m doing a lot of shader writing these days. When we started out I established a core library of FX shaders the artists could use in the 3DSMAX viewport. These shaders were ported to the game engine by the Lead Graphics Programmer and have been used throughout most of development. Our work is now becoming more complex in the final months of the project as we are focusing on all sorts of effects to bring the world to life. I’ll be sure to create a post-mortem on the project when it is completed, but for now I’d like to share...

read more

A little background…

Like most of my peers, I grew up on games. When I was just a little tyke my parents saw video games and computers as something special that would define my generation, or at the very least, keep us 5 kids out of their hair so they could do (arguably more boring) “adult things.” Whatever it was, I will always remember the TRS-80 and it’s cassette tapes from Radio Shack, our (several) Atari 2600’s we picked up with $0.50 – $2.00 games at weekend yard sales, our various varieties of Apple computers (IIe, IIc, IIgs), and my dad’s monochrome IBM followed by a...

read more