Anyone figure out a good way to implement fog?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Spartacus
Posts: 70
Joined: Fri Nov 21, 2003 11:56 pm

Anyone figure out a good way to implement fog?

Post by Spartacus »

I tried to add fog to the irrlicht engine however I could not seem to get it to work I can get it to work just fine if i added it into the inlitiliziation of DirectX but I wanted to have the power to manulipate what type of fog, the color of fog, the density of the fog, and how far it starts and ends? Anyone come up with a good way? Plus once i got it in it kinda like.. made my particles i had that were falling from sky as snow i coudl see there squares 0.o
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

1) someone already worked on some fog, look in the howto topic

2) if your transparent objects are being outlined, its because your fog is being rendered AFTER the transparent objects, but behind them.

transparent objects need to be rendered last, so they can capture what colors are directly behind them.
a screen cap is worth 0x100000 DWORDS
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

which leads to...

Post by buhatkj »

which leads me to ask, upon reading that, how would one ensure that something got rendered in a certain order. i can only suppose it would involve setting some marker in th transparent thing's scene node to tell it "do me last..."
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Post Reply