Advertisement

Transperancy vs Blending

Started by December 27, 2001 01:01 PM
4 comments, last by nitzan 23 years, 1 month ago
Is there a way to do transperancy in opengl without blending ? If I have an image file, how do I mark one color as transparent ? Nitzan ------------------------- www.geocities.com/nitzanw www.scorchedearth3d.net -------------------------
Hi,

I''m not sure but I think that it''s impossible for not use the blending.

I''ve a example who use alpha canal for displaying a tree without the black background.

Alpha blending is easy to use.

You can see on my site.

========================
Leyder Dylan
http://ibelgique.ifrance.com/Slug-Production/
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
Advertisement
When loading the image file, check each pixels colour, and assign it 0 alpha if it is the colour you wish to block out.

-----------------------
0wn 0wn 0wn your goat
gently down the pw33n
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
quote:

Is there a way to do transperancy in opengl without blending



Hmm. Normally transparency = blending.

You could use alpha-stippling, this creates transparency (sort of) without needing to blend. But it''s an old technique, looks ugly, and I don''t know, if it is accelerated on modern 3D boards. The upside is that you won''t have any problems with the zbuffer (as with blending) and that it is pretty fast on software only renderers.
use 32bit tga files with alpha channels, look at the picking tutorial to see what i mean. Its the tutorial where you get to shoot things like soda cans and what not. Thats what i use.
Even though you should not, I use Jpg textures.

http://www.sjbaker.org/steve/omniv/jpegs_are_evil_too.html
www.EberKain.comThere it is, Television, Look Listen Kneel Pray.

This topic is closed to new replies.

Advertisement