whether or not to do weather.


I have weapon generation in (simple) and also ship engine fire (looks cool!) Actually there is a problem with the ship engine fire, basically it looks a bit too distracting (arrgh!) which interferes with one's ability to steer the ship. But I'll leave it for now because it looks cool. I might just make it a little fainter and see if that helps. I also implemented garages, so you can recharge your ships energy core/shields at most cities now.

@p So putting in weather systems now, I guess I have quite a bit to think about. A general list of features would have to include (in no particular organization):

@p - clouds

@p - rain

@p - snow

@p - ice crystals, maybe also hail

@p - thunder/lightning

@p - fog

@p - dust storms

@p - wind storms/vortices/tornadoes

@p - solar storms

@p - meteor showers

@p Additionally, weather should be dynamic; this dynamic cycle has to be fixed according to game time (i.e., it's always evaluatable as a function of T) Some parts of a planet should be able to be rainy/etc. without other parts being so. Weather should change with altitude, but it can be uniform across the surface of the planet (i.e., if it can rain on a planet, it shouldn't neccesarily everywhere but it's ok if it can rain anywhere.) Clouds, lightning, and meteor showers should all be visible from space, but the others you'll only see when you are on a planet.

@p I recently read a cool article on gamasutra about using impostors to do clouds. I think maybe I should re-read it and see if I can think of anything. I don't have time/cpu/gpu (but mostly time) to implement such a sophisticated system, especially considering autogen requirements (or maybe that isn't such a problem, I guess I'll know after I re-read the article.) But there may be core ideas that I can adopt.

@p Rain/snow/ice/fog (maybe) can be implemented a few ways. Well basically I see two main ways, and maybe a combination of them. You can do a simple thing in screen-space, i.e., you put some kind of rain texture over the whole screen. It's so so easy and for this reason may be the first system I implement; actually I have this for the stars already and it looks quite cool and sophisticated if done well. You can also add raindrops/snow/etc. in world-space, using a particle system. An old demo did this for snow on Gaspar. It looks nice and has the added benefit that the snow makes space feel more "3D" but it's a bit harder time/cpu/gpu wise. Not really much harder though.

@p I think maybe I should do things in world-space, at least rain and snow. For rain, it would actually work fairly nicely to have a different system altogether than snow. Snow I can do the old way, so you can see each snowflake drifting peacefully (or whirling around as the case may be). With rain, I can use some kind of system where I draw a bunch of lines or quads randomly each frame, the idea being that raindrops fall so fast you don't see them fall individually. If I had even a few fixed models, say about 10 of them in var mem, which were, say, 2x as wide as the rain zone, with many raindrops each. I could render them with some simple random offset transformation each frame, keeping everything nicely in the GPU and not having to worry about memory bandwidth while being able to render lots and lots of raindrops if need be. I can alter the density of the rain field by rendering more or fewer of these models. They really probably do need to be quads, although it might be worth it to try lines first and see what it looks like, upgrading to quads if neccesary. Lines might look great at 640x480 but too thin and crappy at high resolutions.

@p Snow should be done with a simple particle system, by now this is so easy and there are extensions that can make this fast.

@p If I implement rain and snow as above, I can re-use them in useful ways. Mainly, the rain one can be used to render ice crystals, sun storms, whatnot, while the snow one can be used to do other effects, for instance, a planet that has ash falling down, or leaves, or other bits of fluff (yaaaaay for suspended fluff!)

@p Fog is trickier, because you need to see that there is some kind of fog, but I'm thinking I can do this with two tiered approach. Basically, have a simple mesh model of some kind indicating that there is fog, we can draw this as additive mixing. As you get closer, the model fades out, and we add a screen-effect instead. This can be done for clouds too, I think. So I suppose clouds/fog can share the same effects code. Of course there is already fog code that is in to make things that are far off look a bit foggy but I mean a pea-soup kind of fog or mist that you fly down into.

@p Lightning shouldn't be too hard. All I need to do is draw lightning bolts and such. Meteor showers and tornadoes and whatnot also needn't be too too hard, as they can just be basically AI drones that happen and use normal models to render their effects, in the case of tornadoes adding some nice physical effects too.

@p So I guess the place to start is rain, and snow, which will require separate renderers. Then I can move on to clouds, which is likely going to be a fair bit harder. But all of this after I re-read that article!

2004-05-17


◀ Back