My previous post I talked about the vehicle behavior for our new game. I got it almost up and running. Although I still need to tweak and enhance a couple of things, but I am fairly happy with it. We’ve also got some animated water in it. It flows and has a sin wave deforming the 3d model. I think it looks nice, although Director still doesn’t support any fancy features like render to texture or shaders. The 3d engine is almost 10 years old and we have to work with the features available. So we throw everything over the CPU and hope we still have some left for the rest of the game :S Nevertheless, I hope you can see all effects and play it for yourself as soon as possible.
For now I wanted to talk about some other water effect: rain! Which is cool! I like making special effects! Don’t get me started about particles and the likes as I can talk about and tweak them for days. A nice side effect is that I can avoid talking about mathematical stuff in my games. I suck at math, so I’ll leave that for Stijn ;)
If you take a look at our previous games you see that most (if not all) have a very sunny and bright setting. Most of the artists here prefer it that way. I think it has something to do with the Dutch weather… Sometimes though, we do need a visual weather effect like snow or rain. Until now we mostly got away with it, by completely ignoring it and tweak the colors, lights and fog settings of our 3d world. We never got around to actually build and implement a visual rain effect. This bothered me a bit and for this game I scheduled time to actually build and implement a system that could handle this (and snow). Normally when I build these kind of systems I make sure they are modular and can be implemented in all of our games.
After some research I decided to make a system that would display a rain effect in 2d. It is a bit of a shame, I know, but I had to do this because Director simply isn’t fast enough. Ideally I would want to use some readymade particle systems (either my own system or Directors built in ones), but they simple aren’t flexible or fast enough. Placing billboarding sprites in the 3d world with an animated textures wasn’t a real option either as I think it will cost too much time for an artist to place all sprites. Creating a system that would automatically place rain sprites in the world could be possible (there are a number of solutions for this), but I didn’t opt for this as it would simply be not fast enough as well. Director doesn’t do batch rendering (combing models with the same shader to be processed as one) and, furthermore, needs to send all mesh data of the 3d models to the GPU each frame. We’re losing quite some CPU power here, so I had to think of something else.
|5 Rain layers in front of the camera.|
|Rain effect in action!|
The last thing I normally do when I design and build system like these is add a sh*tload of parameters and settings. I think it is important to have a very flexible system so I can display all kinds of rain setups. However, I simply don’t have the time (or want to) create all kinds of setups myself. With all these settings the artists or (level)designers can create almost all types of rain or snow they want.
Until next time…