Dynamic water only rendered where water actually is?

Dynamic water only rendered where water actually is?

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
2pacalypse
Posts: 36
Joined: 26 Apr 2006, 22:44

Dynamic water only rendered where water actually is?

Post by 2pacalypse »

As I understand it, the entire map is checked for dynamic water when dynamic water is enabled (http://taspring.clan-sy.com/phpbb/viewtopic.php?t=6954). Is there any way to change the rendering engine so that the calculations for dynamic water are only performed where water is actually showing?

If this were possible, I'm guessing that maps such as Supreme Battlefield where only 50% of the map is water would see ~a 50% speed increase in the dynamic water routines. In maps with smaller expanses of water, the performance increase would be even more dramatic. This would let a lot more people enable higher quality water, and sounds like it would be a useful optimization in general.

This could be further extended to only render water where it shows, thus helping everyone's performance even if they only have basic water enabled. Would this be possible/realistic/feasible? I'm really hoping that it is, as even a 10fps increase with dynamic water enabled would be enough to encourage many people to use it (I currently get around 25fps with it on, which is just low enough where I keep it off).
esteroth12
Posts: 501
Joined: 18 May 2006, 21:19

Post by esteroth12 »

eh... if i get more than 20 fps in a typical setting (that is, i won't go below 20fps the whole game except the 10000000000000 particles after a nuke/complosion), i dont care and keep it on... your eyes only get about 16 fps anyway :P

and water has to me rendered, because it gets rendered on the minimap, and if it wasn't rendered you would see the ground (which some people may prefer, but i wouldn't)
User avatar
2pacalypse
Posts: 36
Joined: 26 Apr 2006, 22:44

Post by 2pacalypse »

esteroth12 wrote:eh... if i get more than 20 fps in a typical setting (that is, i won't go below 20fps the whole game except the 10000000000000 particles after a nuke/complosion), i dont care and keep it on... your eyes only get about 16 fps anyway :P
Your eyes can see more than 16fps... that's a common misconception. Most (all?) people can tell the difference between 16fps, 30fps and 60fps, and it's especially obvious with computer renderings since some artifacts like motion blur aren't present at low framerates. Another benefit of having a high framerate is that it's less likely to drop to unacceptable levels if a nuke is dropped, a huge battle takes place, or your OS decides to start doing things in the background.
esteroth12 wrote:water has to (be) rendered, because it gets rendered on the minimap, and if it wasn't rendered you would see the ground (which some people may prefer, but i wouldn't)
I'm not saying that water shouldn't be rendered, I'm just saying that "underground" water shouldn't be rendered. I love the water effects, but there's no point to calculating or drawing them if they're out of sight. If there was some sort of test that could be done (if water < land at this point of the map, then don't draw the water or do water calculations), then it'd probably save a good amount of processing power.
esteroth12
Posts: 501
Joined: 18 May 2006, 21:19

Post by esteroth12 »

2pacalypse wrote:
esteroth12 wrote:water has to (be) rendered, because it gets rendered on the minimap, and if it wasn't rendered you would see the ground (which some people may prefer, but i wouldn't)
I'm not saying that water shouldn't be rendered, I'm just saying that "underground" water shouldn't be rendered. I love the water effects, but there's no point to calculating or drawing them if they're out of sight. If there was some sort of test that could be done (if water < land at this point of the map, then don't draw the water or do water calculations), then it'd probably save a good amount of processing power.
i was talking about the one where it only rendered water where the screen was looking at

underground water should not be rendered, yeah
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Yeah, some people can see higher frequencies...fluorescent lights and computer monitors with <70 hz drive me nuts...
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Oh god P3374H, don't remind me...

I had this MMORPG (Conquer) and it had good graphics, one day these graphics made texes look like shit, and the whole game was ruined because it just didn't look or feel right..

I checked and the hz were at 45 for gods sake! I upped em to 90...

MUCH better..
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Worst is when university lab computers are set to 60hz and they disable the display settings :x
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

Poor you, meh... Why do they even make it changeable, ITS A MONITER THING! It doesn't depend slightly on anything else.. Except electricity...
HawkMan
Posts: 53
Joined: 20 Jul 2006, 22:28

Post by HawkMan »

The human mind techncially only perceives 26-30 image changes a second, in regards to seeing fluorescent lights lights, that's because you still see the fligckers but they get condensed into one image.

As far as FPS go, 60 FPS seem smoother than 25 because it is essentially.

Remember in real life the so called FPS is unlimited to compare directly, and it's not like the eye take instant snapshots 30 times ina second. the eye sees all the time, but the brain "remembers" one image roughly once every 30th of a second. But this image is composed of everything that happens within that 30th of a second. hence you don't see that car that goes really fast jump from frame to fram, instead you get a sortof motion blurred image giving you smooth motion.


Of course at 30 FPS in game, that means you get 30 perfect images in a second,and even so, some of those frames will get blended together int he same fram in the mind, eventhough it doesn't quite work that way.

now at 60 FPS, the brain gets twice as much information and you don't get frame skip , the brian is able to do a sort of natular motion blur and has a lot more info to interpolate on.



As far as not calculating water under terrain, I don't think there's any implementation of detecting where water intersects with terrain to cull/remove water hidden. and such a interesct detector would probably be slower anyway
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I think that whatever people call the FPS of the eye is the time a receptor takes to regenerate between impulses. Since all receptors in the eye act independently you'll have a part of your eye reacting at any given moment.
Luke
Posts: 1
Joined: 04 May 2006, 15:17

Post by Luke »

About the water under the terrain thing,

There├óÔé¼Ôäós no need for working out intersections, etc. I'm not sure exactly how dynamic water works but the best method I can think of would be to divide the water into a grid of sections and hide any sections of water where the land is fully above the water.
The game would probably need to recheck this with each land deformation but there├óÔé¼Ôäós very little speed loss in this check. The same kind of system is used for terrain all the time and if done right the player can├óÔé¼Ôäót notice it.

First post, Yay...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Um... we know EXACTLY where the water is. It's based on a pixel value, supplied to the engine by the map. Anything below that is at Y-value 0. So... um... we could draw the water where pixel-value of the grayscale satisfies a pretty simple if loop. You'd want to buffer it out a couple of grayscale values, to leave a little water under each dry area, so that even during dynamic waves, you'd never see the water's edge.

This method would also totally get rid of the water drawing off-map, which due to Spring's practically unlimited sight distance, is one of the major reasons why dynamic water is sucking up so much FPS.

The real question is whether this search (which, um, only has to be done once, but the results must be stored and referred to each frame) is slower than not doing this search and eliminating the water-quads.

The answer to that, I think... is a resounding yes. I just wish I had enough time to spare to write that one up, because it should be very easy.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

A real gamer can tell the difference between 60 FPS and 100 FPS, past that though it gets pretty hazy even for the best.
Zagupi
Posts: 99
Joined: 26 Jul 2006, 11:50

Post by Zagupi »

You have to keep in mind, that your monitor's reflesh rate prohibits you from seeing frame rates that exceed it, right?
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

SwiftSpear wrote:A real gamer can tell the difference between 60 FPS and 100 FPS, past that though it gets pretty hazy even for the best.
A real gamer can tell no matter what because they have fraps running in the background.

I get over 500fps on the spring.exe menu screen. :-)
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Zagupi wrote:You have to keep in mind, that your monitor's reflesh rate prohibits you from seeing frame rates that exceed it, right?
150hz FTW! :P
Post Reply

Return to “Feature Requests”