hi, i got stuck with a fog problem.
i loaded a .irr house scene in, and i wanted to create fog in one of the rooms (bathroom, exactly..).
but since the house itself is a node, does this mean that i can only make the whole house foggy by calling setFog() ?
is there any methods that i can create fog in ONLY one of the rooms?
i was thinking that maybe i could create another cube node, put it in the bathroom, and make it transparent, then only enable fog on this cube node, but how to make the cube transparent?
thanks a lot in advance~
how to create fog in part of a room?
When you calling setFog() , it will affect all materials that has flag EMF_FOG_ENABLE enabled. So if you want any node to be affected by the fog, you should call something like:
P.S.: the only one limitation. there is only ONE fog settings available, means: you cannot assign for some nodes 1st fog settings, and for another nodes 2nd fog settings in the same scene.
Code: Select all
video::setFog( video::SColor(0,20,20,20), true, 100.0f, 200.0f );
bathroom_obj1->setMaterialFlag( EMF_FOG_ENABLE, true );
bathroom_obj2->setMaterialFlag( EMF_FOG_ENABLE, true );
...