Closed lhofhansl closed 4 years ago
Increasing the fog density underwater is probably the way to go. It could also be done in lava, in which fog would become even more dense.
Do you think this should be fixed distance (like in clouds) or a distance factor? I.e. should it take the current view range into account or be always the same?
This is partly engine work, but is fine to discuss here. Note this has to be generalised for all liquids and is not about water only.
I think the issue of seeing through lots of liquid when looking from above the liquid is not a problem and can already be mostly solved by increasing the surface texture alpha, as we plan to do for water. It would also be difficult and complex to implement, not worth it in my opinion. Surface alpha is good enough a solution.
So that leaves visibility when the player is in a liquid, and i have an initial suggestion that is simple and has multiple uses: Add a field to node definition that specifies a maximum view range when the client camera is in that node, this view range limit is applied to the existing view range fog. This will work simlar to how view range is reduced when inside a cloud. This would have uses for airlike nodes too, for example a fog node. I'm thinking a fixed maximum view range instead of a factor, otherwise the player would be able to increase their view range to see any distance.
Particles: I think this is overkill and unbalanced detail when we don't even have weather particles in MTG yet. Particles are intensive so must be used with restraint, so their usage must be prioritised, weather is a far higher priority as that absolutely requires particles, water is fine without them.
@lhofhansl This should be a fixed distance, capped by the viewing_range
client setting. For instance, if the liquid fog distance is set to 50 but the user is using a viewing range of 40, it would effectively be 40.
We also might want to make them always draw, even if the user has fog disabled or uses the full view range mode to make cheating more difficult.
Cool. I think this is not too hard to do. I'll file a engine PR and a PR here once I have something. That's actually cool, we could have swamp water, etc.
Hard to find the right distance, though. I usually play with view_range of 240. Default is 100, on Android it's 50. So what should the water default fog distance be?
I think there should be fog distance and perhaps fog color (although it'd have to work both day and night).
Maybe have it customizable per node
node_fog = {
distance = 50,
visible_outside_node = true,
colour = {r=140, g=170, b=120}
}
But if the default fog is lower than the nodes fog the nodes fog will get cutoff
Defined per node is essential yes, see my post above. 'visible outside node' will be difficult, complex and not worth it in my opinion due to surface opacity being good enough. Definable fog colour would be good but possibly tricky, possibly not essential.
We also might want to make them always draw, even if the user has fog disabled or uses the full view range mode to make cheating more difficult.
I agree.
I like the underwater fog idea, would be useful for other games as well. If added as a node setting, this should be completely optional, however, so games still have full creative freedom.
I agree with paramat to use a fixed value instead of a factor.
For the fog color, I'd just use the same as the post_processing_color
. Anything else wouldn't make much sense IMO.
How about some underwater sound effects like muffling and a slight hum? I modified one of the water sounds in the default mod to create an underwater effect: https://my.pcloud.com/publink/show?code=XZRvQSkZjVQ7taVVnjSJEjpWg15YL79pLaDy
How about some underwater sound effects like muffling and a slight hum?
I would like to have a FIR or IIR filter applied to the sound output when the player's ears are underwater.
Yeah, a FIR or IIR filter would be better than modifiying the audio using an external application. I used a low pass filter on the original audio track, then I created a Brownian noise track and used a low pass filter on that track too. Then I merged the tracks into mono and deepened it a little by boosting the bass.
Closing due to #2710
See some of the discussion on #2513 .
Some topic/options discussed there:
I like increasing the fogginess generally under water. We made similar changes for clouds (but those are client only). The depth dependent fog might be hard to do unless we can go by something simple like day-night ratio.