Jump to content

0.90 Kerbal Weather Systems! Alpha 0.5.3 WIP! (Jan 2)


silverfox8124

Recommended Posts

We need a dynamo part, to build wind turbines...

Or a windsock part, using chute code...

Maybe @AlphaAsh might be interested in a few weather-related statics (weather station facilities, light houses, wind turbines)

We'd be able to build weather satellites to monitor conditions. Someone could build a meteorology mod.

So many possibilities. Love it!

Edited by colmo
Link to comment
Share on other sites

1 hour ago, colmo said:

We need a dynamo part, to build wind turbines...

...

We'd be able to build weather satellites to monitor conditions. Someone could build a meteorology mod.

That's literally what this sim is, and will have in it. Satellite parts are planned, and the mod had a turbine part before, that will make a return later.

Link to comment
Share on other sites

7 hours ago, colmo said:

Wow, ambitious. Will there be an API? There's bound to be other modders who will want to create add-ons.

Yes there is an interface/API which is open for public use. I will have more details on that as it unfolds, but it will give you all you need to get started and some info from the sim. Like, temperature pressure wind, all those variables inside the WeatherCell class I have going. Any questions about this you can hop onto IRC and message me in the special channel I made for KWS: http://webchat.esper.net/?channels=kerbalweathersystems

Link to comment
Share on other sites

22 hours ago, silverfox8124 said:
On 08.06.2016 at 9:51 PM, colmo said:

We need a dynamo part, to build wind turbines...

That's literally what this sim is, and will have in it. Satellite parts are planned, and the mod had a turbine part before, that will make a return later.

Omg wind turbines omg omg omg

 

Link to comment
Share on other sites

Thats a hell of a lot of cell information!!  (idle thought follows)  cells only loaded/calculated within physics range?       but then i suppose you have to calculate more than that because an aircraft traveling at even mach 1 is going to be zipping through those cells pretty quickly.

Link to comment
Share on other sites

15 minutes ago, SpannerMonkey(smce) said:

Thats a hell of a lot of cell information!!  (idle thought follows)  cells only loaded/calculated within physics range?       but then i suppose you have to calculate more than that because an aircraft traveling at even mach 1 is going to be zipping through those cells pretty quickly.

We calculate every single cell, regardless of it being in physics range or not. This is by nature of the sim, as each cell relies on the data in the cell next to it. Half the simulation functions off of this.  Mind you, these cells are also very large in terms of area covered. I couldn't go any larger in cell size without the area being too large to count as a single point. Anyways, all cells have to be loaded, and updated in the same cycle otherwise you mix dated data with new data and things are conceptually fcked at that point. Mind you, computers are also *really* fast. This entire planet can be done in 4.1 seconds with medium-heavy load on KSP, and 10.5 seconds with a much lighter load on KSP. taking only 0.0003 seconds, or 0.31ms to compute 20 cells every 20ms on my laptop. If you run a heavy install or dont have a decent CPU(>3Ghz) then 15 or 10 cells/tick will do you just fine.

Link to comment
Share on other sites

5 minutes ago, Gaiiden said:

What are the benefits of running the simulation within KSP?

uhhhh, direct access to KSP things for initializing the simulation, GUI stuff, the overlays, less code between the sim and ksp itself compared to the standalone version. Easier to write code for and manage it. this among other reasons I can't think of currently.

Edited by silverfox8124
Link to comment
Share on other sites

Will extra CPU cores be helpful in Unity 5? I built an Intel i7-5820k 6-core late last year in anticipation I'd need them!

I believe U5 spreads the load across multiple cores, unfortunately bugs and memory leaks in 1.1.2 mean I've seen all 12 virtual cores at 100%, which I had to exit X windows to escape.

The biggest winner of the API is surely the visuals guys. Rain, cloud, whitecaps on waves, wind (think how it would look in a desert biome!), fog, snow, tornados (does the sim create those?), all visually generated and moving on the fly.

Statics could react to the live data - wind turbines could point into the wind and change spin speed (turbines made of parts could be simulated physically, which would be more costly to performance).

Link to comment
Share on other sites

