fading in/out skybox

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
Max Power
Posts: 98
Joined: Wed Mar 14, 2012 10:09 am

fading in/out skybox

Post by Max Power »

I want to gradually set transparency for my skybox. Behind it there's only the scene-color.

I tried to get to the vertices by casting to IMeshSceneNode, but it doesn't work. Otherwise I could have used vertex-transparency.

Using color-transparency together with the material's ambient color doesn't seem to work either.

I'd like to get a blend of scene-color and skybox without having to write a custom shader for it. Any ideas?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: fading in/out skybox

Post by CuteAlien »

Yeah, tricky because it has no real mesh (aka IMesh or IMeshBuffer interface). I suppose the easiest solution is to create your own skybox scenenode. Copy CSkyBoxSceNode.cpp/.h source and then add a function which directly modifies the color of the vertices.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Max Power
Posts: 98
Joined: Wed Mar 14, 2012 10:09 am

Re: fading in/out skybox

Post by Max Power »

I tried it again with color transparency and ambient color. I had forgotten to enable lighting, because it's usually on by default (except for skyboxes...).

Works the way I wanted now. Thanks anyway.
Post Reply