cmode lighting

DanKarron at UCBVAX.BERKELEY.EDU DanKarron at UCBVAX.BERKELEY.EDU
Sat Apr 20 09:09:08 AEST 1991


>From: "Ronald D. Anderson" (IBD) <andy at BRL.MIL>
>To: info-iris at BRL.MIL
>Subject:  cmode lighting
>Message-Id:  <9104191049.aa04848 at IBD.BRL.MIL>
>
>am using a 4D/70G system, and want to use a lighting model while in
>color-map mode.  anyone out there have a (preferably simple) example?
>
>i will be drawing a 3-d surface of many polygons, and will be rotating
>this surface about at least two axes.  the lighting model can be at
>infinite distance, or may be local.
>

The use of color map mode are limited, and the manual does not recommend using
this.

>From the Graphics LIbrary Programming Guide, 9-24, section 9.8:

There is a way to do lighting in color map mode, but it is designed for
systems without enought bit planes to support RGB mode. On graphics systems
with enough bitplanes, RGB mode lighting is is recommended.

Color map lighting generates a pseudo-intensity which is a function of the
direction to the light source and the direction to the viewpoint. This pseudo-
intensity is mapped to a color map value. A well-chosen range of color map
values givea a reasonable lighting effect. You can represent multiple
materials by creating a color map range for each material (UCK!). Color map
lighting is enabled when both lighting an color map mode are enabled.

----------------------------------------------------------------------------

I have a problem porting a color map based system to the RGB environment
mainly for the purpose of using the advanced lighting subroutines. 

My solution is based on this: Instead of trying to use lighting models 
in color map mode, I have decided to try
to simulate the color map mode in RGB mode. I will make a private color map
and take all of the color calls and change them to RGB calls via a
intermediate subroutine. 

I am doing it right now, and I will post the code that seems to work.

If anyone else has idea, I would like to hear them too.

| karron at nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
| Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
| 560 First Avenue                       Digital Pager <1> (212) 397 9330    |
| New York, New York 10016               <2> 10896   <3> <your-number-here>  |



More information about the Comp.sys.sgi mailing list