Re: Lookup table question.

New Message Reply Date view Thread view Subject view Author view

Chikai Ohazama (chikai@talula.engr.sgi.com)
Sun, 15 Aug 1999 23:51:35 -0700 (PDT)


Sorry about the duplicate reply... ;)

________________________________________________________________________
Chikai J. Ohazama, Ph.D. SGI
Member of Technical Staff 2011 N. Shoreline Blvd. ms 525
Advanced Graphics Division Mountain View, CA 94043.1389
                                     Telephone: (650) 933-6533
                                     FAX: (650) 932-0511

On Fri, 13 Aug 1999, Dave Akers wrote:

> Hi Mark,
>
> Here's what happens in your example scenario:
>
> The "-lut 50 55" creates a linear ramp table with 256 floating point
> entries, and fills these 256 entries with values ranging from 0 to 1 (the
> ramp is centered at 50, with width 55.) Since your data is in RGBA
> format, the single-valued LUT data is duplicated within Volumizer to form
> RGBA 4-tuples. Lookups to this table work independently in R,G,B, and A.
> So let's say your value was (r,g,b,a). This is rescaled into indeces (r',
> g', b', a') from 0..255, and these values are used to index into the
> color lookup table. It's just a level of indirection in each channel for
> calculating final values.
>
> Here's a section of the glColorTableSGI man page that provides a more
> general explanation:
>
> > Each pixel group has color components (R, G, B, A) which are in the
> > range
> > [0.0, 1.0]. The color components are rescaled to the size of the
> > color
> > lookup table to form an index. Then a subset of the components
> > based on
> > the internal format of the table are replaced by the table entry
> > selected
> > by that index. If the color components and contents of the table
> > are
> > represented as follows:
> >
> > Representation Meaning
> > _________________________________________________
> > r Table index computed from R
> > g Table index computed from G
> > b Table index computed from B
> > a Table index computed from A
> > L[i] Luminance value at table index i
> > I[i] Intensity value at table index i
> > R[i] Red value at table index i
> > G[i] Green value at table index i
> > B[i] Blue value at table index i
> > A[i] Alpha value at table index i
> >
> > Then the result of color table lookup is as follows:
> >
> > Resulting Texture Components
> > Table Internal Format R G B A
> > _____________________________________________________
> > GL_ALPHA R G B A[a]
> > GL_LUMINANCE L[r] L[g] L[b] At
> > GL_LUMINANCE_ALPHA L[r] L[g] L[b] A[a]
> > GL_INTENSITY I[r] I[g] I[b] I[a]
> > GL_RGB R[r] G[g] B[b] A
>
> > GL_RGBA R[r] G[g] B[b] A[a]
>
> Let me know if you still have any questions..
>
> -Dave
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Nov 01 1999 - 14:21:40 PST