|
|
Subclick <no### [at] spam> wrote:
> "Kenneth" <kdw### [at] gmailcom> writes:
> > After reading the various suggestions here, I
> > experimented with different
> > set-ups, and finally found one that works...
>
> I've tried that out, too. With a shadowless light source, you don't
> get highlights. You can remedy this by setting no_shadow for both
> the wall and the gnomon, and putting the former in a light group
> with a negative-intensity light source projected through the gnomon.
That is a really clever solution, and a good improvement. I didn't notice the
lack of highlights in my own test.
At first, I thought that the negative light_source would 'invert' the color of
the wall object; but that's not the case.
Here's my own demo code. (Note that the light_group requires global_lights ON).
-------
#default{finish{ambient .04 diffuse .8}}
camera {
perspective
location <-4, 2.5, -3>
look_at <0, 0, 0>
right x*image_width/image_height
angle 40
}
// light_source A-- main
light_source {
0*x // light's position (translated below)
color rgb <1,1,1> // light's color
translate <20, 20, -20>
}
plane{y,0 pigment{rgb .2}}
// large horizontal disc
superellipsoid{ <1,.2> rotate 90*x scale 1.5*<1,.1,1>
texture{
pigment{ rgb .5*<.6,1,.6>
}
finish{phong .8}
normal{bumps .7 scale .1 bump_size 1}
}
}
// --- sundial ---
#declare GNOMON =
cylinder{0,-.55*z,.02
pigment{rgb <.8,.2,.2>}
rotate -40*x
translate .9*y
no_shadow
}
object{GNOMON}
light_group{
// light_source B-- same position as light_source A
light_source {
0*x
color rgb -1 // NEGATIVE light
translate <20, 20, -20>
projected_through{GNOMON}
}
// vertical wall
superellipsoid{<.1,.3> scale <.7,1,.08>
texture{
pigment{rgb <.95,.85,.55>}
finish{phong 1}
}
no_shadow
}
global_lights on
} // end of light_group
Post a reply to this message
Attachments:
Download 'sundial_shadow_solution_2.png' (119 KB)
Preview of image 'sundial_shadow_solution_2.png'
|
|