|
|
First thanks for you pointing out my mistakes. I have read Foley's book
"Computer Graphics Principles and Practice" and Hill's book "Computer
Graphics using OpenGL" and will borrow the book "An Introduction to Ray
tracing" from our library and read it.
The POV scene I used to test is
===================================================
global_settings { max_trace_level 5 }
global_settings { ambient_light rgb<0.3, 0.3, 0.3> }
background { color red 0 green 0 blue 0 }
camera
{
location <0, 0.0, -6>
angle 45.0
look_at <0, 0.0, 0>
}
sphere
{ <0, 0, 0>, 1
pigment{rgbf <0, 0.0, 0.0>} // black
finish { ambient rgb<0.6, 0.6, 0.6> }
}
===================================================
I did define the pigment for the object, just define it black rather than
other color on purpose. What my understanding through reading Foley's book
and Hill's book is that the ambient light should contribute to the final
color of the ray even though the diffuse color of the object hit by the ray
is black.
Please correct me.
Thanks,
Jing
Post a reply to this message
|
|