[comp.sys.mac.programmer] Fading with clut devices

odreer@iiic.ethz.ch (Oliver Dreer) (01/01/91)

I saw this nifty fade effect in several programs, especially
MM Director. Now I want to do a 'Fade out' at the beginning
of my programm.
Has anybody solved this problem?
I guess there is byte or an int on the videocard, where the
brightness is stored. But where is the memory cell??

Thank to the net.(this is my first post!!)
 
   

leonardr@svc.portal.com (Leonard Rosenthol) (01/07/91)

In article <19764@neptune.inf.ethz.ch>, odreer@iiic.ethz.ch (Oliver Dreer)
writes:
> I saw this nifty fade effect in several programs, especially
> MM Director. Now I want to do a 'Fade out' at the beginning
> of my programm.
> Has anybody solved this problem?
> I guess there is byte or an int on the videocard, where the
> brightness is stored. But where is the memory cell??
> 
	There are a number of different types of 'fades' that you could do in 
order to have a 'Fade Out' in your program.  The simpliest is where you would 
simply dim the color table (clut) of your window until it reached black, 
while the most difficult would be actually 'fading' one picture into another
(note I said 'fade' and not 'dissolve').  I have only seen one or two people
ever successfully do a 'fade' between two picts, but it looks REALLY cool!
	You can also dim a graphics device (monitor) in a couple of ways
- from simply dimming its clut, to doing something called 'gamma correction'.
The former is simplier, but will only work on devices which have cluts (you
can check the gdType to find this), while the latter is more difficult and
only works on monitors with gamma tables (like the Apple RGB).  Gamma correction
is the method used by screen savers like Dimmer and the FadeAway module of
After Dark, and requires the you make special formatted driver calls to the
video driver.  (there are some docs for it on Applelink, and also some stuff
about it in the 'Designing Cards and Drivers' book by AW).
	I know that didn't give you a direct answer, but it should give you
some more information on which to better ask for more infomation...

Leonard Rosenthol
--
----------------------------------------------------------------------
+ Leonard Rosenthol              | Internet: leonardr@sv.portal.com  +
+ Software Ventures              | GEnie:    MACgician               +
+ MicroPhone II Development Team | AOL:      MACgician1              +
----------------------------------------------------------------------

mlab2@kuhub.cc.ukans.edu (01/07/91)

In article <19764@neptune.inf.ethz.ch>, odreer@iiic.ethz.ch (Oliver Dreer) writes:
> I saw this nifty fade effect in several programs, especially
> MM Director. Now I want to do a 'Fade out' at the beginning
> of my programm.
> Has anybody solved this problem?
> I guess there is byte or an int on the videocard, where the
> brightness is stored. But where is the memory cell??
> 
> Thank to the net.(this is my first post!!)
>  
I've been curious about this as well.  Having only barely dabbled in color, is
it possible to run all the colors on the palette through a loop that steps them
through to black?  (Or vise versa for a fade-in-from-black.)

john calhoun