Can't get water to render in Ogre 1.8.0 RC1

Cygon

02-05-2012 09:52:36

Hi!

I'm trying to use Hydrax with Ogre 1.8.0 RC1. There haven't been any problems compiling it against the current Ogre sources, but for some reason, I don't see the water surface in my game.

I do notice a drastic drop in FPS if I move the camera below ground level (the underwater compositor component is disabled because I don't need it and it blew up when my game was shutting down). Other than that, I see absolutely nothing being rendered.

My Hydrax initialization code should be identical to what the demo it ships with does:
void WorldPresenter::CreateSceneNodes() {
this->hydrax.reset(
new Hydrax::Hydrax(
GetOgreContext()->SceneManager,
GetOgreContext()->Camera,
GetOgreContext()->Viewport
)
);
this->grid = new Hydrax::Module::ProjectedGrid(
this->hydrax.get(),
new Hydrax::Noise::Perlin(), // noise module
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)), // base plane
Hydrax::MaterialManager::NM_VERTEX, // normal mode
Hydrax::Module::ProjectedGrid::Options() // projection options
);
this->hydrax->setModule(this->grid);

this->hydrax->loadCfg("HydraxDemo.hdx");

synchronizeState();
}

void WorldPresenter::AttachSceneNodes() {
this->hydrax->create();
this->hydrax->setVisible(true);

synchronizeState();
}


The log file says this:
10:41:41: [Hydrax] Hydrax created.
10:41:41: [Hydrax] HydraxDemo.hdx loaded.
10:41:41: [Hydrax] Creating module...
10:41:41: [Hydrax] Creating ProjectedGridVertex module.
10:41:41: [Hydrax] ProjectedGridVertex created.
10:41:41: [Hydrax] Module created.
10:41:41: [Hydrax] Initializating RTT Manager...
10:41:41: [Hydrax] RTT manager initialized.
10:41:41: [Hydrax] Registring device restored listener...
10:41:41: [Hydrax] Device restored listener registred.
10:41:41: [Hydrax] Creating materials...
10:41:41: [Hydrax] Creating water material...
10:41:41: Texture: Fresnel.bmp: Loading 1 faces(PF_L8,256x1x1) Internal format is PF_L8,256x1x1.
10:41:41: Texture: Foam.png: Loading 1 faces(PF_R8G8B8,512x512x1) Internal format is PF_X8R8G8B8,512x512x1.
10:41:41: [Hydrax] Water material created.
10:41:41: [Hydrax] Creating depth material...
10:41:41: Texture: Caustics_0.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) Internal format is PF_X8R8G8B8,128x128x1.
... caustic bitmaps 1 through 30...
10:41:41: Texture: Caustics_31.bmp: Loading 1 faces(PF_R8G8B8,128x128x1) Internal format is PF_X8R8G8B8,128x128x1.
10:41:41: [Hydrax] Depth material created.
10:41:41: [Hydrax] Materials created.
10:41:41: [Hydrax] Creating water mesh...
10:41:41: [Hydrax] Water mesh created.
... game runs with me searching for the water surface...
10:42:04: [Hydrax] ProjectedGridVertex destroyed.
10:42:04: [Hydrax] Perlin destroyed.
10:42:04: [Hydrax] Hydrax object removed.


Can anyone spot something that might be amiss in my initialization code?
I'd be grateful for debugging tips as well! I already tried setting the polygon mode to wireframe, but still nothing to see.

heavydist

29-05-2012 00:42:13

Do you have any other compositors in your scene? Have you tried disabling them? What does your .hdx file look like?
Also, do you call hydrax->update() somewhere in your frame listener?
(oh, saw now I was almost a year late, well nvm)