POV-Ray : Newsgroups : povray.general : simple incorrect shading of a bicubic patch example : Re: simple incorrect shading of a bicubic patch example Server Time
28 Sep 2024 11:05:38 EDT (-0400)
  Re: simple incorrect shading of a bicubic patch example  
From: Nathan Kopp
Date: 3 Oct 1998 20:43:42
Message: <3616B706.58C19EF4@ltu.edu>
> 
> How about this, though - can you think of any other way of simulating a
> back-lit translucent surface? Think about things like an outside view of
> a tent with a lantern and some shadows of people inside it. How about
> some nice lampshades, especially if it still works with an image mapped
> onto it?
> 

I agree... I've used this 'bug' once or twice in some scenes.  The POV-Ray
source code reveals the cause of this phenomenon.  OBJECTS.H defines a flag
called DOUBLE_ILLUMINATE, which is used in LIGHTING.C (specifically the
function 'Diffuse') to decide if an object sould have both sides illuminated by
a light source.

Both bicubic_patch and smooth_triangle objects all have this flag set.  This
would lead me to believe that smooth triangles would act the same way.  In
fact, I just ran a test and they did.

Instead of using your disc, try:
smooth_triangle
{
  <-1,  0, -1> <0,1,0> 
  < 1,  0, -1> <0,1,0> 
  < 0,  0,  1> <0,1,0> 
    pigment { colour rgb<0, 1, 0> }
    translate <2.2, 0, 0>
}

Also, try using a triangle, without the verex normals, and you will see that it
is not double-illuminated.

I think that this double-illumination should be an option for all objects.  In
fact, I think that I'm going to try to impliment it.

-Nathan Kopp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.