Page 1 of 1

Please help me with fog.

Posted: Fri Jun 04, 2004 6:40 pm
by Vinetu
Hi guys!

I have problem with fog. It dosen't work for me. I know that need to write two funtions:
mesh->setMaterialFlag(EMF_FOG_ENABLE, true);
driver->setFog(SColor(0,255,255,255),true, 1500,1800);
but it still not work. I want to ask how define the mesh (write in first function)?
Please help someone.

Posted: Fri Jun 04, 2004 9:40 pm
by Peter Müller
You have to enable fog on every mesh (or scene node). And play a bit around with the fog, sometimes you don't see it.

Posted: Sat Jun 05, 2004 10:58 am
by Vinetu
Thanks Peter Müller! But think you don't understand... :( I try to ask clearer. How declare "setMaterialFlag(video::EMF_FOG_ENABLE, true)" ???
How to do that with sceneNode? Maybe someone can post short example fog?

Posted: Sat Jun 05, 2004 11:19 am
by Peter Müller
Don't know the exact thread, but the guy, which screenshot is on the main side, posted some code in his 'wip... and please help' thread.

Posted: Sat Jun 05, 2004 12:19 pm
by Tyn
The function is part of ISceneNode:

Code: Select all

node->setMaterialFlag(video::EMF_FOG_ENABLE, true);

Posted: Sat Jun 05, 2004 9:56 pm
by Vinetu
Thanks Tyn and Peter Müller for help! I found afecelis tutorial. This tutorial help me :D . and now I add fog to my level :D :D . [/list][/b]

Posted: Sat Jun 05, 2004 10:22 pm
by afecelis
the guy = afecelis

h aha ha ha ha !

I'm glad the tut helped Vinetu.

Posted: Tue Jun 08, 2004 9:52 am
by jordanXXX
Where is the tutorial ? Would you Please put the code about fog ? thanks :)