Jump to content
Eternal Lands Official Forums
ttlanhil

New Weather

Recommended Posts

video mode I have is 6 as well, it's a standard one, so it won't be that... hrm...

do you have it installed to a second EL directory that might not have all the files, maybe? I don't know what could cause this problem

 

the other option is if you can compile from CVS... it's now in, and only needs -DNEW_WEATHER (and -DDEBUG if you want to be able to trigger weather)

 

on the third hand, I could put up another client with the weather stuff... I'll put up another one shortly (as well as a new clean-cvs one, which won't have the ability to trigger rain)

 

ed: done

Edited by ttlanhil

Share this post


Link to post
Share on other sites

okay, I've had a talk with entropy about how this'll work, some changes to what I have above

 

replacing the start/stop rain, and removing the need for start/stop wind:

 

Uint8 SEND_WEATHER Uint8 type Uint8 direction Uint8 intensity

 

type will be WEATHER_EFFECT_WIND or _RAIN or _SNOW or _LEAVES, etc, of the available options (exactly what weather options will probably vary :happy: )

direction will still be in degrees/2 . or to look at it another way, a circle with 180 degrees. 90 is south, 0 and 180 are north

intensity will be between 0 and 100, assuming 100 is about the max you'll get

 

because this is a protocol change for existing code, there'll also be changes outside of -DNEW_WEATHER to handle that (though not much, just to call the old functions as needed, until -DNEW_WEATHER becomes the default)

 

the loading of weather files locally will be removed, the server will be sending what type of weather

we'll always assume an allowed variance of +/-10% instead of the server setting it

 

I'll make the changes for the networking/etc soon

Share this post


Link to post
Share on other sites

okay, the code is now in CVS... the current networking functions are all still there, so until the server code is changed, the only difference you'll see is that the loading of weather types from a file is gone

there was changes from previous plans, and some clarifications...

 

an enum instead of defines

weather accepts multi-packets (same as add item. proto, len, data, len, data, len, data, etc)

if type is directionless, then direction is used as delay (eg, start-rain's seconds_until_start)

a second start of rain will update the severity, but not the time-till-start. so start-30sec-20% followed 10 seconds later by a start-10sec-100% will give 100% 30seconds after the first call

when adding a rain type, the intensity is clamped to {0, 1}, but then you get that much of that type. other current types will be reduced if needed. eg, if you have snow at 50% and add rain at 60%, you then have 60% rain and 40% snow. however, then setting rain to 0% will leave snow at 40%

if you start multiple precipitations and want to stop only one of them, you can either start that one with an intensity of 1% or increase the other rain type percentage(s)

 

until there's server support for testing, I think this is done* :)

* well, we can always add more weather types in the meantime if entropy likes them

Share this post


Link to post
Share on other sites

I'm getting

Premature start of weather effect!

messages (in South Redmoon Island).

 

Probably not a problem, just thought I'd mention it :blush:

Share this post


Link to post
Share on other sites

I'm getting

Premature start of weather effect!

messages (in South Redmoon Island).

 

Probably not a problem, just thought I'd mention it :(

 

Had the exact same message outside SRI storage.

Share this post


Link to post
Share on other sites

Maybe it would be nice to let snow stock on the ground. For example add 'snowlevel' for region with snow, and map snow texture

if alpha < snowlevel (though I dont know if such thing is supported in gl)

Share this post


Link to post
Share on other sites

If being abit idling and especially when going AFK, and having the client in minimized mode then you get:

Premature start of weather effect!

and

Double stop of weather effect! (or alike)

 

Also the thunder/lightning is FAR too frequent... when did you last have thunder like every 15/30 minutes as soon as it got abit cloudy? I haven't had any lightning IRL for like months... It's really annoying with the massive blinking some times... Also the lightning effect seems to affect only certain areas of the map, not the shadows, and alot of effects going on in the water, while the ground almost says same.

Share this post


Link to post
Share on other sites
Premature start of weather effect!

Probably not a problem, just thought I'd mention it :)

nope, that pair of messages is simply saying the server is sending messages before expected... they won't show up with the new SEND_WEATHER protocol, which I assume will be sent by the server at or after the client update
Maybe it would be nice to let snow stock on the ground.
it would, and have the rain/etc cause ripples in the water, and such, but that's a bit more complex to do... it may happen some day :)
Also the thunder/lightning is FAR too frequent... when did you last have thunder like every 15/30 minutes as soon as it got abit cloudy? I haven't had any lightning IRL for like months... It's really annoying with the massive blinking some times... Also the lightning effect seems to affect only certain areas of the map, not the shadows, and alot of effects going on in the water, while the ground almost says same.
guess what? that has nothing to do with the new weather settings. thunder is sent by the server, not made by the client. the difference is that it's a bit more noticable (because it flashes instead of a fade) with new_weather

not affecting shadows correctly is also not new, that happens with the old weather as well.

as for water vs ground... eh? there's no positional weather, the only thing is that you may notice the colour change more in the water

Share this post


Link to post
Share on other sites

guess what? that has nothing to do with the new weather settings. thunder is sent by the server, not made by the client. the difference is that it's a bit more noticable (because it flashes instead of a fade) with new_weather

not affecting shadows correctly is also not new, that happens with the old weather as well.

as for water vs ground... eh? there's no positional weather, the only thing is that you may notice the colour change more in the water

 

Yes, I know that... :) Maybe it doesn't make sence to you but logic says that it's good to report faulties to the person actually working with the function... I can't just go to ent and say "do this do that" about "your" function...

 

