More Terrain Time
Today I get a few more days terrain time thanks to a postponed meeting, which was really supposed to be day one of my Physics work. I just could not resist continuing to add the eye candy and get the demo 'just so' before moving too far off my present mark.
Monday I finished the water shader, water effects code and added a better sky box texture to give a high definition feel to the whole scene. I then must have spent two hours just moping about making terrain, cutting out little rivers, playing with my height and paint editing tools to see what kind of landscapes I could come up with. During my 'fun' my mind raced about more editing tools I could implement, more refinements to the shaders, optimizations that fit the way I did some things and a general need for more plants, rocks and bits of scenery detail.
I think the screen shot I have not is pretty darn good, but I am going to stick to Rick's guns and refrain from putting any 'suspicious' art out there :) Only a few more days to wait, and I think we will be using a 'terrain shot' for the next TGC newsletter so there will be no doubt you will see all this soon enough.
It might seem adding water and new sky was a relatively trivial affair, but the very subtle code I added attempted to best some of the tricks done in high rolling games. Little things like a subtle fog effect, not to cull distant objects but to provide a misty sense of distance (and I mean VERY subtle).
Another trick. courtesy of Evolved, is to use a water mask texture to describe the edges of a lake or body of water. This ensures the water does not look strange when bumping up against solid geometry and is a great substitute for a depth read. I also had a few ideas where I could hijack the other channels of the water mask to describe depth, and use a nifty pixel shader calculation to shade the refraction map darker as the water gets deeper, like you would see in the real world. Alas these are all what I call 'nice to have' B list items and should not get in the way of my goals on this occasion.
I was tempted to make the 'maybe awesome' demo use post processing effects such as bloom, depth of field and haze effects (for the desert heat) but again for the above reason refrained. These can be added later, and are not what we all agree are 'essential features' of the engine. Hopefully my terrain demo now stands on it's own without the smudging effects of post processing.
Now I feel the demo stands alone for a presentation, I can move onto more serious matters such as re-coding and cleaning the prototype to use a data structure and resource numbering set that can drop right into the main engine and map editor IDE. A terrain editor is no use as a prototype! Hopefully this task won't take too long, and the subsequent introduction to the IDE will go smoothly if I do this preliminary step correctly.
Once the above is done, I will be free to resurrect the Bullet Physics prototype I very quickly knocked up before my holiday. It attempts to operate a 'character controller' walking over a 'height map', which is actually quite ideal as I could drop it into the present terrain module. From there, which is no small trick to get all that set up and running properly, is to then add a few dynamic and static objects to test performance and stability of the floor.
We don't want a repeat of FPSC Classic with enemy characters suddenly disappearing through the floor and into infinity! I am hopeful the new Bullet physics system will provide many wonderful toys to Reloaded in time, and if I can get the basics working great, the rest will follow smoothly.
My schedule puts this week down as pure Physics coding, so the sooner I can get off terrain and onto physics, the sooner I can get them both integrated and start the inevitable tweaks to ensure they all play nicely.
I am quite looking forward to creating a sphere and rolling it down a terrain hill and watch it hit the water and start bobbing about, then cast some wind around and see it subtly shift position as it islands it's way around the pond.