[Solved] ETM with Hydrax

Jeanbono

18-10-2008 20:27:16

Hi :)

I try to use hydrax v0.4 plugin and ETM v2.3.1 with this code :

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


My code work fine without hydrax's depthTechnique but when I try the depth technique my application crash...

I've try many combinaisons for testing but no succes.
I don't know if the problem came from ETM or hydrax so I post here for the moment.
If someone have an idea ;)

(oops I forgot! I'm using Ogre 1.6)

SongOfTheWeave

26-10-2008 09:21:53

I am not familiar with Hydrax so I'm not sure what that method does, but you're going to have to closely examine anything that modifies the terrain material depending on how you're doing your lighting and especially shadows.

So, find out how the hydrax function modifies the material, and if you post a description of what it's doing us ETM people might be able to spot some collision with how ETM works.

Also mention how you're doing lighting/shadows esp if you're doing something different than in the ETM example (dynamic lighting etc)

calsmurf2904

26-10-2008 18:11:20

Hi :)

I try to use hydrax v0.4 plugin and ETM v2.3.1 with this code :

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


My code work fine without hydrax's depthTechnique but when I try the depth technique my application crash...

I've try many combinaisons for testing but no succes.
I don't know if the problem came from ETM or hydrax so I post here for the moment.
If someone have an idea ;)

(oops I forgot! I'm using Ogre 1.6)

hydrax says that only entities should have that depth technique however etm doesn't use entity's so you should remove that code.

Xavyiy

26-10-2008 19:46:16

@calsmurf2904
Just the opposite, hydrax needs add manually the depth technique when the material is not set in an Ogre::Entity ;)

calsmurf2904

27-10-2008 06:38:52

ohh lol...mis understanding ^^

Jeanbono

27-10-2008 20:02:59

I solved my problem!

In fact, I called the depthtechnique method before my ETM terrain creation :oops:


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


This code works fine with ETM and Hydrax :)

Sorry about this little mistake...