I guess you can precompute a "depth map" for the each skybox face and use that in your fog computations. You will need 2 passes and a custom post processing fog shader though.
It is a neat idea though, I may try it since you will be able to change the colour based on time of day etc and it will sort of bring your skybox to life.
fading fog into a skybox
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
I am also working on a space game.
I have a stars skybox and a grid made of lines which should fade into the skybox in the distance.
I solved it by setting MaterialType to EMT_TRANSPARENT_ADD_COLOR.
SMaterial m;
m.Lighting = false;
m.FogEnable = true;
m.MaterialType = EMT_TRANSPARENT_ADD_COLOR;
driver->setMaterial(m);

I am using this with draw3dline but there should be a way to do that with objects also.
Hope it works for you!
I have a stars skybox and a grid made of lines which should fade into the skybox in the distance.
I solved it by setting MaterialType to EMT_TRANSPARENT_ADD_COLOR.
SMaterial m;
m.Lighting = false;
m.FogEnable = true;
m.MaterialType = EMT_TRANSPARENT_ADD_COLOR;
driver->setMaterial(m);

I am using this with draw3dline but there should be a way to do that with objects also.
Hope it works for you!
OMG! I GOT IT!

I set Fog Color to:
and the following to the node:
There is just one mistake left, as you can't see the earth ist always translucent not only if fog reaches the earth. But i will try to fix it soon...
MFG
Scarabol

I set Fog Color to:
Code: Select all
SColor(0,0,0,0)
Code: Select all
planettemp.node->setMaterialFlag(EMF_FOG_ENABLE, true);
planettemp.node->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);
planettemp.node->setMaterialFlag(EMF_LIGHTING, false);
MFG
Scarabol