Please help me with fog.

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
Vinetu
Posts: 27
Joined: Wed Apr 07, 2004 6:57 am
Location: Lithuania
Contact:

Please help me with fog.

Post 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.
"Teach yourself DISCIPLINE."

Your sincerely,
Saulius Šunauskas
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post 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.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Vinetu
Posts: 27
Joined: Wed Apr 07, 2004 6:57 am
Location: Lithuania
Contact:

Post 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?
"Teach yourself DISCIPLINE."

Your sincerely,
Saulius Šunauskas
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post 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.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

The function is part of ISceneNode:

Code: Select all

node->setMaterialFlag(video::EMF_FOG_ENABLE, true);
Vinetu
Posts: 27
Joined: Wed Apr 07, 2004 6:57 am
Location: Lithuania
Contact:

Post 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]
"Teach yourself DISCIPLINE."

Your sincerely,
Saulius Šunauskas
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

the guy = afecelis

h aha ha ha ha !

I'm glad the tut helped Vinetu.
Image
jordanXXX
Posts: 13
Joined: Sun Apr 25, 2004 4:28 am

Post by jordanXXX »

Where is the tutorial ? Would you Please put the code about fog ? thanks :)
Post Reply