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.
Bear_130278
Posts: 237 Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation
Post
by Bear_130278 » Tue Aug 26, 2008 8:18 am
Hello there
))
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???
JP
Posts: 4526 Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:
Post
by JP » Tue Aug 26, 2008 8:41 am
look at IVideoDriver::makeColorKeyTexture().
Then you should be able to use EMT_TRANSPARENT_ALPHA_CHANNEL instead.
Bear_130278
Posts: 237 Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation
Post
by Bear_130278 » Tue Aug 26, 2008 9:10 am
Maybe i need to specify the subject
)
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???
jontan6
Posts: 278 Joined: Fri Jun 13, 2008 5:29 pm
Post
by jontan6 » Tue Aug 26, 2008 11:12 am
how about invert the color of ur texture?
torleif
Posts: 188 Joined: Mon Jun 30, 2008 4:53 am
Post
by torleif » Tue Aug 26, 2008 11:43 am
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 » Tue Aug 26, 2008 12:02 pm
But then it's going to be the wrong colour when rendered isn't it?
jontan6
Posts: 278 Joined: Fri Jun 13, 2008 5:29 pm
Post
by jontan6 » Tue Aug 26, 2008 1:02 pm
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 » Tue Aug 26, 2008 1:18 pm
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
))
Do you like VODKA???
arras
Posts: 1622 Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:
Post
by arras » Wed Aug 27, 2008 9:47 am
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 » Wed Aug 27, 2008 10:55 am
Nah.. i tried it first..
the object is fully opaque, no semi transparency 8((
Do you like VODKA???
arras
Posts: 1622 Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:
Post
by arras » Wed Aug 27, 2008 2:00 pm
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 » Wed Aug 27, 2008 3:46 pm
Made it
))
Hacked the engine a little bit, with render states
))
Do you like VODKA???