|
|
I'm not sure I understand what you want to achieve.
When you exclude specular highlights, reflections, transparency etc. the colour
of the surface can be calculated with the following formula:
(pigment * diffuse * light_colour + ambient)
The ambient value (rgb <0.1,0.1,0.1> by default) is simply added to whatever the
apparent colour of the object is at a given point (i.e. it just brightens the
object by a constant amount).
The value 'diffuse' you specify in the finish statement is the maximum value.
The actual value used for a particular point falls off from the maximum (where
surface points straight towards the light_source) to zero (where surface points
away from the light_source).
So the apparent colour of a surface varies greatly depending on how much light
it receives. When it receives less light, a higher ambient value is needed to
balance the lower diffuse lighting. Diffuse varies over the surface. Ambient
does not. There is no universal formula.
Margus
Leroy Whetstone wrote:
>
> I've been playing with the ambient settings.
> I'm looking for a function that can be used to keep an object's color roughly
> the same when you add ambient.
> What I did was place 2 boxes side by side one with ambient set the other not
> and adjusted the color of the ambient box until it match the color in the
> plain box.They where lit by a spotlight pointed at their midpoint.
> What I found was that with plain box set to rgb<0,0,1> the ambient values and
> color where:
> pigment ambient
> rgb< 0,0,1.17 > 0
> rgb< 0,0,.633 > .5
> rgb< 0,0,.433 > 1
> This is just a sample I tested every tenth point from 0 to 1.
> From the data I have there is no linear function that works.
> From the help file it says that ambient adds a small amount of white light but
> that is as far as it goes.
> If someone knows of a function that can do what I want then THANKS!
> If not then I'll just have to do the math and come up with one that I'll post
> here.
>
>
Post a reply to this message
|
|