Help with RGB colormaps

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
User avatar
DanPin
Posts: 161
Joined: Tue Mar 15, 2016 8:43 pm
Location: Los Angeles County, California

Help with RGB colormaps

Post by DanPin »

I was just making my second RGB colormap but with trouble.

Here's the code:

Code: Select all

A0=".16 + rnd(.32)"
A1=".32 + rnd(.64)"
A2=".64 + rnd(.128)"

B0=".1 * t / A0"
B1=".2 * t / A1"
B2=".3 * t / A2"

C0="i^40"
C1="5 * clip(i * .21)"

R="C0 * sqr(i + B0) * C1"
G="C0 * sqr(i + B1) * C1"
B="C0 * sqr(i + B2) * C1"

Vers=540
As you can see, you get no color but magenta; thus it does not change color at all. (I only know how to write HSV colormaps, although.) It then slowly diverse the white waveshape outline to too much brightness. If you reload it, you get white instead of full color. It got too complicated so I deleted it.

I need help with this. Very appreciated.

User avatar
BTT
Administrator
Posts: 2162
Joined: Sun Jun 20, 2010 9:34 pm
Location: United Kingdom

Post by BTT »

Hello DanPin

You may be aware that G-Force comes with 70 of my ColorMaps, plus there was an offer (now closed) of 347 ColorMaps I created for forum members. I now have 100 brand new ColorMaps never seen before which may or may not be available in the future.

I do not use the formula that you have used so cannot offer you any help. I devised my own formula for creating ColorMaps which I am keeping to myself. I suggest you just keep on experimenting, it took me more than a year before I mastered the art of creating the high quality ColorMaps that SoundSpectrum accepts.
.
Regards BTT

ColorMap Creator for G-Force and Aeon --- SoundSpectrum Forum Administrator.

User avatar
DanPin
Posts: 161
Joined: Tue Mar 15, 2016 8:43 pm
Location: Los Angeles County, California

Post by DanPin »

What?
BTT wrote: I do not use the formula that you have used so cannot offer you any help.
Oh, that's a shame. Only if I kept trying over and over again, it might work.

Well besides that,
BTT wrote:I now have 100 brand new ColorMaps never seen before which may or may not be available in the future.
Will you make an offer of those 100 maps pretty soon?

And,
BTT wrote: You may be aware that G-Force comes with 70 of my ColorMaps
I checked inside your BTT folder, and there was actually 85 colormaps.

Anyway, I still need help on that RGB map.

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

what value ranges are you trying to assign to R/G/B ?!?

[0 ... 1] is the only right answer, i.e.

Code: Select all

R="1"
G="0"
B="0"
should be ALL RED... but not too useful

