I tried to make a color-spectrum, but somehow i always get this disturbing gap between blue and red instead of violet and purple. Can anyone please help?
Announcement
Collapse
No announcement yet.
There's no purple in the rainbow?
Collapse
X
-
i am not normal, no really.
Comment
-
I saw violet in a preset(don't remember which), I don't know if it's a legitimate AVS color, but you could try it.
I'm going to fiddle around with this some, and see what I cand do(if anything).
*************************************
Minor Fiddling around, nothing fancy.
*************************************
Grr, one step forward and two steps back. It's not really what you want, but channel shift placed beneath the ssc will give you violetUnfortunately, it only shifts the problem. Yellow and orange are now absent
*************************************
I'm off to tinker some more
*************************************Last edited by Nolita; 29 November 2004, 08:47.
Comment
-
I think I found some possible help. In Pak-9's AVS 4 SE pack, there's a preset called "Collaborations - Montana vs Pack-9 - Winterkitten." It contains a rainbow with sort of a purple mist swirling around it. There isn't a single color map in the whole darned thing, no invert either. There are however,
7 superscopes, + several other elements/apes at work.
Unless somebody more experienced has your answer, and can give it to you off the top of their head, I'm going to try and isolate, what makes the purple. I'm almost positive your scope needs more code. What I'm not sure of is whether or not you will need at least one more ssc to make the effect you want.
Comment
-
Quick disclaimer, since I'm still very new, I don't know how much this will help, but it's from the preset I was telling you about.
____________________________________- init
p=acos(-1); n=128; - frame
af=min(h,w)/max(h,w); - beat
vv=getosc(0.45,0,0); - point
r=i*p-p*0.5; d=0.2;
x=af*sin(r)*d; y=-cos(r)*d+0.25;
red=c*0.75; green=0; blue=c*0.9;
c=if(above(abs(vv),0.5),0.5,1);
____________________________________
That makes a purple arc.
Comment
- init
-
- Don't use linesize=h for a fullscreen gradient since linesize is capped at 256, there for your gradient will "break" after that and most of the people do use taller window size than 256. Instead center the line at the y-axis and then just use a movement with y=0.
- If you use a numpoint value that depends on the screen size it is best to define it per frame, that way it will have enough points even if the user changes the resolution without reloading the preset (entering fullscreen for example).
- The AVS window goes from -1 to 1 on both x & y axis, so when you define x=(i-0.5)*3 it ranges from -1.5 to 1.5 and there for you're drawing stuff that's outside the screen.
Oh and here's a simple method for doing a rainbow gradient, but im too lazy to explain it.
(gah, fine, so i can't explain itsatisfied?
)
Attached Files
Comment
-
thank you all for your efforts! I've got a free minute right now, so i can work through your tips! Hopefully i'll get it to work...
@ nolita: i remember this preset but infortunately the rainbow is rendered by a few sperated lines, so i cannot (or am to stupid to) use it.
Sorry, tug, for those "noobish mistakes".
Normally i do use just a single-line scope + y=0 movement and i keep (i-0.5)*2..., but since i was concentrated on the color code on this one i didn't pay attention to formality.
However, it's just what i was looking for. But you have to explain one thing: why do you add 2.07 / 4.14?? I changed the values in my code from $pi/2 and $pi to yours and voilá: it works!! Any idea??
-----------EDIT----------
I got it!!!
2.07 is roughly 2/3 * $pi (so 4.14 is 4/3 * $pi). So i just shifted the color phases by the wrong values. Damn! How stuuupid!!!
Comment
-
Yay!
I'm happy the violet question has been answerred.Only now I'm lost again.
In Tuggummi's spectrum the following code is used for the color:
red=sin(ipi+2.07+t)*intes+bright ;
green=sin(ipi+4.18+t)*intes+bright ;
blue=sin(ipi+t)*intes+bright
It introduces terms/variables to code that I hadn't seen before. intes+bright ; I have to ask, are there other terms that I would never think to include in code? Is there a place where I can find a list of these "unconventional" terms/variables? Mind you I'm not entirely sure variable is the right word. I searched and searched, even using words like tutorial, list, and variables.
BTW, just from a single color perspective, I'm trying a theory of any color being possible by converting hex to rbg. I have no idea if it will work though
Comment
Comment