Just because it's old it means it should stay that way? Sure there is alot of work to get the shadows affected but still, at least you could document it somewhere.

 

Yes, I guess it's the color change but the water goes from what ever color to pretty much white so it doesn't look too good, which is why I mentioned it.

 

Bug reporting/fixing and listening to testers is a part of development... maybe you can't accept and understand that but well that is fact. So skip the "attitude"...

Share this post


Link to post
Share on other sites

Ok, since I finally compiled a client myself I started to test this!

I used the -DDBUG option as well as -DNEW_WEATHER and I have the eyecandy too.

 

I made a file:

cont2map23.elw

0 0 1000 1000 2

 

.elw is placed in the maps folder.

And I don't see any snow at all ;)

I did press ctrl+shift+home. got the red message..waited for minutes..nothing. The thunder did crackle, and the lighting showed-however the lightning is now messed up. It looks like you have a totally white EL screen for a split second. It no longer lights up the 3d environment.

 

Another bug with the new weather:

The fog doesn't work anymore.

Share this post


Link to post
Share on other sites
I made a file:

cont2map23.elw

0 0 1000 1000 2

 

.elw is placed in the maps folder.

And I don't see any snow at all :lipssealed:

as I posted above
okay, I've had a talk with entropy about how this'll work, some changes to what I have above

 

the loading of weather files locally will be removed, the server will be sending what type of weather

meaning which type of rain will be set by the server, not from file
The thunder did crackle, and the lighting showed-however the lightning is now messed up. It looks like you have a totally white EL screen for a split second. It no longer lights up the 3d environment.
I don't know why this is happening, the lightening in new-weather is a lot faster than before (which is appropriate for lightening) but it's otherwise the same... a bright flash that affects the 3d environment, not the screen... and this is how it works on my screen right now as well.

maybe you have some other compile options that cause it to not work properly, although I don't see why that would happen (except for maybe the new-lighting, that might have caused some changes)

Another bug with the new weather:

The fog doesn't work anymore.

I hadn't noticed this until now, but yes, the fog isn't showing up. the problem is, it did when I was working on this. I'll have a look around and see if I can find what has caused this (I have a few suspicions)

 

ed: well, checking the simple things didn't help... and a more comprehensive search for when it stopped working would take a while, thanks to all the activity for eye-candy and other changes since I worked on the weather.

unfortunately I don't really have the time to go through this, and it's a bit late for another debugging cycle that may require large changes... plus radu said that it won't be in the coming client release anyway.

so work on this can wait until after the client update

 

so for now, no-one should be using -DNEW_WEATHER unless they're interested in developing it (on the other hand, apart from the rain/fog not showing up it'll work just fine, so it's not a danger to use, it just won't look quite as good)

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Ok, also after the update, if you can make a testing command that will make the snow, sand, lava, basically all the weather effects appear so we don't need server support to be able to see/test them that would be great.

Share this post


Link to post
Share on other sites

humm. should be simple enough to change the debugging command for start rain so it cycles through effect types (although that won't do the mix that well, but that's probably not a big deal)

Share this post


Link to post
Share on other sites

Test results of NEW_WEATER in Irsis and PV:

 

- rain starts (OK)

- fog comes up (OK)

- scene suddenly becomes dark, no transition (probably not OK) (02:00 game time)

- lightning strikes (OK)

- rain stops (OK)

- fog goes away (OK)

- smooth transition to daylight (OK)

 

Observed in PV and Ida:

- go into a cave/dungeon (not a house)

- leave cave

- scene is dark

- scene switches to bright daylight when ingame minute changes

 

/EDIT

could this thread be renamed to NEW_WEATHER?

Edited by Florian

Share this post


Link to post
Share on other sites

