|
|
Jellby <jel### [at] M-yahoocom> wrote:
> Among other things, dan B hentschel wrote:
>
>
> > I like the photon effects in the right side image, but I don't like the
> > shadowy interior of the block. Again, any suggestions would be
> > appreciated.
>
> Not that I have any useful idea, but are the plastic walls solid? Do they
> have outer surface, inner surface and an interior or are they just the
> outer surface of a clipped/hollow box?
>
> --
> light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
> 9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
> 0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
They are completely CSG objects. Here is the code:
#declare clear_round_corner_box =
intersection {
merge {
// Front left corner
cylinder {
<-box_size + corner_width, -2*box_size, -box_size + corner_width>
<-box_size + corner_width, 2*box_size, -box_size + corner_width>
corner_width
}
// Front right corner
cylinder {
<box_size - corner_width, -2*box_size, -box_size + corner_width>
<box_size - corner_width, 2*box_size, -box_size + corner_width>
corner_width
}
// Back left corner
cylinder {
<-box_size + corner_width, -2*box_size, box_size - corner_width>
<-box_size + corner_width, 2*box_size, box_size - corner_width>
corner_width
}
// Back right corner
cylinder {
<box_size - corner_width, -2*box_size, box_size - corner_width>
<box_size - corner_width, 2*box_size, box_size - corner_width>
corner_width
}
box {
<-box_size + corner_width, -2*box_size, -box_size>
<box_size - corner_width, 2*box_size, box_size>
}
box {
<-box_size, -2*box_size, -box_size + corner_width>
<box_size, 2*box_size, box_size - corner_width>
}
}
box {
<-box_size-0.001, -box_size, -box_size-0.001>
<box_size+0.001, box_size, box_size+0.001>
}
}
#declare glass_walls =
difference {
object {
clear_round_corner_box
scale <1, glass_height*0.9999/box_size, 1>
}
object {
clear_round_corner_box
scale <(box_size-wall_thickness)/box_size, 2,
(box_size-wall_thickness)/box_size>
}
texture {
finish {
specular 1
roughness 0.02
ambient 0
diffuse 0.1
reflection {
0.06, 0.45
fresnel on
}
conserve_energy
}
pigment { Clear }
}
interior {
ior 1.7
fade_distance 1.0
fade_power 2
}
photons {
target
refraction on
//pass_through
reflection on
collect off
}
}
- dan B hentschel
Post a reply to this message
|
|