POV-Ray : Newsgroups : povray.general : simple incorrect shading of a bicubic patch example Server Time
5 Nov 2024 11:20:43 EST (-0500)
  simple incorrect shading of a bicubic patch example (Message 1 to 7 of 7)  
From: Matthew Bennett
Subject: simple incorrect shading of a bicubic patch example
Date: 2 Oct 1998 19:54:10
Message: <36155992.0@news.povray.org>
Attached is a simple (1k) .pov scene showing the supposed POV 3.1r1 bicubic
patch bug.
It's just a bicubic patch next to a disk with a light source below them and
the camera looking above them.  The disk is dark (in the shade) as would be
expected, but the bicubic patch is lit up as if the light was above it.

If you want to see a 8k jpg of what this renders as, take a look at:
http://www.btinternet.com/~bennett/shadebug.jpg

Feel free to play around with this to see if you can fix something, but I
think it clearly shows a bug in POV 3.1


Matt

--
Computers do what you *tell* them to do, not what you *want* them to do.


Post a reply to this message


Attachments:
Download 'shadebug.pov.txt' (1 KB)

From: J  L  Rose
Subject: Re: simple incorrect shading of a bicubic patch example
Date: 3 Oct 1998 18:35:15
Message: <36166E56.1B0B@spamBgone.nbnet.nb.ca>
Matthew Bennett wrote:
> 
> Attached is a simple (1k) .pov scene showing the supposed POV 3.1r1 bicubic
> patch bug.
> It's just a bicubic patch next to a disk with a light source below them and
> the camera looking above them.  The disk is dark (in the shade) as would be
> expected, but the bicubic patch is lit up as if the light was above it.
> 
> If you want to see a 8k jpg of what this renders as, take a look at:
> http://www.btinternet.com/~bennett/shadebug.jpg
> 
> Feel free to play around with this to see if you can fix something, but I
> think it clearly shows a bug in POV 3.1

Hmmm - It looks exactly like the problems mentioned in previous posts:
"Re: Help- Unwanted see-through-ness in objects"  and
"Re: Tranlucency and bicubic patches"

I tried, turning the objects, camera, and light_sources all around,
changing textures and so on, but it still showed up consistently.

Philippe Debar wrote:

>I suspected this kind of bug with triangles some times ago : shadows and
>lighting showing on the wrong side of triangles. But I actually have no
>source for proving this.

I tried to see if triangles did it too, but I could not find anything.

One thing I did find, though, was when I made a simple closed
pillow-shaped union of two bicubic patches, and a "tear" on one side
(towards the light_source) allowed a beam of light to shine through the
inside and illuminate a bit of of the surface on the supposedly dark
side.

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?

-jr-

/* --- delete "spamBgone." to get my real address --- */


Post a reply to this message

From: Nathan Kopp
Subject: Re: simple incorrect shading of a bicubic patch example
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

From: Philippe Debar
Subject: Re: simple incorrect shading of a bicubic patch example
Date: 5 Oct 1998 16:24:19
Message: <36191ce3.0@news.povray.org>
J. L. Rose wrote in message <361### [at] spamBgonenbnetnbca>...
>Philippe Debar wrote:
>
>>I suspected this kind of bug with triangles some times ago : shadows and
>>lighting showing on the wrong side of triangles. But I actually have no
>>source for proving this.
>
>I tried to see if triangles did it too, but I could not find anything.


I tried to find an image or a source for the triangles, but I think I
deleted them (or at least the right camera location). If I ever find it
again I'll post it. (It was with povwin 3.0x, but I do not remenber if it
was 3.00, 3.01 or 3.02). The scene included some hundreds of triangles,
lights, shadowless lights, regular fog and some csg objects. I remenber
being quite sure that shadows showed on the wrong side of a triangle mesh,
but I couldn't find it now (nor any artifact that could lead me to think
so).


Bye!


Philippe


Post a reply to this message

From: Margus Ramst
Subject: Re: simple incorrect shading of a bicubic patch example
Date: 5 Oct 1998 17:40:13
Message: <36193C8F.3C615E23@peak.edu.ee>
Matthew Bennett wrote:

> It's just a bicubic patch next to a disk with a light source below them and
> the camera looking above them.  The disk is dark (in the shade) as would be
> expected, but the bicubic patch is lit up as if the light was above it.

Sure looks like a bug. But it would be nice to have it as a feature - diffuse
tranmittance is very
useful when rendering thin paper, matte plastic lamp shades etc.
This "bug" seems to work exactly like diffuse transmittance - if only we could turn it
on/off for all
objects.
I've used dense media to achieve the same effect, but it's very slow.

Margus


Post a reply to this message

From: Francois Dispot
Subject: Re: simple incorrect shading of a bicubic patch example
Date: 5 Oct 1998 18:05:55
Message: <361933c7.158415114@news.povray.org>
Le Sat, 03 Oct 1998 18:35:09 +0000, "J. L. Rose"
<jro### [at] spamBgonenbnetnbca> wrote:

>How about this, though - can you think of any other way of simulating a
>back-lit translucent surface?
I discovered this "bug" a while ago, and really enjoyed the
"feature"...

http://www.geocities.com/Vienna/7709/ima_ravel.jpg

How nice would this be if it were an optional feature extended to all
types of objects!

--- 
Francois DISPOT
e-mail woz### [at] NOSPAMclub-internetfr
http://www.geocities.com/vienna/7709


Post a reply to this message

From: Nathan Kopp
Subject: Re: simple incorrect shading of a bicubic patch example
Date: 1 Dec 1998 11:24:08
Message: <36641701.68572909@Kopp.com>
This 'feature' has been added to my unofficial compile, UVPov.  You can
get it at http://nathan.kopp.com/patched.htm
Look at the section "Misc. Changes" for info on "double_illuminate".

-Nathan

Francois Dispot wrote:
> 
> Le Sat, 03 Oct 1998 18:35:09 +0000, "J. L. Rose"
> <jro### [at] spamBgonenbnetnbca> wrote:
> 
> >How about this, though - can you think of any other way of simulating a
> >back-lit translucent surface?
> I discovered this "bug" a while ago, and really enjoyed the
> "feature"...
> 
> http://www.geocities.com/Vienna/7709/ima_ravel.jpg
> 
> How nice would this be if it were an optional feature extended to all
> types of objects!
> 
> ---
> Francois DISPOT
> e-mail woz### [at] NOSPAMclub-internetfr
> http://www.geocities.com/vienna/7709


Post a reply to this message

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