Jump to content

Recommended Posts

 

So after playing with @RoverDude's Otter Submarine mod (which you should definitely check out if you haven't) for a while, I noticed a few things. One: It's very fun to drive a sub all over Kerbin, and two: that the stock underwater effects are extremely unaccomodating. Not only is it impossible to see the sea floor beyond  a certain depth, and the surface of the water at all, but the fog does little to create an illusion of depth, with it's ridiculous lighting effects which look more like the souposphere of pre-0.90 than water. In short, while the mod is extremely fun to play with the way stock handles being underwater, while obviously far better than olden days, is still terribad. In short, what I would like to ask is whether or not it is feasible to ovveride the stock Water System with a better one. I believe @Fengist was working of something of the sort before he left the forums, but I haven't a clue about the specifics of it. 

 

Screenshots for emphasis: 

Spoiler

Spoiler

 

 

 

 

Edited by ThatOneBritishGuy...
Link to comment
Share on other sites

I agree underwater physics would be really cool.

This game is longer just a space sim...

Its a everything sim.

KSP is great for building any crazy idea you have and trying to make it work in a realistic enviroment, except for submarines.

Link to comment
Share on other sites

They are doing the underwater rendering using the 'fog technique', that essentially mix the pixel color with a constant one blended by distance from camera. This is bad for multiple reasons and was probably hacked together in an afternoon, giving the focus of this game is space. What you need to do for good looking underwater renderings is taking into consideration the absorption coefficients and the length the ray travel inside water. You can use something as simple as this, as a postprocess:

vec3 water_extinction(const vec3 clr, const float depth)
{
	return clr * clamp(water.extinction / depth, 0.0, 1.0);
}

 where clr is the pixel color on the screen, depth is the distance from camera (reconstruct it from the z-buffer or whatever) plus distance from point to water surface in direction of the sun, and extinction contain the absorption coefficients for red, green and blue. (default for 'average' ocean water: [4.5f, 75.0f, 300.0f])

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