PDA

Click to See Complete Forum and Search --> : Get/SetPixel


schnarf283
Nov 10th, 2000, 09:41 PM
I am working on a program to do lightsaber effects. The algorithm can print it on a black background. I can add the color values using Get/SetPixel, but it does some weird things. Download the file here (http://www.geocities.com/sithrebel/saber.zip). You will need to right click and choose save file as. Just open it, click on a color button, and click the Get/Set Pixel button. Then click Ok! in the new window. You can see what I mean. Anyone know how to fix it? I know this program is disorganized. It is a test, so I can get the core to work before I implement most of the features.

schnarf283
Nov 11th, 2000, 03:58 PM
no one knows?

bbosh
Nov 11th, 2000, 10:35 PM
I havent checked your source but are you weighting the colors? EG,

DispPixelColor = (BGColor * 0.2)+(FGColor * 0.8)

Otherwise, you'll get some funny results

schnarf283
Nov 12th, 2000, 08:23 AM
I'm not. It averages the colors:
disp=(color1+color2)/2

schnarf283
Nov 12th, 2000, 01:18 PM
Wait! Id adds the colors, as the saber is rendered on a clack background. However, assuming res is the result pixel color, I do have:

if res>RGB(255, 255, 255) then res=RGB(255,255,255)

So it should work.

bbosh
Nov 12th, 2000, 01:44 PM
It should work then. Maybe you don't have enough colors available on your local system?

schnarf283
Nov 12th, 2000, 02:21 PM
32 bit 1152x864.