Water is not visible. Ogre 1.9 and Hydrax 0.5.1

stasclick

30-06-2014 11:37:29

Hello I'm second week of trying to create the water through the Ogre 1.9 and Hydrax 0.5.1. But all in vain.

Compilation is excellent. The application is launched. But water is not visible. And in the log file, there is only one exception:

13:18:44: [Hydrax] Creating underwater material...
13:18:44: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource HydraxDepthReflectionMap in resource group Hydrax or any other group. in ResourceGroupManager::openResource at ..\..\..\..\OgreMain\src\OgreResourceGroupManager.cpp (line 756)
13:18:44: Error loading texture HydraxDepthReflectionMap. Texture layer will be blank. Loading the texture failed with the following exception: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource HydraxDepthReflectionMap in resource group Hydrax or any other group. in ResourceGroupManager::openResource at ..\..\..\..\OgreMain\src\OgreResourceGroupManager.cpp (line 756)
13:18:44: Texture: UnderwaterDistortion.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) Internal format is PF_X8R8G8B8,256x256x1.
13:18:44: [Hydrax] Underwater material created.


In any case, put the project.

stasclick

03-07-2014 09:46:38

I read all of these posts:
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=29253
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=9692
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=12178
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=12953
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=13585
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=11088
http://www.ogre3d.org/addonforums/viewtopic.php?f=20&t=29443


i tried this:
1) Changing to "Ogre::Plane(Ogre::Vector3::UNIT_Y, Ogre::Real(0.0f))"
2) mCamera->setNearClipDistance(0.01f) or/and mCamera->setFarClipDistance(99999)
3) SHADOWTYPE_TEXTURE_ADDITIVE or SHADOWTYPE_STENCIL_ADDITIVE or SHADOWTYPE_NONE
4) set up shadow before and after set up hydrax
5) enable and disable SkyDome

but none of these help me :(

the only thin is useful, is "mHydrax->update(e.timeSinceLastFrame);", but water still not visible

stasclick

04-07-2014 08:16:07

Excilent news. Water is visible!!!
And you need to:
- mHydrax->update(e.timeSinceLastFrame);
- set shadow technique to SHADOWTYPE_TEXTURE_ADDITIVE;
- set FarClipDistance to "99999", because it distance used so much in hydrax, and if it zero, it dosen't work;
- set NearClipDistance to "0.1f". It is meanless, but it's work!

But underwater nothing visible. Depth is not work. Do you have any ideas?

I get rid of the exception, but it is still nothing works:
11:07:46: [Hydrax] Creating underwater material...
11:07:46: Texture: UnderwaterDistortion.jpg: Loading 1 faces(PF_R8G8B8,256x256x1) Internal format is PF_X8R8G8B8,256x256x1.
11:07:46: [Hydrax] Underwater material created.

To do this. I only added 2 lines in Hydrax.cpp (139 line):
HydraxLOG("Initializating RTT Manager...");
mRttManager->initialize(RttManager::RTT_REFLECTION);
mRttManager->initialize(RttManager::RTT_REFRACTION);

if (isComponent(HYDRAX_COMPONENT_DEPTH))
mRttManager->initialize(RttManager::RTT_DEPTH);
if (isComponent(HYDRAX_COMPONENT_UNDERWATER_REFLECTIONS))
mRttManager->initialize(RttManager::RTT_DEPTH_REFLECTION);

HydraxLOG("RTT manager initialized.");


Any body know how to fix depth?