EMT_DETAIL_MAP different between GL and DX

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Buck1000
Posts: 93
Joined: Sun Dec 14, 2008 8:02 pm
Location: Seattle, WA

EMT_DETAIL_MAP different between GL and DX

Post by Buck1000 »

I've been trying to solve a problem with the EMT_DETAIL_MAP Material for the past 2 hours, and just saw that it goes away if I switch to the OpenGL Renderer. Using the DirectX 9.0c one, my terrain appears very bright, and the detail map has no effect. If I don't set the texture mode to EMT_DETAIL_MAP, the texture is relatively fine.

In OpenGL, the terrain looks as it should with EMT_DETAIL_MAP enabled. Whats up with that? Is there any workaround for this? Some screenies...

OpenGL Renderer with EMT_DETAIL_MAP
Image

Direct3D Renderer with EMT_DETAIL_MAP
Image

OpenGL Renderer without EMT_DETAIL_MAP
Image

Direct3D Renderer without EMT_DETAIL_MAP
Image

And, for reference, the terrain is an IAnimatedMeshSceneNode, if that matters.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Which version of Irrlicht do you use?
Buck1000
Posts: 93
Joined: Sun Dec 14, 2008 8:02 pm
Location: Seattle, WA

Post by Buck1000 »

Oh yeah, forgot to say; sorry about that. I'm using Irrlicht 1.7.2, the newest version on the main downloads page - (http://irrlicht.sourceforge.net/downloads.html)

Also, keep in mind that I'm using the EMT_DetailMap with an IAnimatedMeshSceneNode, not a terrain scene node. Here is my code:

Code: Select all

    terrain = smgr->addAnimatedMeshSceneNode(smgr->getMesh(".\\Media\\Terrains\\terrain.obj"), 0, -1, vector3df(0), vector3df(0), vector3df(15));

    terrain->setMaterialFlag(EMF_LIGHTING, false);
    terrain->setMaterialFlag(EMF_ANISOTROPIC_FILTER, true);
    terrain->setMaterialTexture(0,driver->getTexture(texture.c_str()));
    terrain->setMaterialTexture(1,driver->getTexture(detail.c_str()));
    terrain->setMaterialType(EMT_DETAIL_MAP);
Post Reply