Huge animated lines will look just fine, in motion. Dawn of War used them, many other games, it's fairly believable. Drops will require giant CPU loads for a fairly minor increase in detail, frankly- each point in OpenGL is a non-negligible load, and using points would mean that it'd require far more points than lines. Points could be used to generate "splashes" on the ground at random, though, that might be really cool.
As for clouds... User, this should be a Gadget, not a Widget, because it can affect gameplay. I think that your new approach with fog, making it a separate Gadget, is the appropriate way to go- sometimes a map designer will want fog and rain, sometimes just rain, sometimes just fog, and keeping them separate is probably best, unless there is a technical reason for putting them together (i.e., performance).
It'll be tied to a specific map, and the map designer can give the sky appropriate clouds, etc.
I'll get some rain sound and wind sounds done for you this weekend, User.
no, the first versions of this used points to make the splash, it didn't look good, because the points in open GL are square.
i work on them in widget form, because it is easier to test it, if i used a gadget, i would have to make a text command to switch on or off, which is annoying.
i am working on a new fog, it will use many low poly spheres, and a small ground fog, or maybe a billboarded square, that rotates as the camera rotates, to be always on its front, i am not sure which would be best.
With the rain and wind, it'll be best to play them randomly, and they're designed to "overlap" a little bit, so that there's always at least one playing, to keep it feeling right- having the sound ever stop completely during a rainstorm would be bad, imo.
Please let me know when you're ready for me to convert this, I'm getting closer to testing stages now, and I'd like to see the total performance hit of this plus fog on the World Builder showcase map...
argh wrote:Please let me know when you're ready for me to convert this, I'm getting closer to testing stages now, and I'd like to see the total performance hit of this plus fog on the World Builder showcase map...
Wait some more, i will remake this widget, because huge lines for rain looks unrealistic and weird, i will try to make small animated drops, that are affected by wind, gravity and those stuff.
I will make a new fog effect, that will use billboarded textures, like explosions effects, but it will draw them around the camera.
Are you going to be ready to release this within the next few days? I'd like to test this, and get this integrated with World Builder before I release the beta, if it runs acceptably fast...
It's not a Gadget. Can't use something like this, if it's not a Gadget, it has gameplay effects. Haven't got it working yet as a Gadget in SVN yet... will test the Widget version in SVN now...
Aside from a few minor polishing issues and major speed problems, this is incredibly cool. I'm going to test and see if I can get performance to behave a little bit better, and get the Gadget version functional.
try removing cloudpoint[6], and raindrops[4] and raindrops[6].
they are not used.
you should try playing with gravity modifier values, they can be set to negative(makes rain drops go up), 0(makes them stop falling), and to really high values.
I've gotten a Gadget working, that's more suitable for what I wanted to do with this (almost done cleaning stuff up). Basically, I've removed the clouds and the sphere, because we don't need either, for a map where it's supposed to be raining all the time- I can just set up the sky, etc. to reflect that.
However, one major problem remains. Basically, your code's distributing all of the rain particles over the entire map... whether or not the user can see them in their POV. I think it needs draw them in an area around the user's current POV, instead, and increase the number of droplets based on the camera's height Y. This will save on particles in most views, yet perform far better and look better than the current arrangement, imo. Can you do this? I'm not familiar with Spring's camera functions, but I'm quite sure that something like this, updating (for new raindrops only, of course!) every half-second or so, is the way to go here. It's absolutely great seeing all of the rain come down, now it needs to perform fast enough to be usable, and I have to bump the raindrop count over 1000 for it to even look halfway like it's raining- that's too high, and consumes far too much CPU.
Let me post my modifications of your code, when I've cleaned it up a bit, and let's see if we can get this tightened up a little bit more- I'd love to see the World Builder demo with rain and stuff.
Oh, yeah... and I'm writing a much faster lightning method, too!