Hydrax strange behaviour


13-01-2013 12:32:45

Hello all!
Im using Caelum + Hydrax +OgreTerrain
I finally got to work the Hydrax(there was no watersurface and evevryframe update hydrax didnt help)
There is 2 problems:
1. When i update hydrax every frame it slows down the application
2. I get to see water insanely speed up changing its surface, like every 0.1 second (Screenshots will upload a little bit later, im making a function to take it)

// Create Hydrax object
m_pHydrax = new Hydrax::Hydrax(m_pSceneMgr, m_pCamera, OgreFramework::getSingletonPtr()->m_pRenderWnd->getViewport(0));

// Create our projected grid module
Hydrax::Module::ProjectedGrid *mModule = new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,10,0)),
// Normal mode
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(/*264 /*Generic one*/));

// Set our module

// Load all parameters from config file
// Remarks: The config file must be in Hydrax resource group.
// All parameters can be set/updated directly by code(Like previous versions),
// but due to the high number of customizable parameters, since 0.4 version, Hydrax allows save/load config files.

// Create water

// Set Hydrax sun position and colour
m_pHydrax->setSunColor(Ogre::Vector3(1, 0.9, 0.6));


13-01-2013 12:41:00

Screenshots are here: http://imageshack.us/g/694/screenshot0113201316362.jpg/
Im very sorry if the politics of the forum are against the links to a different sites, but i really cant upload screenshots here


13-01-2013 12:43:13

Btw, my configurations of Hydrax:

#Hydrax cfg file.

#Hydrax version field

#Main options field
#Shader mode: 0=HLSL, 1=CG, 2=GLSL

#Components field

#Sun parameters

#Foam parameters

#Depth parameters

#Smooth transitions parameters

#Caustics parameters

#God rays parameters

#Rtt quality field(0x0 = Auto)

#Module options


#Noise options



13-01-2013 17:42:22

Seems no one is going to help me ?...


11-04-2013 18:47:52

If it is anything like when I was using NxOgre with the Advanced Ogre Framework, I couldn't update using timeSinceLastFrame as everything would go at lightning speeds. Instead I had to put a different value to replace timeScienceLastFrame.

i.e. in my constructor try and make:
m_MoveSpeed = 0.03; (I tweaked this value to get it to the speed I was happy with)

then update with this value (I guess you can put the value straight into the parameters)


Then, on the Ogre start up sequence (where you pick between OpenGL or DirectX) I added:
VSync: Yes
VSync Interval: 2 (this limits the application to 30FPS, 60FPS was okay but still updated a little too fast).

Without this my physics simulations were going stupidly fast. I hope this is a solution for Hydrax too