forcing a texture to become transparent?

Hi all,

Is it possible to force a texture already mapped on a polygon to become transparent by applying on top of it another texture with transparent regions?

Thanks for any help!

Check out http://nehe.gamedev.net Lesson38 might be what you’re looking for. I know it is similar to what you are describing.

I had a look at your suggestion, but #38 doensn’t seem very relevant, or am I missing something?

Thanks for the help!

You use blending of textures and the alpha channel.

nehe lesson #32 is on alpha blending and testing which can be used to create a transparentcy maps.

Also look into blending, you can combine multiple textures to get diffrent effects.

Originally posted by ilsvm:
[b]I had a look at your suggestion, but #38 doensn’t seem very relevant, or am I missing something?

Thanks for the help![/b]

Blending does not help me unfortunately in this case, only alpha testing. The problem is that alpha testing happens BEFORE blending. Is it possible to emulate alpha testing after blending? My problem is that I want to make portions of an opaque texture transparent by modulating it with another texture that has transparent regions. Blending might give the corrensponding pixels in the framebuffer zero alpha, but I can’t see that on screen.

Originally posted by ilsvm:
[b]Blending does not help me unfortunately in this case, only alpha testing. The problem is that alpha testing happens BEFORE blending. Is it possible to emulate alpha testing after blending? My problem is that I want to make portions of an opaque texture transparent by modulating it with another texture that has transparent regions. Blending might give the corrensponding pixels in the framebuffer zero alpha, but I can’t see that on screen.

[/b]

You need to read up more on blending and the functions used to modulate the textures.

What you can do is combine the two textures first to get your transparentcy, then apply the resulting texture to the said object.

Also look at render to a texture, maybe will give you some ideas.