Jump to content

Waves in KSP


SparkyFox

Recommended Posts

So I was wondering if it was possible to add normal current waves varying from serene calm to raging storm. So boats and other sea craft actually have to adjust for the water conditions and boats can actually be impacted negatively by this if they enter a stormy area.

Maybe in conjunction with a pre-existing wind mod maybe?

Just a thought, especially since I know a friend who's going to be working on a project in KSP that'll utilize it.

I know the water isn't an easy thing to mess around with and when something hits the water it plays a splash particle.(just like when something hits the ground it either plays the explosion or smoke-puff particles/effects) Scatterer (+SVE?) adds somewhat of a wave/current thing, but that's only due to texture animations, and I know this would need an event to trigger the water effect texture animations from the storms which would probably from a pre-existing mod?

Link to comment
Share on other sites

I think you would need to completely rewrite how water is implemented. As far as I know, water is just a secondary planetary body superimposed on the primary body. (or something approximating that.) As this is a space-oriented game, I imagine this was done to save on processing power since real water effects tend to be somewhat processing intensive. (Both graphically and computationally if you want believable behavior.) Seeing KSP can choke on physics calculations for a large, complex vessel, I can only imagine the slideshow if that entire craft was under perpetual acceleration due to water waves. And that's on top of calculating the waves in the first place. And then you need to do the water calculation for a large area to boot. (About everything within the standard 2.5km or so physics range of the game.)

I can't see this being simple or easy to do without a fundamental change to KSP. Water is not it's forte (for good reason: Kerbal Space Program.) I get that KSP is a fun physic sim sandbox for people, but it can only do so much given its intended purpose/design as a space sim. (Aircraft only got added since flying through air is something rockets need to do. "Flying" though water? Not so much. I think we're luck enough to even have functional buoyancy and therefore submarines and boats.)

Not to shoot you down or "hate on you". It's just I don't think KSP as it currently stands is the right platform for what you're asking for. I think it would be more effort to shoehorn in real water effects into KSP than it would be to just make a Kerbal Marine Program from scratch with that as the basic premise and goal from the start.

Link to comment
Share on other sites

I have been tinkering around with the game code in the past and seeing how stuff works, so I know how a lot of things work, and personally; I'm a fan of making boats or submarines, and like I said, this was only a thought for a good friend of mine.

In the past- water was literally a ground with an animated texture, but I have seen quite a lot of potential with mods. Again; yeah, the game would need to be a complete rewrite and even still this would cause a lot of problems and graphical glitches and a huge performance hit 

I can see how this could be some what possible through modding, but since the water is such a huge body, it would most likely crash the game or just flat out break something or the save.

Edited by SparkyFox
Link to comment
Share on other sites

2 hours ago, Drew Kerman said:

@blackrack can comment on this, since he actually had wave interaction working in a very basic form (or it may not have even been working just theoretical) a while ago before abandoning it (for now I think) in pursuit of other goals with Scatterer

http://s1.webmshare.com/GyaEb.webm

Although it might look here like it works, what I tried was a hacky solution, it basically moved the water level height for every part between frames. The issue with this is that it doesn't interpolate the forces correctly between frames, so that for every part, the water level doesn't appear to go up and down smoothly so that they bob along with it, instead it disappears instantly and reappears at a different level, parts just fall down and slam into the water surface and ships break. It was unstable and very prone to kraken attacks and crashes, and didn't look realistic once you tried to move the ship over the water surface.

My conclusion from this experiment is you need to write your own buoyancy engine, something like FAR but for water physics. Personally I haven't researched this much and I have no knowledge about this kind of thing but it doesn't seem like a simple task.

Perhaps @ferram4 would know where to start.

2 hours ago, StahnAileron said:

Not to shoot you down or "hate on you". It's just I don't think KSP as it currently stands is the right platform for what you're asking for. I think it would be more effort to shoehorn in real water effects into KSP than it would be to just make a Kerbal Marine Program from scratch with that as the basic premise and goal from the start.

I personally think KSP is the right platform for this, maybe not immediately (and I would prefer to see a new terrain system and a few updates to the graphics before) but I definitely think more attention to planetary bodies and the planetary exploration aspect of the game would help it a lot.

Edited by blackrack
Link to comment
Share on other sites

Seeing as there was a mod for improving the buoyancy system before, it seems to indeed be possible. So my thought process would be this;

Simply have a 1km radius of actual wave physics, and simply have the wave behavior random or (by taking advantage of the space element) based on the position of nearby celestial objects such as the Mün or in Laythe's case, Jool (much greater wave action on the Jool facing side). Eve would be permanently static with minimal wave action.

Outside of this physics bubble would be scatterer style non-physical waves that cycle based on whatever the current wave action level is within the physics radius. 

The craft would treat the moving water basically as a moving surface; (ie, a rover moving over terrain), only the buoyancy mechanics are in use. 

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...