Computer Science Canada fade out |
Author: | rollerdude [ Thu May 03, 2007 8:42 am ] | ||
Post subject: | fade out | ||
basically what i'm trying to do is make the screen appear to fade out. problam, is have an object that isn't white, so simply telling it to draw it the color of one of the pre-define colors that previous to the one its at now won't work so.. heres my code, i want the box to disappear.
|
Author: | rollerdude [ Thu May 03, 2007 8:44 am ] |
Post subject: | Re: fade out |
grrr... *smacks himself in forhead* i have some wrong code there newcolor -= RGB.AddColor (0, 0, 2) is supposed to be newcolor -= RGB.AddColor (0, 0, i-17) so... its not working... any help would be nice... |
Author: | Drakain Zeil [ Thu May 03, 2007 3:03 pm ] |
Post subject: | RE:fade out |
I haven't used turing in years, but all I can think of is that using max_ and 0 drawn part of the box offscreen, try using 1 insetad of 0. |
Author: | rollerdude [ Fri May 25, 2007 10:17 am ] | ||
Post subject: | Re: fade out | ||
new algorithym...still not working,maybe this ones a bit better?
|
Author: | Cervantes [ Fri May 25, 2007 4:53 pm ] |
Post subject: | RE:fade out |
If you want to fade the entire screen out, you won't be able to just cycle through the colours in the standard pallete that they give you. Instead, you're probably going to have to whatdotcolour each pixel, then use the RGB module to get the RGB components of that colour, then modify them all by a bit (subtract a constant from each of them, but make sure that constant is scaled for each of them so that you reach black all at once), then draw that new coloured pixel there, then move to the next pixel. This will probably be very slow, but I can't really think of any other way to do it. Also note that whatdotcolour matches to the current colour palette, so if you modify it, then whatdotcolour will produce different results. |
Author: | DIIST [ Sun May 27, 2007 9:08 am ] |
Post subject: | Re: fade out |
look into takepic and drawpic. I know for sure you can create a realistic fade effect by just decreasing the r,g,b values in the buffer by 1 and displaying the picture each time. Im not much of a pro with takepic and drawpic, but if you have any question, you should probably ask someone like zylum, hes pretty good at this stuff! ![]() |
Author: | rollerdude [ Mon May 28, 2007 8:08 am ] |
Post subject: | Re: fade out |
thnx... i'll pm zylum, but thats what i was doing with my second code, but as it went through the screen, everthing that was white, it turned black, and everything thas wasn't white, it turned white, so.... |
Author: | Tallguy [ Mon May 28, 2007 8:16 am ] |
Post subject: | RE:fade out |
cool, really hard |
Author: | Cervantes [ Tue May 29, 2007 3:44 pm ] |
Post subject: | RE:fade out |
In the shoutbox, you said you still needed help here. What is there left to help you with? I gave you one option and thuvs gave you another option (assuming you've got Turing 4.1). You said something kinda incomprehensible about white turning into black and white turning white... We can't debug your code if you don't give us the code, and we can't tell you what's wrong if all you give us is a vague and muffled description of your problem. |
Author: | rollerdude [ Wed May 30, 2007 1:00 pm ] |
Post subject: | Re: fade out |
i still need help because my code is not working... the rgb routine is truning everthing thats not white, white, and everything thats was white, black... so.... |
Author: | Cervantes [ Wed May 30, 2007 6:46 pm ] |
Post subject: | RE:fade out |
So.... So you expect me to fix your code? How am I supposed to do that if I can't see it? I'm not telepathic. So you expect me to tell you what's wrong with your code and how you should fix it? I can't do that if you don't give me a clearer description of your problem. How strange--it feels like I made essentially this exact same post already. |
Author: | DIIST [ Wed May 30, 2007 7:32 pm ] |
Post subject: | Re: RE:fade out |
Cervantes @ Wed May 30, 2007 6:46 pm wrote: How strange--it feels like I made essentially this exact same post already. Feel the same way over here. RollerDude you might want to post your code if you want our help. We cant always play mind games, regardless of how we are good at it. I guessing your using RGB.SetColor in your code. If you are, then you need to be aware that changing that standard pallet will effect turing drawn object, changing there color as well. If you have turing 4.05 then just picscreen and do the fade effect which is included in that version. |
Author: | rollerdude [ Thu May 31, 2007 9:27 am ] | ||
Post subject: | Re: fade out | ||
*smacks his head*... its the second code i posted.. i think its the third reply... that code isn't working does this help? you dont have to be telepathic to scroll up... *sigh*.. i guess ill post it again i said... new algorithym...still not working,maybe this ones a bit better?
|
Author: | Cervantes [ Thu May 31, 2007 9:58 pm ] |
Post subject: | RE:fade out |
Yeah, if you read the documentation for anything in the RGB module, you'll find that the red green and blue components are real numbers between 0 and 1. So when you subtract 1 from each component, you're doing a heck of a colour shift. If you want an approach that works, you'll have to do a little bit of algebra. |
Author: | DIIST [ Thu May 31, 2007 10:26 pm ] |
Post subject: | Re: RE:fade out |
Cervantes @ Thu May 31, 2007 9:58 pm wrote: If you want an approach that works, you'll have to do a little bit of algebra. Ive done it two ways. You can either decrease the r,g,b component as real values by 1/255 or you can try to preserve the r,g,b, ratio and try to decrease them all at once by decreasing one and decreasing the others with respect to the original ratio. The second method is what they do in real life, but the first one is a quick way to do it. The second method however looks a bit nicer and would provide the same effect as if you are using the yuv color space and just decreasing the luminance component. ![]() |
Author: | rollerdude [ Fri Jun 01, 2007 8:24 am ] |
Post subject: | Re: fade out |
SWEET SUCCESS!!! now, is there any way to speed it up? |
Author: | Cervantes [ Fri Jun 01, 2007 7:08 pm ] |
Post subject: | RE:fade out |
Not really. Sorry. |