Transparency

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Transparency

Post by DaMathew »

Hi all!

I've got a model with an alpha-texture, so when i want to make it transparent i'm using the EMT_TRANSPARENT_ALPHA_CHANNEL type, right?
well when i use it it looks like this:

Image

i mean the smoothness... is this possible with the engine?

thank you a lot!
Mathew[/img]
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Post by DaMathew »

Ooops sorry :oops:

the first pic is:

Image
Armen138
Posts: 298
Joined: Mon Feb 23, 2004 3:38 am

Post by Armen138 »

it looks like image 1 has alpha testing transparancy, while image 2 has alpha blending transparancy. i'm not sure if this works correctly in irrlicht with both opengl and directx, it didn't before i started using irrlichtnx instead(one of the main reasons for the switch)
if you're looking for me, start looking on irc, i'm probably there.
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Post by DaMathew »

Thank you for you answer!

The documentation says that EMT_TRANSPARENT_ALPHA_CHANNEL uses alpha blending, so what could it be!?
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

Well this might be a longshot but is the image in alpha channel smooth or are the edges jagged?

Is it something like this:
Image

or more like this:
Image

(The first one is better)
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Post by DaMathew »

Thanks, but i don't think this is the problem, because on both screenshots there is the same alpha channel!
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

Ok more longshots. :wink:
What material settings are you using? Have you tried changeing the MaterialTypeParam? Lower values make the blending smoother.

Also what image format are you using? I haven't been able to get the blending work properly with png images, how about trying a tga image?
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Post by DaMathew »

Changing the MaterialTypeParam doesn't have any effect :( i'm using tga, i also tried png but both doesn't work
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

Ok, sorry I'm out of ideas. Can't imagine why it won't work for you. Maybe you can post or send me the texture so I can test it?
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Post by DaMathew »

This would be very nice =D http://compandmore.ath.cx/Ch_Schneetanne.tga maybe you'll have more luck :D [/url]
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

I don't think there's an easy way to make it blend like in the first picture. I tried to fiddle with it but no luck. :( This is the best I could do but I don't think it will look very good: Ch_Schneetanne-2.tga.
Guest

Post by Guest »

elise: are youre a german female?? wow ... a female programmer is already a big _wow_ but a german one is not possible :D (just thought youre german because of the name Elise and the Schneetanne-2.tga which are both german words)
DaMathew
Posts: 9
Joined: Sun Jul 10, 2005 2:25 pm

Post by DaMathew »

Tahnk you a lot for your effort !!!! :) Didn't help much but looks little better now =D

@GFXstyLER: the texture was named by me :D
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

I don't understand the problem. When i load the sample cone with the first texture and use EMT_TRANSPARENT_ALPHA_CHANNEL with MaterialTypeParam=254 all looks very close to the first pic. Could you post your model?
Elise
Posts: 48
Joined: Tue Jul 19, 2005 6:30 am
Contact:

Post by Elise »

GFXstyLER wrote:elise: are youre a german female??
Nope not german, it was DaMathew's file. :)
Post Reply