Been doing some serious thinking.


14-03-2009 03:42:39

Lately, As I've been adding more and more complex functionality to my engine, I've realised one thing of all. While Hydrax can produce insanely pretty water scenes, Alongside other game subsystems such as AI, Physics, GUI's, Sound and simple whole scene rendering, It just does not seem viable. I've tried reducing the complexity down to 150 etc etc, And yes the FPS does increase, to about 80fps. However this is still not enough when I also enable Gui, Physics and AI subsystems. Ive recently made the AI and world streaming system multi threaded, And that increased fps by quite a bit. So it ocoured to me that its Hydrax's on cpu processing, that is causing the bottleneck. So will there be any multi threading support for hydrax in the future? If so this may be the solution im looking forward to, As so many people have dual core systems now, and only 1 core is actually being used. However, Ive decided that if i cannot get Hydrax to run at a reasonable frame rate, At passable quality (Would be lowest settings), along side the whole engine, Unfortunately i will have to produce my own water system which of course wont look as good, But will render at good speeds. I may end up using hydrax as a High quality method of rendering, So those with the extreme I7's, and 280-295gtx's can have the awesome looking water.

Now i'm saying all this assuming everyone has the same sort of rig as me. I understand that alot of the serious gamers do have some emensie rigs which are 10 times faster than mine, But that's still only about 5-10% of the pc gaming market. I don't want to "pull another crytek", and release a game that won't run on anything but the latest £3000 rig, Especially as it is just a small indie game.

Another problem im having with hydrax, Is that i am unable to create epic storms, such as those found in the game's Sea Dogs, POTC, and Age of Pirates. Now the water in those games do not look half as good as hydrax water, But i would rather have a system like that. Is it possible to get hydrax to produce these sort of waves? Ive tried setting the FTT resolution, And doubling it to 256 almost gets me what i want, But its far too slow. Ive also tried decreacing the scale to 0.05, Which gets the right size, But the resolution seems to low and any waves that are more than about 1000 units away from the camera, look blury and horrid.

I'm sorry if you took this offencivly in any way Xavi, As hydrax is a wonderful system, But in its current state, it is not really viable as a solution for games.




14-03-2009 09:01:44

I just wanted to say thanks for posting and sharing your experience in regards to the whole system and the performance you got, its valuable info! :)


14-03-2009 14:34:59

Hi scratchyrice,
you discuss a topic that has given me much to think about since I started Hydrax.
Since the topic is extensive, I will respond by parts:

There're two performance problems in Hydrax: The cost of the CPU to arrange the vertices and generate the noise, and moreover the
need to render the scene for 3 times (Depth, reflection, refraction).
So.. there are 2 really big problems to optimize: CPU and GPU.
About the CPU .. little can be done really, the only solution would be to implement a multi-threading solution for these tasks, apart from minor improvements to try to increase the fps.
But we mustn't forget the GPU cost, which need to render the scene for 3 times.. and it's a significant cost, unafortunately
here are few solutions, some games use only 2 RTT, one for reflection and refraction-depth, the latter two together into one,
but this need to modify the user materials, and a plugin mustn't do that.
The only solutions that come to mind, is just indicate to Hydrax which objets need to be rendered in refraction and depth RTT,
that would be only the objects that are submerged in water, which might help to improve the performance in scenes with many objects.

Actually there are some solutions that come to mind but them require some changes in Hydrax... and none of these ideas are "generic", and Hydrax needs to be something
easy to integrate in any Ogre project, since it's a plugin and no something done for a specifically context.

For example, for the 'Paradise Codename' project that I want to finish during this summer, I'll use Hydrax, SkyX, PSSM shadows, volumetric lighting, HDR and parallax mapping, and I
want a minimum of 25fps on my laptop. So... I'll make some changes to Hydrax to keep the framerate above 25 in my laptotp 2'2Ghz and nVidia 8600GT.

About the storms .. I am sure that using FFT 128, a 256 complexity in the projected grid and choppy waves enabled, you can obtain pretty storm scenes, but sure.. different
to others water engines/games.(Maybe you can put particles in the air to generate a volumetric fog effecs and obtain a more realistic look :) )

Apart from the above, Hydrax can be used with low requirements, for example the following configuration: GPU normals, fft noise, 32 Projected grid complexity: 135/140 fps in my 2.2GHz / nVidia 8600GT:

But the frame rate down quickly with other objects in the scene, because they need to be rendered for 3 more times...

As you can see .. it's difficult to deal with a generic solution for realistic water rendering, Hydrax try to give a generic solution but... of course, the implementation will be slower than something made specifically for a game.

Best regards,



14-03-2009 18:25:32

maybe OpenCL will be a solution for the cpu load ? But still it's rather gpu heavy. For my config it is:

projected grid complexity 256 = 50 fps and 50% cpu load (one whole core)
complexity 64 (still looks good) = 80 fps with 30% cpu load (with physx and other stuff)
without hydrax = 190-220 fps with 19-30% cpu load

Still I think it'd be a good idea to do the calculations on a gpu. Since it's nice to have more power for AI and physx (well, thats also accelerated in some cases ;P)

I'm going to have hydrax as normal, and high water quality in the options.;) There will also be a low quality water for low-end configurations.


25-03-2009 08:09:28

Who is this okokart6? Ive got 3 mailbacks, All from threads on hydrax.