Looking behind a colored filter

Looking behind a colored filter

Post by Pang F » Thu, 05 Jun 2003 00:14:38



How to create an effect of looking at to the scene behind a colored filter ?

Assume that you have a red (or, green, or blue etc) colored glass and you
are looking at a scene behind this red glass. You'll see white object as
red, green objects as black, etc. etc. How to create this physical/optical
effect in OpenGL?

Pang Fu

 
 
 

Looking behind a colored filter

Post by Andrew F. Vespe » Fri, 06 Jun 2003 10:20:03



> How to create an effect of looking at to the scene behind a colored filter ?

> Assume that you have a red (or, green, or blue etc) colored glass and you
> are looking at a scene behind this red glass. You'll see white object as
> red, green objects as black, etc. etc. How to create this physical/optical
> effect in OpenGL?

Enable blending and set alpha to a value close to 0.0. Be sure
to render all opaque objects first, then enable blending and
render translucent object in strict back-to-front order.

--
Andy V (OpenGL Alpha Geek)
"In order to make progress, one must leave the door to the unknown ajar."
Richard P. Feynman, quoted by Jagdish Mehra in _The Beat of a Different Drum_.

OpenGL Technical FAQ: http://www.opengl.org/developers/faqs/technical.html

 
 
 

Looking behind a colored filter

Post by Amit Rao » Fri, 06 Jun 2003 14:10:39


Hi,


> > How to create an effect of looking at to the scene behind a colored filter ?
--
> Enable blending and set alpha to a value close to 0.0. Be sure
> to render all opaque objects first, then enable blending and
> render translucent object in strict back-to-front order.

Or if you want that effect for the whole scene you might just simply
change the rgb of the gamma in a full screen or overlay application.

Hope that helps,
Amit Rao

 
 
 

Looking behind a colored filter

Post by Geoff » Sat, 07 Jun 2003 06:15:30



> How to create an effect of looking at to the scene behind a colored filter ?

> Assume that you have a red (or, green, or blue etc) colored glass and you
> are looking at a scene behind this red glass. You'll see white object as
> red, green objects as black, etc. etc. How to create this physical/optical
> effect in OpenGL?

If you want a red, green or blue filter over the entire screen, you
can use the write masks to do it.

void glColorMask(
  GLboolean red,
  GLboolean green,
  GLboolean blue,
  GLboolean alpha  
);

ie: red filter is glColorMask(GL_TRUE,GL_FALSE,GL_FALSE,GL_TRUE);

(you can use the color write masks to provide depth-cues with red-blue
glasses)

 
 
 

1. looking for info-color bitmap filters

I've been searching for books/algorithms/code/whathaveyou for examples of
filtering color pixel images for special effects. I've checked the FAQ
and the local library and bookstore, but so far not much info. There were
some common techniques like blurring and rotating. I'm looking for more
interesting things that can be done to an image. The graphics gems series
seems to have a bit of this stuff, but I was hoping to find something like
``101 fun filters for images, with C code (disk included).'' :-)

TIA,
Ron Beloin, Boyce Thompson Inst., Ithaca, NY

2. are graphics software skills marketable?

3. Looking for a filter that changes color of every other pixel

4. animated music videos

5. FILTERS FILTERS FILTERS FILTERS FILTERS FILTERS

6. Water-texture

7. Grayscale behind color object

8. pi 5 bugs.

9. color's the truth behind.??

10. Looking for Color Image -> Color PS source

11. Looking for Candela Color Color Synergy

12. Filters Filters Filters which ones??