My Hydrax looks bad

flogo

18-10-2015 13:21:26

Hello everyone !

I've compiled Hydrax from here: https://github.com/imperative/CommunityHydrax
(Because I've Ogre 1.9 and the following one compile only with Ogre 1.10 : https://bitbucket.org/ogreaddons)

I've set up the code as I can see in this forum and used the HydraxDemo file the the water looks weird.

1. On this image you can see it look very repetitive and secondly does not interact well with the terrain:
http://snag.gy/hLdC1.jpg

2. On this second image you can see that, if the camera is behind the water the bottom of the screen don't display the water (you see a band of sand instead):
http://snag.gy/a0tmd.jpg
Do you have any ideas (or input) to have a better water as we see in the other Hydrax demo?

The code (I've merely copied from this forum):

///HYDRAX
mSea = OGRE_NEW Hydrax::Hydrax(_sceneManager, _playerCamera, _viewPort);


// Otherwise an exception is thrown
// if (_root->getRenederSystem()->getName() == "OpenGL Rendering Subsystem")
mSea->setShaderMode( Hydrax::MaterialManager::SM_GLSL);
// else
// mSea->setShaderMode( Hydrax::MaterialManager::SM_HLSL);


Hydrax::Module::ProjectedGrid *mSeaModule = new Hydrax::Module::ProjectedGrid(
mSea,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,100,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(64));

mSea->setModule(static_cast<Hydrax::Module::Module*>(mSeaModule));

mSea->loadCfg("HydraxDemo.hdx");

mSea->create();
mSea->setGlobalTransparency(0.9); // Just a test

TerrainGroup::TerrainIterator ti = _terrainGroup->getTerrainIterator();
while (ti.hasMoreElements())
{
Ogre::Terrain* t = ti.getNext()->instance;
Ogre::MaterialPtr ptr = t->getMaterial();
mSea->getMaterialManager()->addDepthTechnique(ptr->createTechnique());
}


Then

if (mSea)
{
mSea->update(timeSinceLastFrame);
mSea->setSunPosition(_sceneManager->getLight("TestLight")->getPosition());
}


HydraxDemo.hdx
http://pastebin.com/UN2U2j84