Customization is very near and dear to both Brian's and my own heart, so it's no surprise that a high level of customization is a big goal of ours in ZeroGear. While Brian has been working on our physics and camera system, I had some time to play with Ogre's material system. After a little bit of poking around I developed a system to let us have user-customizable color on most anything we wish. After implementing it on most of our existing assets I spent a while time trying out different color combinations. Here are a compilation of some straight out of the Ogre model viewer.
I start out by making sure that all the areas that are going to be re-colored in the material system are desaturated. Things that are not going to change color (such as the tail lights or mud splatters in this example) remain full color.
Then I make a solid white color mask of the parts of the texture I am going to be filling with an RGB value. Then in the material file I tell the engine to fill the mask color with the desired color and then combine it with the black and white base texture.
We will hook up a color picker widget in the game gui to supply the material with whatever color the user wishes to use for his kart or character or other accessories.
Alright, enough of this "art" nonsense. Time for some code updates!
I was looking for a good solution to creating a GUI system and found Navi. We have been using it for our GUI elements inside the in-game editor we are developing and I wanted to show my praise for the beauty that is a web-based GUI.
Navi is a GUI library for Ogre that allows somebody to create the look and feel of a GUI element entirely in HTML + CSS + JS and whatever else Gecko (Firefox's renderer) supports. Check out the Screenshots to see what this looks like.
Using Navi + Lua has allowed Dave to design GUI elements in Dreamweaver and me to code all the logic associated with it in Lua. This means that I only have to touch about 10% of the GUI related code which makes me a very happy programmer.
Here is another test of rimlighting, this time on our spaghetti west track. If you view it on Vimeo, I think you can see it higher resolution.
ZeroGear rimlighting test 2 from marshmonkey on Vimeo.
It works much better on this track. One thing I discovered is that applying this effect requires a lot of tweaking the amount of rimlighting for individual materials. For instance, a lot of shading might look neat on the cacti to make them pop out, but the same amount on the ground would look quite odd. A lot of time could be spent adjusting. I imagine that Nintendo spent a lot of time tweaking the specific amount of rimlighting on all the objects in Super Mario Galaxy. Here is also an image showing the difference with the rimlighting effect on and off.
Inspired by Super Mario Galaxy, I wanted to see how rim lighting would look on one of our track environments. I was already planning on using rim lighting on the characters and karts but this might look nifty too.
ZeroGear rimlighting test from marshmonkey on Vimeo.
I think it would look better on the tracks that aren't so white already, I'll have to try it on a different track next.
Time to put another pot on, I just recently took an opportunity to become un-employed, which means I'm going to be busting my butt a lot more on ZeroGear and any other freelance work that happens to walk my way. As the first act of my new non-job, I have hacked together this blog to share our progress and keep us motivated.