Re: Model textures

New Message Reply Date view Thread view Subject view Author view

MLM Veraart (Veraart++at++fel.tno.nl)
Fri, 22 Oct 1999 15:19:35 +0100


Wear, Mark wrote:
>
> I can use two separate channels, one color and one monochrome. I'm not very
> familiar with the use of a pfColortable. Is it possible to map a RGBA color
> texture to a monochrome texture using one? The man page suggests (to me at
> least) that the table takes an intensity or color component value and maps
> it to a color vector. I don't see how to use that to map a color texture to
> a monochrome texture. What am I missing?

You can use glColorTableSGI(GL_TEXTURE_COLOR_TABLE_SGI, ...) to select a color
table to be applied to the samples taken from the texture.
You call this function in the drawcallback or in the node drawcallback.
Select a monochroom one to translate the texture colors to grey values.

Examples can be seen at http://www.dorbie.com in the section about infrared
rendering.

Mario Veraart

> Mark E. Wear
> Senior Electronic Systems Engineer:
> Real-Time Simulation
> Lockheed Martin Missiles and Fire Control
> (972) 603-2758
> mark.wear++at++lmco.com
>
> > ----------
> > > I need to be able to render both color and monochrome versions of the
> > same
> > > OpenFlight model simultaneously. I would like to derive the monochrome
> > > version from a model with color texture during initialization. Are there
> > any
> > > shortcuts to doing this?
> > >
> > > Thanks,
> > > Mark
> >
> > I suggest you modify the color table at runtime. Is it possible that you
> > use
> > two separate channels (one color, one monochrome)? That way you won't
> > have to
> > toggle the state every time you draw the object.
> >
> > You might also be able to do this by using color conversion while doing a
> > glCopyPixel but even if it is possible, it would probably be slower than
> > using
> > the color table.
> >
> > regards, Sylvain


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Oct 22 1999 - 06:20:15 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.