Hi all,
Why is the water not blending correctly with the terrain when observed from a distance (the water that hit the terrain look too bright comparing to the surrounding water)? I'm using ETM 2.3.1 and Hydrax 0.4.
Thanks,
Cg
[attachment=0]notBlending.jpg[/attachment]
stealth977
09-02-2009 10:30:06
There may be 2 problems:
1 - Depth->Limit is not enough to hide your terrain (happens on the borders of your terrain, solution is to set the border vertices to some value below (WaterPlane->Position->Y - Depth->Limit)
2 - Not adding HydraxDepthTechnique to terrain material also causes this problem
Stealth,
Xavyiy
09-02-2009 11:57:12
As stealth sais, I think the problem is that you haven't added the hydrax depth technique to your ETM material.
You must add something like this:
mHydrax->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("ETTerrainMaterial"))
->createTechnique());
After ETM and Hydrax initialisation.
Xavi
Hi Xavi,
The depth technique is added but I still get the "bright" effect, it happen when my view point is far away from the water as shown in the screen shot. When I go near to the water (about 5 metres), the water is rendered correctly. Any advice?
Thanks,
Cg
Xavyiy
09-02-2009 12:59:14
Hi Xavi,
After applying the patch, I used terrain.cfg instead of Island.cfg for the Hydrax demo and I got the "bright" water effect. I've tried adjusting the depth parameters and PlanesError settings but to no avail. Is it something to do with the material file (for this screen shot, I'm using Island.material for depth technique)? If it is, what parameters should I be looking?
[attachment=0]notBlending.jpg[/attachment]
Thanks,
Cg
Xavyiy
10-02-2009 19:02:49
This screenshot says that you haven't added the depth technique to your terrain material.., how do you add it?
Xavi
Xavyiy
10-02-2009 20:44:17
mHydrax->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("YourTerrainMaterialName"))
->createTechnique());
Add this piece of code to your program, where "YourTerrainMaterialName" is the name of your terrain material
.
Xavi
Hi Xavi,
The problem is solved by specifying the material filename in the CustomMaterialName (terrain.cfg), disable VertexProgramMorph and LODMorphStart
However, for ETM (refer to screen shot 1), the water is not rendered correctly when hitting the terrain, is there an option to set the CustomMaterialName parameter in ETM?
Thanks,
Cg
stealth977
11-02-2009 10:05:55
mHydrax->getMaterialManager()->addDepthTechnique(
static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("YourTerrainMaterialName"))
->createTechnique());
ETM uses a fixed material name something like ETTerrainMaterial (I am using ETL so not sure about it) just check the material files of ETL, you'll find the name
Hi Stealth977,
I've set the material using the addDepthTechnique but the water is not rendered correctly in ETM.
Regards,
Cg
Hi all,
I've isolated the problem, my material file is causing the bright water, will look into it. Thanks for the help, hydrax is an awesome plugin
Cg