Underwater Objects invisible - HydraxDepthReflectionMap?


12-12-2014 09:45:03

Hey there,

I have been struggeling for days now to make Hydrax working. Nevertheless I am stuck now with the "HydraxDepthReflectionMap" error. This errors seems to be a known issue but none of the other solutions worked for me.
If I got this working I promise to write a tutorial for newcomers in Hydrax and Ogre 1.9. :roll:

Here is my setup: Ogre 1.9 64 bit, Hydrax Community Version (compiled for 64 bit)

The error: Objects under the water surface are not visible / rendered, same goes for Objects above the surface looked at from below. As seen in the image only the reflection is visible but not the object itself. I tried it with normal Entities and Terrain.

It's possible related to this error output:
Error loading texture HydraxDepthReflectionMap. Texture layer will be blank. Loa
ding the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFo
undException): Cannot locate resource HydraxDepthReflectionMap in resource group
Hydrax or any other group. in ResourceGroupManager::openResource at ..\..\..\..
\OgreMain\src\OgreResourceGroupManager.cpp (line 756)

My code:

// Create Hydrax object
mHydrax = new Hydrax::Hydrax(mSceneMgr, cam, mWindow->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,0,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
mHydrax->setSunColor(Ogre::Vector3(1, 0.9, 0.6));

// Hydrax initialization code end -----------------------------------------
// ------------------------------------------------------------------------

// Load island

HDX file:

#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


In this post it's mentioned that you need to add the depth technique to your terrain. I am not sure how to do this. Any ideas?

Some related Posts: