How to speed up Hydrax?

hejian29

21-07-2009 16:33:04

Hi, everyone.
I'm new here and begin to add Hydrax to my project.

One of the main puposes of my project is to keep FPS above of 100 frame per second.

I've been realized water scene with similar effect using project-grid algorithm which is written in raw openGL, and make the FPS above of 160fps
when the grid resolution is 128*256.
But in my current project, it's using OGRE which can't incorporate my previouse code, that's why I'm using Hydrax.
But my question is why the FPS of Hydrax water is always keep in around 70 fps no matter how i change HydraxDemo.hdx.

i create module like below that is the similar code in Hydrax demo.
// Create our projected grid module
Hydrax::Module::ProjectedGrid *mModule
= new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
m_Hydrax,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(/*264 /*Generic one*/));

but whatever changed the last parameter(I mean Hydrax::Module::ProjectedGrid::Options(/*264 /*Generic one*/)), the fps keeps the same.
is this the currect way to change the resolution of the projected grid. 128 * 256 or 128 * 128 may enough for me.


My question is " Is there any way to speed up Hydrax Water? or Is there any switches must be turned on or turned off the speed up?"

Thanks.

didito

28-08-2009 23:29:38

for me is the same. i can do what i want with this settings, the performance stays the same?!?
i would be curious about giving some work to another thread like someone already mentioned here ...
but i have no idea how to do it ...

Flanker

12-01-2010 13:27:51

I too face the same issue that hejian29 was talking about...

since I wanted a performance increase (even slightly), I used a performance measuring tool and ran the Hydrax Editor under couple of different settings and found out a good enough set of settings for my purpose... But the problem remains of how to change the settings in code because whatever I do like hejian29 did, it doesn't seem to affect the performance what so ever... I am no way an expert programmer and is still trying to figure this out... even a little help would be most welcome...

BTW : thanks for Xavyiy for doing some excellent work... cheers !!!

JustinAndrews

27-01-2010 11:05:22

From my early experiments with Hydrax, I've found a good way to get a decent increase in framerate is to switch away from Vertex normals to RTT normals, and then increase GPU strengh to around 10.0 to get a bit of definition back on the waves that lost by making the switch. Vertex normals look nice, but I'm not convinced the quality / cost balance is worth it unless your water is a major game feature.

However using Projected Render to Texture Normals I've been hitting high framerates and even reasonable (60+) in Debug mode. Using this technique in the editor I can top out at about 230 FPS here on my work PC (2.4Ghz Intel with a 8800 GTX) and around 210 FPS on my home PC (2.9Ghz Athlon with 8800GT)

Agressive management of geometry being rendered to texture by Hydrax is probably worth looking at, if an object is not near the water or never going to go in water, I'd keep it away from the area of the scene graph that Hydrax is rendering.