Page 1 of 3
Weather, Rain
Posted: 29 Feb 2008, 19:47
by user
it has animated drops now, it looks much better.
current state:
that screen has 10000 water drops falling.
the first version of the new rain.
18000 drops, with the new clouds, the drops are affected by wind.
here is a video that uses the modified rain widget and the fog widget.
http://www.youtube.com/watch?v=G0Nb-TSMttA
Re: Weather, Rain
Posted: 01 Mar 2008, 10:37
by NOiZE
Can we have "less" rain. More like drops instead of huge lines?
Re: Weather, Rain
Posted: 01 Mar 2008, 11:48
by Argh
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.
Re: Weather, Rain
Posted: 01 Mar 2008, 12:26
by 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.
Re: Weather, Rain
Posted: 01 Mar 2008, 12:36
by user
any idea on how to make a config file for this?, so it can be customized easily.
Re: Weather, Rain
Posted: 03 Mar 2008, 18:37
by Argh
local WeatherDefs = {
RainSize = 1.0,
StormSize = 1.0,
StormFrequency = 10,
LightningFrequency = 30,
RainColor = {0.4, 0.4, 1.0, 0.5},
LightningColor = {1.0, 1.0, 1.0, 1.0},
}
Etc., etc., either in the Gadget itself (preferred, as map designers will want to customize per map) or in some other file that's VSF included.
Here is a link to some wind and rain sounds. Public Domain.
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.
Re: Weather, Rain
Posted: 03 Mar 2008, 22:42
by user
renamed the fog sphere to ambient sphere, it sounds much better.
argh,i will need your help to convert all these widgets to gadgets later,
i have the ground fog done for now.
Re: Weather, Rain
Posted: 12 Mar 2008, 13:27
by Argh
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...
Re: Weather, Rain
Posted: 26 Apr 2008, 16:14
by user
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.
Re: Weather, Rain
Posted: 26 Apr 2008, 19:09
by user
updated the first post, to show the new widget.
Re: Weather, Rain
Posted: 26 Apr 2008, 19:12
by imbaczek
this looks much better than the previous rain. well done.
Re: Weather, Rain
Posted: 27 Apr 2008, 18:43
by Argh
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...
Re: Weather, Rain
Posted: 27 Apr 2008, 21:37
by user
i can post it here now, i just need to edit some things in it.
but the clouds don't move, and currently the rain sounds aren't being played.
Re: Weather, Rain
Posted: 27 Apr 2008, 22:18
by user
uploaded current version,
get it here.
the config that comes with it, is slow, will lag a lot, change it before testing.
there are text commands in it, this means you can change its settings in game.
the command printconfig is useful for copying the config you made to the lua file.
Re: Weather, Rain
Posted: 28 Apr 2008, 00:08
by Argh
I'll test that asap...
Re: Weather, Rain
Posted: 28 Apr 2008, 01:05
by Argh
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...
Re: Weather, Rain
Posted: 28 Apr 2008, 01:11
by Argh
Tested the Widget version.
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.
Re: Weather, Rain
Posted: 28 Apr 2008, 01:32
by user
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.
Re: Weather, Rain
Posted: 28 Apr 2008, 01:55
by Argh
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!
Re: Weather, Rain
Posted: 28 Apr 2008, 02:10
by user
maybe i could use DrawScreenEffects for that, not sure if it will work, but it is the best way to draw things only on the view.