also, using 'rnd()' in un-debugged code, is NOT advised ... by ME anyway!
(I'll let YOU figure out WHY!)

:roll:

User avatar
DanPin
Posts: 161
Joined: Tue Mar 15, 2016 8:43 pm
Location: Los Angeles County, California

Post by DanPin »

jerohm wrote:what value ranges are you trying to assign to R/G/B ?!?

[0 ... 1] is the only right answer, i.e.

Code: Select all

R="1"
G="0"
B="0"
should be ALL RED... but not too useful

also, using 'rnd()' in un-debugged code, is NOT advised ... by ME anyway!
(I'll let YOU figure out WHY!)

:roll:
No! Look again:

Code: Select all

R="C0 * sqr(i + B0) * C1" 
G="C0 * sqr(i + B1) * C1" 
B="C0 * sqr(i + B2) * C1"
The R, G and B parameters use expressions to make up the hue, saturation and value (just open up Clear Blue Water.txt for a better example). I'm not in interest on filling up the entire screen with only the color. I still need help to make it work!

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

you totally missed the point of my post. The only REASONABLE values that R/G/B can be assigned are between 0 and 1 inclusive, or they will be clamped (at the limits). These values can certainly be the result of an expression evaluation... as in your code.

First, to simplify the effort, lets suppose you keep the A vars static (during debugging anyway), i.e.,

Code: Select all

A0=".16"    // " + rnd(.32)" 
A1=".32"    // " + rnd(.64)" 
A2=".64"    // " + rnd(.128)"
at least your code won't be changing on every invocation... right??

MY problem (and yours) is I have absolutely NO IDEA what you are trying to accomplish with your B vars.
Since 't' goes from 0 -> Infinite (not really, but for practicality),
dividing by a value less than 1 is going to result in in some very large numbers quickly over time... right?

I fear the values you calculate for R/G/B are ALWAYS greater than 1 (and clamped there) after only a few seconds!

Writing code isn't like testing for spagetti doneness!!!
If you can't decribe to me in words, what your code is intended to do, how do you expect anybody else to?

I believe I mentioned this before, but if you expect to do anything significant, you need to develop debugging techniques that you feel comfortable with. GF provides ALMOST no help...
the best solution is NOT TO MAKE MISTAKES (this is a joke, but TRUE)

Since you now KNOW that the expressions assigned to R/G/B should be [0 ... 1], write a little program in the language of your choice:

that iterates 't' and 'i' over some limited discrete values, and print R/G/B values to validate your equations and build confidence you are on the right track...

ain't no easy answers here... roll up your sleeves and get to work.

:wink:

User avatar
DanPin
Posts: 161
Joined: Tue Mar 15, 2016 8:43 pm
Location: Los Angeles County, California

Post by DanPin »

jerohm wrote: First, to simplify the effort, lets suppose you keep the A vars static (during debugging anyway), i.e.,

Code: Select all

A0=".16"    // " + rnd(.32)" 
A1=".32"    // " + rnd(.64)" 
A2=".64"    // " + rnd(.128)"
at least your code won't be changing on every invocation... right??
OK, so without the rnd() expression, you get nothing but gold; thus it doesn't change color at all (it does the same thing as I mentioned), and you can't see the value.

Here's a simple clarence (CAUTION: it is clearly too bright):

Code: Select all

C0="i^1" 
C1="(5 * clip(i * .21))" 

R="C0 * (i + B0) * C1" 
G="C0 * (i + B1) * C1" 
B="C0 * (i + B2) * C1" 
But the sawtooth value is not present.

I still need help to make it work![/code]

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

I am not convinced your B var expressions make ANY SENSE whatsoever. >>> AFTER <<< you write a program that can SHOW ME what values you are assigning to R/G/B, I will take a second look. PROVE to me, that the values you are assigning to R/G/B are within the range of [0 ... 1].

(Keeping the A vars static was a [FREE] suggestion to help you in debugging... NOT THE ANSWER TO YOUR PROBLEM). You appear to be way out of your element. Think baby steps, because you are not ready for the deep end. Yes, I COULD debug your code (which I would be happy to do for the right $$$)... but what good would it do you???
:?

I am not trying to be a jerk, but YOU don't seem to have the drive to really attempt to UNDERSTAND the WHYs, and I have no intention of wasting my time... fair enough??

User avatar
DanPin
Posts: 161
Joined: Tue Mar 15, 2016 8:43 pm
Location: Los Angeles County, California

Post by DanPin »

OK, we're back into the discussion!

I finally made my sixth attempt on an RGB colormap I made, and it finally worked! Here it is:

Code: Select all

A0=".8 + rnd&#40;.16&#41;"

C0="A0 * &#40; sin&#40;.32 * t - i * PI * &#40; 2 * trwv&#40;t/5&#41; + 1&#41;&#41;&#41;"
C1="A0 * &#40; cos&#40;.32 * t - i * PI * &#40; 2 * trwv&#40;t/5&#41; + 1&#41;&#41;&#41;"

R="&#40;.4 + C0 * i &#41; * &#40; .5 * cos&#40; &#40;1-i&#41; *  15.707963267 &#41; + .5 &#41;"
G="&#40;.4 + C1 * i &#41; * &#40; .5 * cos&#40; &#40;1-i&#41; *  15.707963267 &#41; + .5 &#41;"
B="&#40;.4 + .6 * i &#41; * &#40; .5 * cos&#40; &#40;1-i&#41; *  15.707963267 &#41; + .5 &#41;"

Vers=540
I wrote an HSV-only Acid Gap formula onto R, G and B. It completely made up the hue, saturation and value, and hasn't grew the saturation. I'm very happy with it now.

Give it a try! :D

Post Reply