|
|
You could also do something different:
imagine the blue-component as a linear
interpolation from 0 to 1. The closer
the value gets to 1, the more blue you
get.
What about this: model an interpolation
line. For example, it takes values ranging
from 0 to 1 and returns a value from 0 to
1. In the normal world, the input-value
corresponds to the output. But, if you
create an array of vertices in the UV-Room,
and the input is used as movement along the
U-axis, and the V-axis is the output...
You could then just model an array which leaves
gaps.
Here's some code from my bsplines.inc:
//Linear_Pos
//Usage: Call Macro with Linear-I-Array and Mover between 0 and 1 (beginning
and end of spline)
#macro Linear_Pos(_Linear_Array,_LI_Mover)
//Amount of Interpolations
#local _Linear_Sections = dimension_size(_Linear_Array,1)-1;
//Node_Mover-Corrections, keeps them in boundaries
#if (_LI_Mover > 1) #local _LI_Mover=1; #end
#if (_LI_Mover < 0) #local _LI_Mover=0; #end
#if (_LI_Mover = 0)
#local _Linear_Pos_ = _Linear_Array[0];
#end
#if (_LI_Mover = 1)
#local _Linear_Pos_ = _Linear_Array[_Linear_Sections];
#end
#if (_LI_Mover > 0 & _LI_Mover < 1)
#local _Actual = floor(_LI_Mover*_Linear_Sections);
#local _Next = floor(_LI_Mover*_Linear_Sections)+1;
#local _Time = _LI_Mover*(_Linear_Sections)-_Actual;
#local _Linear_Pos_ =
_Linear_Array[_Actual]+(_Linear_Array[_Next]-_Linear_Array[_Actual])*_Time;
#end
_Linear_Pos_
#end
For example, if you'd wanted to leave out
the region ranging from .4 to .6:
#declare Blue_Color=array[4]
{ <0,0,0>,<.499,.4,0>,<.501,.6,0>,<1,1,0>}
There would still be a very small possibility of
the wrong color being picked, but its much less
and easy to handle.
To then get the appropriate color, use this:
Linear_Pos(Blue_Color,rand(R)).y
It'll return the height of the interpolation, which'll
be used as the color...
--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
> Yup, been trying something close to that. I've been looking at the initial
> red value and then trying to adjust the green and blue so that they
> produced less pink. Modulating the blue based on my red and green values
> would have been easier.
>
> The problem I've been running into is that there are a wide range of
colors
> I don't like. i.e. playing around with a color sampler (rgb 255), these
> are some of colors (ranges) I consider 'annoying' pinks:
> 255, 175, (255 through 170)
> 255, 129, (255 through 120)
> 255, (0-230), 240
> 255, 129, 180
> 200,0, (160 through 75)
> 180,0, (180 through 75)
> 170,0,(130 through 110)
> 170,(0 through 70), 90
>
> The killer has been that I can get the undisirable pinks in a red range of
> 170-255, green range of 0-230, and blue range of 75-255. I've been amazed
> at the sheer number of pinks I don't like. :) I could definitely write a
> large block of logic that avoids all of those ranges, and that may be the
> least painful option available.
>
> I was hoping for some sort of color space magic bullet like: "to avoid
> annoying pinks, add the arctangent of green + blue to the red". Of
course,
> I also hope for world peace, but I don't want to give up on either hope
> just yet.
>
> thanks,
> Steven
>
>
> Tim Nikias v2.0 wrote:
> >Well, if you' experiment a little, you'll find the rgb values
> >around which pink occurs. Making the different
> >colors thus dependant on each other so that they avoid
> >it might be a way to go.
> >First, calculate red and green. If both of them are in
> >a certain designated range, just leave blue out, or
> >weak, or strong, or whatever.
> >
> >Tim Nikias v2.0
> >Homepage: http://www.digitaltwilight.de/no_lights
> >
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.495 / Virus Database: 294 - Release Date: 30.06.2003
Post a reply to this message
|
|