Hi, first that all excuseme for maybe this "noob question".
Now in my Irrlicht's scene i have set one mesh in a node with fog effect... it's works.
So, but when i try to set in the same node another mesh, only this mesh is affected for the fog, the first mesh now is unaffected, why???? . I did try to set or add more meshes, and always is the same result: the last mesh is correct, no the others.
Im using Irllicht 1.7.1. Maybe it's a BUG??
thanks.
Trouble about node - fog [ SOLVED ]
Trouble about node - fog [ SOLVED ]
Last edited by oginnam on Sat Apr 10, 2010 10:56 pm, edited 1 time in total.
code code code code code code code code code code code code
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
ok the part of code is:Virion wrote:code code code code code code code code code code code code
Code: Select all
.....
.....
mDriver->setFog(SColor(0,85,121,121),EFT_FOG_LINEAR,1000,10000, 0.01f,false, false);
....
....
.....
IAnimatedMesh* hydrantmesh = mScene->getMesh("hydrant.x");
IAnimatedMeshSceneNode* city = mScene->addAnimatedMeshSceneNode(hydrantmesh);
IAnimatedMesh* streetmesh = mScene->getMesh("street.x");
city = mScene->addAnimatedMeshSceneNode(streetmesh);
IAnimatedMesh* segment1 = mScene->getMesh("segment1.x");
city = mScene->addAnimatedMeshSceneNode(segment1);
city->setMaterialFlag(video::EMF_FOG_ENABLE, true);
city->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Yes, of course. You only set the fog for the last node.oginnam wrote:In this case, only segment1 have a fog effect.
You have to call setMaterialFlag for every node.
Code: Select all
IAnimatedMesh* hydrantmesh = mScene->getMesh("hydrant.x");
IAnimatedMeshSceneNode* city = mScene->addAnimatedMeshSceneNode(hydrantmesh);
city->setMaterialFlag(video::EMF_FOG_ENABLE, true);
city->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
IAnimatedMesh* streetmesh = mScene->getMesh("street.x");
city = mScene->addAnimatedMeshSceneNode(streetmesh);
city->setMaterialFlag(video::EMF_FOG_ENABLE, true);
city->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
IAnimatedMesh* segment1 = mScene->getMesh("segment1.x");
city = mScene->addAnimatedMeshSceneNode(segment1);
city->setMaterialFlag(video::EMF_FOG_ENABLE, true);
city->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
"Whoops..."
-
- Posts: 226
- Joined: Fri Aug 22, 2008 8:50 pm
- Contact: