|
![](/i/fill.gif) |
Neil Kolban nous apporta ses lumieres en ce 2005-01-18 23:21:
> Folks,
> I was having a go at updating our wiki on an area I am studying ... function
> based patterns ...
>
> http://www.wikipov.org/ow.asp?FunctionBasedPatterns
>
> As I started writing what I thought I knew, a question struck me that I
> think I need some help with.
>
> If I declare a function foo(x,y,z) ... then this function is going to return
> a float calculated from x, y and z.
>
> And this is where I get confused ...
>
> If the value returned is between 0 and 1 .... 0.0 <= value <= 1.0 then I see
> how that can be applied to a color map to generate an appropriate color.
> But what about values outside of the color map range ... what of values <
> 0.0 and > 1.0 ... how do they get mapped to a color value?
>
> I am going to guess that the integer portion is thrown away ... but that is
> a guess ...
>
> so
>
> 2.73 -> 0.73
> 199.2 -> 0.2
> -56.6 -> 0.6
>
> But this is a guess ...
>
> Neil
>
>
I think that you'll have to use some math to reduce it to the 0..1 range. Values over
1 or under 0
will show as 1 or 0 in a normal scene. The colours <1,234.2,-0,5> and <1,1,0> render
the same. If
you use radiosity, it can have a big effect on your results.
Alain
Post a reply to this message
|
![](/i/fill.gif) |