Hydrax 0.4.0 Depth Component - Black Screen

core_programmer

19-10-2008 20:12:02

I got hydrax running under Ogre 1.4.9, however I am unable to use it. If I load the components from Tropical.hdx (from the editor) or manualy with mHydrax->setComponents I simply get a black screen. What could be wrong? (I suggest that it has something to do with the depth Component, because if I only load this component i get an black scrren and with other not...)

If I don't load a cfg and just use this code everything works great, except that there are not any options set, so it looks rather unimpressive....

Here's the code i was taking about:

Hydrax::Module::ProjectedGrid *mModule
= new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
mHydraxSystem,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(256));
mHydraxSystem->setModule(static_cast<Hydrax::Module::Module*>(mModule));

//mHydraxSystem->loadCfg("Tropical.hdx");

mHydraxSystem->create();

mSceneMgr->setWorldGeometry("Island.cfg");

mHydraxSystem->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("Island"))
->createTechnique());

I'm currently using the latest version from hydrax!

If somebody has any idea what's wrong I would be happy hearing about it.

Xavyiy

19-10-2008 21:13:37

Can you post some screenshots of the problem?

core_programmer

20-10-2008 09:46:07

If I set the depth component, I only get an black screen


If I don't use any component, it looks rather bad

Xavyiy

20-10-2008 12:01:04

It's very extrange, I think it's non-hydrax related, something wrong in your app or similar. Depth component only renders the scene in another Rtt with depth material and uses it in the water shader.
Are you using something compositors, or similar?
Disable caelum fog management too(Or see Nature demo sources for an example of Hydrax/Caelum integration).

core_programmer

21-10-2008 10:24:05

I had not problems with the depth component i had problems with the module Module=ProjectedGridVertex, I changed it to Module=ProjectedGridRtt and now it works a lot better.

However I have a new problem, if I look down to the water the water gets transparent...

Heres an screen shot how it should be:


and here a screenshot how it is if i change the camera position:

Xavyiy

21-10-2008 10:57:15

Maybe your terrain is not an Ogre::Entity and you've forgot to add the hydrax depth technique...
I don't find another reason.

core_programmer

22-10-2008 22:13:52

my code:

mSceneMgr->setWorldGeometry("Island.cfg");
mHydraxSystem->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("Island"))
->createTechnique());

Xavyiy

22-10-2008 22:21:22

And the demo works for you?
It's very extrange.. what have you in the scene? Hydrax, caelum and ..?

core_programmer

23-10-2008 09:47:41

that's it, and the ogremax scene loader, but this should not interfere with hydrax.

the demo works great!