Saturday, March 10, 2012
Me vs. Lighting
I just had an "Aha!" moment followed by a big sigh of relief. I just discovered that I'm not as stupid as I was starting to feel.
I have been trying to add lighting to the model since I started and have been hitting major roadblocks every step of the way. This is the reason that the model has been mostly uniformly lit from a single direction.
What kills me is that a big chunk of my real-life career was spent as a theatrical lighting designer and technician. I swear I know what I'm doing when I can get my hands on a wrench. However, I'm not a 3D artist and everything there is to know about building this simulation is learned as I go.
So, not knowing any better, I just grabbed a bunch of virtual lighting fixtures and went to town. Trouble is, the lights would behave very strangely. They would spontaneously change dimmer levels, have weird shadows, and even point in directions that made no sense. I briefly had lights in the theater but it looked so bad that I removed them out of frustration.
Today, I did some research and found out that my problem was not the lights themselves. It was the surfaces that I was lighting. The 3D models have these things called "normals". I won't bother explaining, but the short story is that I was using the normals wrong. I fixed that thanks to some explanation in a Unity forum and BOOM, everything is working like it's supposed to.
I'm adding proper lighting to the ride scenes that are already in now. I may get some lighting into Captain EO and Image Works in the next release as well. Until then, please enjoy the screenshot above of the first lighting fixture in the model to work correctly.