Opacity on the whole .png, using custom scene node

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
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Opacity on the whole .png, using custom scene node

Post by Clash »

Hello!
I'm using a custom scene node with 4 vertices to draw a .png using an ortho camera. What I would like to be able to do is set the opacity of the whole .png and still to keep the .png owns opacity. So if on the .png I have a place where 50% opacity is used and I want to apply 30% opacity, it will apply more 30% opacity to the 50% resulting in 65% opacity (I could be wrong, I don't know this opacity thing is done), and where no opacity was used would get 30%. Is this possible?

Here is a picture trying to explain what I mean
Image
On the left you see a block .png with 0% opacity and at the right one with 50% opacity. I want to be able to do 50% opacity without having to make a new .png, is it possible? I have been messing with EMT_TRANSPARENT_VERTEX_ALPHA, but results are not as expected. It removes the .png opacity and does not apply opacity to the whole bitmap.
Thanks in advance guys!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

There currently isn't a built-in material that does this, but there is a patch posted either here on the forum or on the patch tracker to allow vertex alpha on the "one texture blend" material. We should probably add this patch to Irrlicht actually.
Anyway it should work if you set the standard transparent blend
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The draw2DImage methods can do this, since you need flat rendering anyway...
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Post by Clash »

hybrid wrote:The draw2DImage methods can do this, since you need flat rendering anyway...
The problem is that I need to be able to rotate and resize the image, so I had to move from draw2DImage
Thanks for the help anyways guys
Post Reply