I was looking at the newest client compile and playing around with the fog.

 

When it rains, with the fog on it is way way too thick, it makes it unplayable with the fog on:

Zoomed out:

fog1.jpg

 

Zoomed in:

fog2.jpg

 

No fog on:

rain1.jpg

 

Also, all the rain drops are small dots, all going the same speed, and the same size(from what I noticed).

Anyway to make some appear longer and go faster? I'm trying to think of how rain looks more irl..perhaps it is due to some being closer/some farther away.

 

I didn't see the snow yet, but the same principle can apply for snow. Snow flakes many times fall slowly, not in a straight line down like rain(unless the rain goes diagonally).

Share this post


Link to post
Share on other sites

Winding back the fog is simple enough, so that I can do.

 

The rain, yes, they're currently all dots (GL_POINTS, as a matter of fact).

The old style used GL_LINES, to make it look like the rain was thicker, but it doesn't look realistic (IRL, a falling drop of water is roughly spherical, although it may appear to be a streak as an optical illusion).

Some moving at a different speed is not, AFAIK, realistic, for any large variation.

And the rain drops already do have a small random value used in movement.

They could be made to move faster, the drops are, perhaps, unusually slow compared to IRL, but you can actually watch them moving (when far enough away). The old rain was a line in a random location (which repeated regularly, it's only random the first time), which moved way too fast to be watchable.

 

I do have a particle system that Xaphier coded using shaders, which would be far more efficient as well as allowing a bit more freedom in size/etc, for computers that support shaders... However, working on that is a long way away, if I work on it at all. The current NEW_WEATHER, although not well tested and a bit more demanding of the computer than the old weather (since the old weather 'cheated' with lines to make it look like the rain was thicker), is still an improvement (IMO) over the old weather as far as realism and appearance.

 

There is also support for wind in the code, which would make rain be able to go diagonally, same with snow and sand and all... And the different precipitations have different weights, and hence are affected a different amount (hence the snow, which is lighter, should show more evidence of variations in wind, moving a bit more erratically, as well as being slower to fall).

However, to see the different weather patterns, and the effects of wind, you have to edit the code.

weather.c line 422 or so has

//If this function was called, then we're not type-aware
set_weather_ratio(1, 100);

You can change the 1 to another type:

0 = NONE

1 = RAIN

2 = SNOW

3 = HAIL

4 = SAND

5 = DUST

6 = LAVA

 

At some stage Entropy may have time to add server support for the different types of weather... At that stage, some tuning of values may be required, but the code itself has been finished (apart from one bug introduced in the mean time, which wasn't noticed until right before the update) since a few months before 1.4; so it's ready to go

Share this post


Link to post
Share on other sites

Maybe it's just me, but I did like the "lines" of rain that are in the old weather. It looks more like a strong rain, whereas the "dots" of rain look more like a light shower.

Share this post


Link to post
Share on other sites

Figured I should also post this here because it relates to the new_weather.

 

With new weather compiled in the client:

clouds1.jpg

cloudslight.jpg

 

With new weather not compiled in the client:

clouds2.jpg

 

 

 

Something with new_weather is messing up the skys(both day & night).

And lastly, the Render Fog does NOT work with New_weather, unless it is raining.

Share this post


Link to post
Share on other sites

I still have yet to look at snow/sand, but the rain really needs to be tweaked. You can't even tell that it's raining if you zoom in. It seems that the raindrops just fade away as you zoom in.

 

There also seems to be a bug with the overall ambient light when it's raining. When I log into the game it's bright-as if it was raining during the day with the sun shining(not many clouds). After a time it pops into "dark cloudy" ambient light.

 

Still I think the old rain looks better than the new, so until things can get adjusted this shouldn't go into the official client.

Share this post


Link to post
Share on other sites

I don't want to butt into the middle here :D But I just wanted to say that I think alot of PCs may be running EL at too slow a frame rate to replicate the optical illusion of darting rain-droplets.

 

If this is the case maybe using lines is necessary for now, even though it assumes framerate lag kinda. Unless the client could render the rain per frame together to make the movement of the rain visible. That would take alot more programming though (if it's even possible) and probably eat client resources. A medium way might be to calculate the line length given the speed of the rain falling and the framerate. The danger of all this is that a user with a very slow framerate or lag might end up with a screen filed with lines.

 

Well I made my point and rambled some, the first paragraph is all I really meant to say. Goodluck everyone working on this, I have no doubt that the new weather will be greatly improving the main game soon enough :P

Share this post


Link to post
Share on other sites

I don't want to butt into the middle here :D But I just wanted to say that I think alot of PCs may be running EL at too slow a frame rate to replicate the optical illusion of darting rain-droplets.

 

If this is the case maybe using lines is necessary for now, even though it assumes framerate lag kinda. Unless the client could render the rain per frame together to make the movement of the rain visible. That would take alot more programming though (if it's even possible) and probably eat client resources. A medium way might be to calculate the line length given the speed of the rain falling and the framerate. The danger of all this is that a user with a very slow framerate or lag might end up with a screen filed with lines.

 

Well I made my point and rambled some, the first paragraph is all I really meant to say. Goodluck everyone working on this, I have no doubt that the new weather will be greatly improving the main game soon enough :P

Thats why the old rain was drawn as short lines.

Share this post


Link to post
Share on other sites

It certainly shouldn't fade when you zoom in, however the points use a lot less screen space than lines, so it may just be a lot thinner (which you notice more when zoomed in).

In nearly all of my testing I would have been at my FPS cap of 25, which should be possible with most graphics cards.

While lines may work for rain (to simulate the appearance of motion, which, IMO, doesn't look right), they certainly won't for stuff like snow (possibly hail, since that moves quickly, but the rest are all slow enough that you can expect them to be points). To have lines for some and points for others means you either do zero-length lines (which may not even get drawn by OpenGL), very short (which would then give you vertically oblique snowflakes), or some special case code (which not only means more places for bugs, it also means the code can no longer blend snow with rain to get numbers between the two which would be like sleet).

So IMO, using lines with NEW_WEATHER isn't feasible, so I guess this work is all getting chucked out, at least until someone sticks in particles or something (Xaphier's particles with shaders example was one of the things I was going to look at, it would have meant you'd see the points be slightly larger when you zoom in, as well as seeing detail on slower ones like snowflakes if they're close enough to the camera. GL points and lines don't seem to scale properly based on distance, but particles would).

As for snow/sand, maybe you should have a look at that. Line 431 in weather.c:

set_weather_ratio(1, 100);
First number is the type, (0 is none, then rain, snow, hail, sand, dust, lava), second is percentage (no need to adjust).

And the 'new' network protocol Ent wanted should still work, with old or new weather (it just forces it to be rain with old weather), so that could still be implemented on the server... Not that I'll hold my breath.

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Ok I will try adjusting those values to see what snow/sand/etc looks like.

 

(Xaphier's particles with shaders example was one of the things I was going to look at, it would have meant you'd see the points be slightly larger when you zoom in, as well as seeing detail on slower ones like snowflakes if they're close enough to the camera

 

Would this mean you'd use an actual texture for the particles of rain, snow etc? So you can use, for example, particle0.bmp in the textures folder as a snowflake?

 

 

With the rain in new_weather, is it actually moving in 3d space? If so it may be that as you zoom in the particles appear to be less because there are less in the area that you see. The problem is is that they are barely distinguisable from the background so it looks like there's no rain.

Share this post


Link to post
Share on other sites
Would this mean you'd use an actual texture for the particles of rain, snow etc? So you can use, for example, particle0.bmp in the textures folder as a snowflake?
Yup. According to the FPS Xaphier said he got with his... thousand or howevermany particles, it may still be very light-on in terms of computer power needed (although it will require a graphics card that can do shaders, which most can)
With the rain in new_weather, is it actually moving in 3d space? If so it may be that as you zoom in the particles appear to be less because there are less in the area that you see. The problem is is that they are barely distinguisable from the background so it looks like there's no rain.
They are, yes, and the alpha could always be turned up (actually, adjusting the alpha on the drops based on the camera zoom level may work... Zoom in more and you get a more opaque point... It's not as good as distance-based sizing like particles would give, but it may do the trick when zoomed in).

Share this post


Link to post
Share on other sites

It seems there is another bug. When starting the client while it is raining, it still proceeds to the do fade in (very slowly), which seems rather strange because the rain sound is started at full strength immediately.

 

I noticed it because when testing the sounds I was logging out in the middle of a storm and coming back to have it fade in, but it would look the same for someone who grued etc.

 

/edit: Ttl, are you planning on doing any more work on this? If not, is someone else interested in having a go at tweaking it to Roja's requirements? I'm interested, but kinda busy already.

 

I'd hate to see this go to waste because what little I've seen does look good, and I think the rain works well when its raining lightly.

 

I agree with not doing special case code, but at this stage I don't really see another way around it. I think the rain problem could possibly be fixed by adding a special case to draw lines as the rain gets heavier (maybe length based on strength of rain), and replace the code with particles when ready.

 

This is of course a bunch more work, especially because of the blending issues I guess, but at the same time a sleet look won't work without different sized particles. Can the blending be avoided easily?

Edited by Torg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×