EMT_TRANSPARENT_ADD_COLOR question

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
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

EMT_TRANSPARENT_ADD_COLOR question

Post by Bear_130278 »

Hello there 8)))
Is there any possibility to make
EMT_TRANSPARENT_ADD_COLOR
to use not the black color as transparent?
I really need it to be vice versa, white transparent and black opaque.
Do you like VODKA???
Image
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

look at IVideoDriver::makeColorKeyTexture().

Then you should be able to use EMT_TRANSPARENT_ALPHA_CHANNEL instead.
Image Image Image
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Maybe i need to specify the subject 8))
with EMT_TRANSPARENT_ADD_COLOR i'm getting nice half transparent color effect, that is what i need, but not with white, but with black.

Now i'm trying to play with EMT_TRANSPARENT_ALPHA_CHANNEL and the texture with AC.
Do you like VODKA???
Image
Image
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

how about invert the color of ur texture?
torleif
Posts: 188
Joined: Mon Jun 30, 2008 4:53 am

Post by torleif »

jontan6 wrote:how about invert the color of ur texture?
+1

It's always easier to edit the art files than go hacking around the engine for a function that doesn't really exist.

Paint even has an invert funtion...
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

But then it's going to be the wrong colour when rendered isn't it? ;)
Image Image Image
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

sorry, yes it will be different color. but seems difficult... since its add color black should be the transparent :(
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

JP another question.
How can i make a semi-transparency with TAChannel material?
It looks, like it still makes pixels or transparent or opaque.

BTW, i'm still using 1.1 version of the engine... due to my usage of .x files for all geometry.
With 1.3 i can not see any geometry rendered, but meshes are loading, 1.4.1 is not working with my MS VC++ 6.0 8)))
Do you like VODKA???
Image
Image
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Just provide semitransparent image in png format and use EMT_TRANSPARENT_ALPHA_CHANNEL
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Nah.. i tried it first..
the object is fully opaque, no semi transparency 8((
Do you like VODKA???
Image
Image
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

You can set alpha of each pixel, so it is possible to get semitransparency.
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

Made it 8)))
Hacked the engine a little bit, with render states 8)))
Do you like VODKA???
Image
Image
Post Reply