(Solved)Transparency Issue(Solved once more)
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
(Solved)Transparency Issue(Solved once more)
Well I have a building which is inside that has a material which is for glass that use's alpha transparency, which works fine on it's own but I run into a problem because I have a sky model that surrounds the environment which use's some transparency materials. The glass begins to disappear when the camera rotates or moves around inside the building. I tested and confirmed that it's because my glass and sky use transparent alpha channel and cause's problems for each other.
I read somewhere maybe to use 2 scene managers but I'm not sure that will help or not.
I read somewhere maybe to use 2 scene managers but I'm not sure that will help or not.
Last edited by The_Glitch on Wed Dec 24, 2014 8:24 pm, edited 1 time in total.
Re: Transparency Issue
Please add a screenshot of the problems, there's a small chance that there is another cause.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Transparency Issue
Old picture but it actually captured the problem to the right, the window disappears, the blue sky in the distance use transparency. If I don't draw the sky just the glass the problem is gone. My guess is because it has to do with two transparent objects one in front of the other.
http://s17.postimg.org/kshar6jjj/29_201 ... _01_89.png
^^ link for full picture If Irrlicht clips the picture in the post.
http://s17.postimg.org/kshar6jjj/29_201 ... _01_89.png
^^ link for full picture If Irrlicht clips the picture in the post.
Re: Transparency Issue
Did you try drawing the sky without transparency? Do you do that do have the background image show through the sky?
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Transparency Issue
Here the window is drawn but only the parts that don't directly have the sky behind it.
Here's the sky everything use's alpha channel except the blue skydome with stars/
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Transparency Issue
I stumped the community once more I see LOL
Re: Transparency Issue
I fear so. Problem as usual is that to investigate this I'd need time... (current panic-level in my work-project is around "I'm so gonna die").
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Transparency Issue
Sometimes you need to be patience.
It does takes time to get something right.
The expert people are probably too busy with their life.
Try find previous project or codes, I guess people would have solved that issue before.
Happy learning.
Cheers
Thanh
It does takes time to get something right.
The expert people are probably too busy with their life.
Try find previous project or codes, I guess people would have solved that issue before.
Happy learning.
Cheers
Thanh
Re: Transparency Issue
is your transparent star field object registered as a ESNRP_SKY_BOX ? I use this type for my custom sky dome with transparency. Just means it will always be rendered first negating any sorting issues.
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Transparency Issue
No it's not that's a good idea how would I go about that?
Also I solved the issue by moving the sky model up in the world some as I fill the glass and sky were at even positions in the world causing that problem above and I made sure the outer most layer the star field is a sold material.
But Klunk I'd still like to try your approach sounds like a good idea for the future.
Also I solved the issue by moving the sky model up in the world some as I fill the glass and sky were at even positions in the world causing that problem above and I made sure the outer most layer the star field is a sold material.
But Klunk I'd still like to try your approach sounds like a good idea for the future.
Re: (Solved)Transparency Issue(Solved once more)
the only issue with setting it as background object (ESNRP_SKY_BOX) is you have to manually set the draw order but as they are always supposed to be in the background this should not cause any draw problems.... I have a custom background mesh object that registers it's self as ESNRP_SKY_BOX to handle these thing.
Code: Select all
virtual void OnRegisterSceneNode()
{
if(IsVisible)
SceneManager->registerNodeForRendering(this, ESNRP_SKY_BOX);
ISceneNode::OnRegisterSceneNode();
}