It's actualy supposed to be ~4 times faster.SinbadEV wrote:I think the battle is supposed to be much slower then the acctual gameplay suggests... battles taking days instead of hours... so the speed of the water... ah whhatever... I'm just making excuses...
Water rendering
Moderator: Moderators
-
- Posts: 704
- Joined: 30 Oct 2004, 14:14
If it works like any of the other navier-stokes solvers on gpu basis (there are tons of them around), then the speed should more or less be depending on the resolution of the mesh used.Doomweaver wrote:Do more waves actually increase the GPU load? Somehow I doubt it.
More waves would just mean that there are more "non-zero" matrix elements.
(of course it _would_ be possible that caching related stuff will cause worse performance with denser datasets, also a clever algorithm may cut corners by simply not solving unpopulated parts of the mesh...
-
- Posts: 704
- Joined: 30 Oct 2004, 14:14
Re: Water rendering
Im sure i had a demo for my GeForce2 Ti that had this exact same effect and it ran it fine! There should be lots of room for optimization if it wont run on a low-end card!SJ wrote: unfortunally it seems like it will become quite a bit slower then I had hoped so it will only work on high end nvidia cards.
It changes the mesh in the vertex shader based on a texture so im not sure if that counts as deforming the mesh. So performance will in no way depend on how many ships are present (except that it will have to render in the ships positions into the texture but thats a quite minor cost)
Sharp peaks are unfortunally quite hard to get with this sort of approximate solver (its so far removed from NS that i wouldnt call it an approximate NS solver)Whats the chance of getting sharp peaks on the waves? Sharpish waves would probably look a bit better I think. Really nice work so far.
Yeah sure you go ahead and optimize it for your GF2.Im sure i had a demo for my GeForce2 Ti that had this exact same effect and it ran it fine! There should be lots of room for optimization if it wont run on a low-end card!
Hmm, neat. I assumed that you were doing some sort've method of building a mesh on-the-fly, because of the way that it looks- it's quite a bit more complex-looking with multiple objects, so it's good to know it won't be eating up GPU exponentially I like that new shader that fellow wrote, too... maybe after he's gotten a bit farther, we can get him to finally do transparency for the blue channel, so that I can build some really awesome stuff
Few tips to greatly improve realism:
1. Currently only the ships are deforming the water, and without them skimming across it's dead flat. That looks as if the whole world is enclosed in a windless chamber. Add some non-stop "deformators" to simulate wind blowing over the water
2. Some "animated waves" texture blended with the reflections would cause the water to look more to-scale (the NS solver would emulate the large waves and the texture - the smaller ones)
3. Not sure if this is already implemented this way, but the transparency of the water should vary depending on the angle from which you are viewing (i. e. the water should be almost 100% reflective / textured when looking sideways and, say, 30% reflective / textured and 70% transparent (heh I hope you get the point)
I'm no programmer at all so I don't know how difficult those things are to code.
1. Currently only the ships are deforming the water, and without them skimming across it's dead flat. That looks as if the whole world is enclosed in a windless chamber. Add some non-stop "deformators" to simulate wind blowing over the water
2. Some "animated waves" texture blended with the reflections would cause the water to look more to-scale (the NS solver would emulate the large waves and the texture - the smaller ones)
3. Not sure if this is already implemented this way, but the transparency of the water should vary depending on the angle from which you are viewing (i. e. the water should be almost 100% reflective / textured when looking sideways and, say, 30% reflective / textured and 70% transparent (heh I hope you get the point)
I'm no programmer at all so I don't know how difficult those things are to code.
NS -> Navier-Stokes, its a general equation for behavior of a fluid's particles (IIRC). I suspected SJ used it or soemthing similar; the "approximation" bit is because it can be ridiculously expensive to calculate more exact solutions.
SJ, any chance of throwing in a randomizer(), with a chance of a mesh section being several units higher than its surroundings correspond to the curve of a rational function, so that most mesh sections will be low, some will be "medium", and a few will be "higher peaks" etc? Statistically it would all even out in the end and probably add a very small amount of computation to the GPU load (relative to the current GPU load anyway...)
Also, im guessing that bigger weapons create bigger waves etc so that a nuke will have a far higher wave than a laser?
SJ, any chance of throwing in a randomizer(), with a chance of a mesh section being several units higher than its surroundings correspond to the curve of a rational function, so that most mesh sections will be low, some will be "medium", and a few will be "higher peaks" etc? Statistically it would all even out in the end and probably add a very small amount of computation to the GPU load (relative to the current GPU load anyway...)
Also, im guessing that bigger weapons create bigger waves etc so that a nuke will have a far higher wave than a laser?
Dragon: Im not exactly sure what you mean, but as you say waves can have different heights so you cant detect the crest of a wave by its height value alone. Detecting where on a wave a texel is based on comparing to its neighbour could work perhaps but would require quite a big window to compare against to to avoid it getting too noisy, and thus it would be very expensive.
So I dont think its possible to get away from the sinusoid form of the waves that way although if anyone could do it after I release the code it would of course be very cool.
So I dont think its possible to get away from the sinusoid form of the waves that way although if anyone could do it after I release the code it would of course be very cool.
Well what i was trying to say was that you could use teh power of statistics to randomly "seed" a crest or two in any given wave, or every other wave, etc. and not have it become too noisy; once a crest-seed was planted then you could use texels and the orientation of the "crest" to determine how the texels based on the orientation should color themselves and so not have a very big window to compare agaisnt and thus save a TON of calculations instead of comparing against a big window, BUT I SPEAK TOO MUCH!
Release teh code! :D
More code == more fun.
Pardon the rushedness.
<-------------- UNNATURALLY ENERGIZED
Release teh code! :D
More code == more fun.
Pardon the rushedness.
<-------------- UNNATURALLY ENERGIZED