|
|
Daniel Sullivan wrote:
>
> I know I've seen this question posted before, but how can you simulate
> translucency in pov.....such as a light source behind a backlighted
> sign.
>
> Thanks in advance.
Funny you should ask. I was going to ask about this phenomenon where
bicubic patches seem to exhibit translucent. They aren't transparent
(when no filter or transmit applied to the pigment) but do seem to allow
highlights and shadows to show up on the supposedly dark side.
Here is the source for a sample image I made to demonstrate it:
[more babbling follows source file]
// ------------- start of source file -----------
#version 3
global_settings { assumed_gamma 1.8 }
camera {
location <-10, -1, -20.0>
angle 15
right 2*x
look_at <0.0, 0.5, 0.0>
}
light_source { <150, 200, -25 > color rgb 1}
plane {
z, 2
pigment { checker color rgb 1 color blue 0.8 }
finish {diffuse 1.0 ambient 0.2 }
scale 0.5
}
#declare myPatch = bicubic_patch {
type 1
flatness 0.01
u_steps 3
v_steps 3
<0, 3, 1.0> <1, 2.5, 1.0> <2, 2.5, 1.0> <3, 3, 1.0>
<0, 2, -0.5> <1, 2.0, -0.5> <2, 2.0, -0.5> <3, 2, -0.5>
<0, 1, 0.0> <1, 1.0, 1.0> <2, 1.0, 1.0> <3, 1, 1.0>
<0, 0, 2.0> <1, 0.5, 2.0> <2, 0.5, 2.0> <3, 0, 2.0>
translate <-1.5, -1.5, 0>
texture {
pigment {color red 1 filter 0}
finish {phong 1 phong_size 100 ambient 0 diffuse 0.9}
}
}
object { myPatch translate x*2.5}
object { myPatch rotate y*180 translate -x*2.5}
sphere { // green ball
< -1.5, 2, -0.6 > 0.3
texture {
pigment {color rgb < 0,0.9, 0 >}
finish {phong 1}
}
}
// -------- end of source file ------------
and, here is a small jpeg of this image (attached)
Note the shadow of the little green ball, which should only be
visible from _above_ the left red patch.
The area near the top edge of the left red patch should be very
dark, since the ambient is 0.0 We can see the shadow that the
overhanging top edge casts on the middle area. The patch on the right
is identical, except that it's rotated and translated.
The dark shadow above the centre of the left patch has a soft upper
edge - this corresponds to the edge of the shaded area on the back
side of the patch, as if it was translucent
There is only one light source, and it is up fairly high.
You can also see the effect on the bottom right corner of the
right-hand patch - it should be dark. The bottom right corner of the
right-hand patch is only dark because the top half is shading it.
I wondered if other objects without a well-defined inside/outside (like
a disc would do the same thing, but apparently it doesn't, according to
a test render of a disc object.
Notice that you cannot see the checker pattern through the patch
objects,
and that they can cast shadows on themselves as well as other objects.
Any suggestions on a fix? (other than only allowing the lit side to be
seen?)
Is this a feature or a bug?
---------------------------------
To respond to Daniel Sullivan's original question, a high ambient value
would cause pigments to "glow in thew dark" - wouldn't they?
Make it a no_shadow object and throw in an area light somewhere behind
it.
-jr-
// Lose the "spamBgone." to get a message through to me //
Post a reply to this message
Attachments:
Download '.dat' (1 KB)
Download 'bicubic.jpg' (13 KB)
Preview of image 'bicubic.jpg'
|
|