|
-
Mar 16th, 2002, 03:19 PM
#1
Thread Starter
Frenzied Member
Palette switching
Hey everyone
well I made some little thingy that works with 8 bit colors in DX7. Well I finally managed to do some palette switching, now I would like to know how I should edit the pallets to change the colors slowly from one to another...
I hope you get what I want
it can be seen in many winamp visualizations and stuff like that...
Sanity is a full time job
Puh das war harter Stoff!
-
Mar 16th, 2002, 07:23 PM
#2
Addicted Member
PlatteSwitching was a common way to do animation - let the display drivers do all the work for you (sim city 2000 used it)
if you want to fade from one colout to another, just slowly change the 8 bit colour value towards he colour your heading for
remember very palette entry you change, changes ALL the pixels that use that entry.
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Mar 16th, 2002, 08:13 PM
#3
Thread Starter
Frenzied Member
thanks
well I do know about that.
What I want to do is switch all the palette values so I have a slow fade from one color to another... (will all its modulations...)
Sanity is a full time job
Puh das war harter Stoff!
-
Mar 16th, 2002, 08:42 PM
#4
Addicted Member
Well for a 24bit colour value you got:
&HFFFFFF 'white
and &H000000 'black
if you want to fade between then them in 16 frames
then it would simply be values:
&HFFFFFF
&HEEEEE
&HDDDDD
&HCCCCC
&HBBBBBB
&HAAAAAA
&H999999
&H888888
...
...
&H111111
&H000000
for Red:
FF0000:
to green
0000FF
in three steps then each step is
(red - green) /3
so FF0000 - 0000FF = FEFF01
FEFF01 / 3 = 54FFAB
so the values would be
ff0000 - 54FFAB
= AA0055 - 54FFAB
= 5500AA - 54FFAB
= 0000FF
Some Days, i just get this feeling that i'm helping to write dozens of Viruses...
-
Mar 17th, 2002, 06:00 AM
#5
Thread Starter
Frenzied Member
alright I think I got you
I am using only 8bit, but that should work too
thanks for the help
I am sure to be back for some further questions about that real soon
Sanity is a full time job
Puh das war harter Stoff!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|