billboard transparency question (the "ghost" effect)

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
WaxyChicken
Posts: 95
Joined: Sat Jun 25, 2011 6:15 am

billboard transparency question (the "ghost" effect)

Post by WaxyChicken »

I used Tutorial 6 to see how to have the transparency color of a billboard automatically determined by a specific pixel using
driver->makeColorKeyTexture(Texture, position2d<s32>(0,0));
so that my texturer can have an easier time with the images.

but i'm having an issue with the Transparent_Add_Color causing the solid parts to appear translucent.

for example:

billboard image
Image

in game & editer:
Image

how do i make the leaves solid instead of ghostly?
(i have a feeling it's right in front of my face...
just like - i posted this message 2 hours ago but forgot to hit the SUBMIT :oops:
time for some SLEEP!)
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Re: billboard transparency question (the "ghost" effect)

Post by Lonesome Ducky »

TRANSPARENT_ADD_COLOR adds the color of the texture to the framebuffer. So instead of any part being solid, it's all transparent since every pixel regardless of color is being added to the colors already in the framebuffer. You'll need to add an alpha channel to your texture and use either TRANSPARENT_ALPHA_CHANNEL_REF or TRANSPARENT_ALPHA_CHANNEL to get what you want. TRANSPARENT_ALPHA_CHANNEL_REF would be best in your case
WaxyChicken
Posts: 95
Joined: Sat Jun 25, 2011 6:15 am

Re: billboard transparency question (the "ghost" effect)

Post by WaxyChicken »

Image

Thanks, Ducky.
That has my templates working perfectly.
My art team should be able to run with this and turn this "working" into "Pretty".
(sorry for the thank-you delay, i had some 12-hour shifts to get through at work)
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: billboard transparency question (the "ghost" effect)

Post by hybrid »

You can get a better fade out at the edges by lowering the MaterialTypeParam to e.g. 0.5f or even lower.
Post Reply