99% of weather phenomena should in theory be generated by the sim naturally as the conditions occur. (note: don't get liquided if you don't get a storm or strong winds or rain or anything at KSC for days on end, that's just how weather works.)

 

colmo, all the visual stuff is coming later, and will be done via KWS itself.

Also, the wind turbines and such already (when they were in the mod) reacted to the wind, they didn't really turn to the wind, but they spun and stuff.

As per the extra core stuff, that won't come in handy yet, it'll only lessen the load KWS has each cycle. Soon enough I'll get KWS to be multi-threadable and that'll mean you can max out those cores all you want.

Right now it's all about how fast one of your cores is.

 

However on a dev note, we currently dont have a way of handling named quicksaves, as KSP provides no means to give me said names without breaking forum rules via dirty tricks. So hopefully the next version fixes this, if not, then you all will have to refrain from named quicksaves. Also as I don't have any timewarp handling i dont recommend going above 50x timewarp until we get a proper method sorted out

 

 

Link to comment
Share on other sites

If the KSC is caught in a squall, I'll happily go on patrol with a coastguard boat. We want more challenges :)

Visuals too? Stunning. At this point, I've got to suggest you consider taking this commercial as a standalone game (once perfected in KSP, of course!). We've had planet, farm, goat and rock simulation games, why not weather?

Edited by colmo
Link to comment
Share on other sites

11 hours ago, silverfox8124 said:

(note: don't get liquided if you don't get a storm or strong winds or rain or anything at KSC for days on end, that's just how weather works.)

And conversely if you don't get anything but grey skies for days on end (welcome to England :P )

11 hours ago, silverfox8124 said:

Also, the wind turbines and such already (when they were in the mod) reacted to the wind, they didn't really turn to the wind, but they spun and stuff.

I'm sure they could though, with a custom free rotating IR part beneath the rotor head, ( you could probably make it all in one) they would have a tendency  to face gearbox into the wind, but as the center of the blade assembly doesn't generate any effective rotation shadowing it  is no biggy

 

Link to comment
Share on other sites

Statics (e.g. Kerbinside) wouldn't react to physics so would need some custom animation reliant on wind direction.

Wondering where the Kerbin analogue of Ireland (Land of the Long Gray cloud) will turn out to be?

Oh man, we're missing axial tilt - seasons! And then there's oceanic hydrology as well...

Link to comment
Share on other sites

27 minutes ago, colmo said:

Statics (e.g. Kerbinside) wouldn't react to physics so would need some custom animation reliant on wind direction.

Wondering where the Kerbin analogue of Ireland (Land of the Long Gray cloud) will turn out to be?

Oh man, we're missing axial tilt - seasons! And then there's oceanic hydrology as well...

I was thinking more in line with the functional, remote base type usage rather than ornamental, if you're gonna have them they may as well do something useful. Got stacks of coastal statics (you know me, prolific modder,  reluctant publisher)   A related aside, I did look into how difficult it would be to create waves on the oceans that vessels would respond to, and it's way above my c# pay grade. I've a sneaky suspicion it's be easier to replace the oceans than create waves on what we have.

Link to comment
Share on other sites

The pic below shows my earliest attempt at an overlay for vertical wind. Grey means neutral, to turn reddish for descending flow and blueish for ascending. Still faint (but, not even 20 minutes since the simulation started) and already the overlay shows alternating areas in latitude with ascending/descending flow. Doesn't that all resemble the Hadley cells/convergence zones (https://en.wikipedia.org/wiki/Hadley_cell ) ? Was a nice surprise, as nothing was coded to achieve it on purpose: it comes naturally.

N7fnQwB.png

Also, trying color-coding with horizontal wind. Still grey is neutral in the pic below, and saturation stands for wind intensity while hue goes with wind direction (red for eastern, same as a colour wheel). While not yet completely done, wind patterns are showing. How long before a cyclone to be clearly recognizable?

QMeehVw.png

Link to comment
Share on other sites

Windspeed at altitude. 15 minutes only into the sim, but some clear pattern is showing already (scale shows increasing windspeed from dark blue, to green, yellow, red, purple).

k2q5E4L.png

Bet everybody recognizes what those streams with higher winds at specific latitudes mean. If not, here is the Earth's equivalent:  https://en.wikipedia.org/wiki/Jet_stream. Again, nothing coded specifically for the effect, all comes by itself because "laws of physics".

Link to comment
Share on other sites

That is some incredible piece of work, you guys should really make a paper out of it :wink:

PS. Just a quick question - is the state of the sim saved between the sessions (launches of the game)?

Edited by quarrion
Link to comment
Share on other sites

19 minutes ago, quarrion said:

That is some incredible piece of work, you guys should really make a paper out of it :wink:

PS. Just a quick question - is the state of the sim saved between the sessions (launches of the game)?

Thanks :).

The KWS sim saves its state each time KSP does, is meant to keep one set of its data with every valid KSP savegame; when KSP reloads an existing savegame, the sim also reloads its corresponding data to keep going from that time. It is theoretically possible to use KWS data saved at a specific time, and load that with a different KSP savegame, and still all would work seamlessly if the time (UT) in both KWS and KSP saves was the same. That's because, nothing done in KSP can affect KWS data (we don't simulate kerbalkind caused climate changes), so the only variable that would affect the sim state is the UT time (that's in theory at least, as timewarping in KSP would reduce the accuracy of the sim and may produce different results).

Link to comment
Share on other sites

I'm running KSP with a minor kopernicus tweak.  I've rescaled my kerbin atmosphere to be 100 km like Earth, instead of 70 km.  To include static pressure altitude.

Is the simulation built to handle that kind of alteration to the basic parameters?  For the rescaling, all it was, was:: {[OLD ALTITUDE] * (10/7)}  ::formula to change out the curves to match the new scale.  Took a while since I had to tune about 30 temp and pressure values by hand.

I know there's a lot of density and energy math that goes into making the weather sim work, so I'm expecting that the alteration to the base atmosphere of kerbin would result in a complete readjustment of the total energy in the system from the additional atmospheric matter volume/mass alone.  Change in total energy of course meaning that I would expect scalars to alter.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...