POV-Ray : Newsgroups : povray.advanced-users : Strange bug in heightfield Server Time
25 Nov 2024 21:36:01 EST (-0500)
  Strange bug in heightfield (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Warp
Subject: Strange bug in heightfield
Date: 21 Jan 2002 09:26:35
Message: <3c4c251a@news.povray.org>
I have noticed that heightfields sometimes present strange bugs which I can't
explain.
  These bugs usually show up as small black areas in certain parts of the
heightfield. These areas are not shadows (no_shadow as no effect on them)
and they depend on the location of the camera (when the the heightfield is
looked from a bit different location, the size of these black areas change or
they disappear).

  Here is an example. Although you can see the bug and the effect of moving
the camera by rendering individual frames with different values of the clock
(between 0 and 1), it's best viewed as an animation (some of the black areas
slowly diminish in size and disappear). Also from the animation it's clearly
seen that they are not shadows.

----------8<----------8<----------8<----------8<----------8<----------
camera
{ location y*.03*clock
  look_at z*1
}
light_source { <90,90,0>, 1 }
height_field
{ function 900,900 { pattern { granite } }
  smooth
  scale <10,1.5,10>
  pigment { rgb 1 }
  translate -<5,.3,0>
  no_shadow
}
----------8<----------8<----------8<----------8<----------8<----------

  Any idea what causes these bugs?

  (I can create a DivX animation if necessary.)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 11:07:44
Message: <3c4c3ccf@news.povray.org>
Warp wrote:

>   These bugs usually show up as small black areas in certain parts of the
> heightfield. These areas are not shadows (no_shadow as no effect on them)
> and they depend on the location of the camera (when the the heightfield is
> looked from a bit different location, the size of these black areas change
> or they disappear).

  Hmmm... seems like "missing triangles" to me, they are very coincident 
with triangles when you trace it big enough. Also, it seems it is something 
to do with smooth, because I can't reproduce it without that keyword.

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Jan Walzer
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 13:11:11
Message: <3c4c59bf$1@news.povray.org>
I've not rendered yet, but if it really behaves the way, you describe,
then you can probably trace it down to some accuracy issue ...

--
[Talking about cardriving]
"People are opstacles?
Oh...I always treat them as bonus points..." [Ian Burgmyer in p.o-t]
// Jan Walzer <jan### [at] lzernet>


Post a reply to this message

From: Simon Adameit
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 14:31:55
Message: <3c4c6cab$1@news.povray.org>
Warp <war### [at] tagpovrayorg> schrieb in im Newsbeitrag:
3c4c251a@news.povray.org...
>   I have noticed that heightfields sometimes present strange bugs which I
can't
> explain.
>   These bugs usually show up as small black areas in certain parts of the
> heightfield. These areas are not shadows (no_shadow as no effect on them)
> and they depend on the location of the camera (when the the heightfield is
> looked from a bit different location, the size of these black areas change
or
> they disappear).
>
>   Here is an example. Although you can see the bug and the effect of
moving
> the camera by rendering individual frames with different values of the
clock
> (between 0 and 1), it's best viewed as an animation (some of the black
areas
> slowly diminish in size and disappear). Also from the animation it's
clearly
> seen that they are not shadows.
>
>   Any idea what causes these bugs?
>
I think that the normals are switched because it goes away if you add
double_illuminate.


--
#local T=text{ttf"timrom.ttf""Simon Adameit".01,0}#local Y=1;#while(Y>-1)
#local X=0;#while(X<7)#local O=trace(T<X,Y><X,Y>+z);cylinder{<X-3,Y,5>*.01
<X-3,Y,5>*.01+5e-3,5e-5pigment{rgb 25*O}}#debug chr(83-(O.x=0)*51)#local
X=X+.05;#end#debug"\n"#local Y=Y-.05;#end


Post a reply to this message

From: Warp
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 16:09:13
Message: <3c4c8379@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
:   Hmmm... seems like "missing triangles" to me

  Nope. If you render the animation (eg. 30 frames or more), you clearly see
that it's not a missing triangle which suddenly appears. The black spot
diminishes smoothly until it disappears.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Warp
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 16:10:22
Message: <3c4c83bd@news.povray.org>
Jan Walzer <jan### [at] lzernet> wrote:
: I've not rendered yet, but if it really behaves the way, you describe,
: then you can probably trace it down to some accuracy issue ...

  It's just that I can't figure out any reason why it happens.
  If the spots were equal independently of camera location it would be
simpler.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Warp
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 16:11:04
Message: <3c4c83e7@news.povray.org>
Simon Adameit <gom### [at] gmxde> wrote:
: I think that the normals are switched because it goes away if you add
: double_illuminate.

  That sounds like it would look the same independently of the camera location,
but it doesn't...

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Simon Adameit
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 16:27:47
Message: <3c4c87d3@news.povray.org>
>   That sounds like it would look the same independently of the camera
location,
> but it doesn't...

Then why does it disappear if you add double_illuminate ?

--
#local T=text{ttf"timrom.ttf""Simon Adameit".01,0}#local Y=1;#while(Y>-1)
#local X=0;#while(X<7)#local O=trace(T<X,Y><X,Y>+z);cylinder{<X-3,Y,5>*.01
<X-3,Y,5>*.01+5e-3,5e-5pigment{rgb 25*O}}#debug chr(83-(O.x=0)*51)#local
X=X+.05;#end#debug"\n"#local Y=Y-.05;#end


Post a reply to this message

From: Simon Adameit
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 17:49:09
Message: <3c4c9ae5@news.povray.org>
>
>   Any idea what causes these bugs?

Try this and you will see that the normals indeed seem to be switched.

camera
{ location #if(0) <0,-0.3,0> #else 0 #end
  look_at z*1
}

height_field
{ function 200,200 { pattern { granite } }
  smooth
  scale <10,1.5,10>
  pigment {slope y}
  finish{ambient 1}
  translate -<5,.3,0>
}


--
#local T=text{ttf"timrom.ttf""Simon Adameit".01,0}#local Y=1;#while(Y>-1)
#local X=0;#while(X<7)#local O=trace(T<X,Y><X,Y>+z);cylinder{<X-3,Y,5>*.01
<X-3,Y,5>*.01+5e-3,5e-5pigment{rgb 25*O}}#debug chr(83-(O.x=0)*51)#local
X=X+.05;#end#debug"\n"#local Y=Y-.05;#end


Post a reply to this message

From: Warp
Subject: Re: Strange bug in heightfield
Date: 21 Jan 2002 18:34:26
Message: <3c4ca582@news.povray.org>
Simon Adameit <gom### [at] gmxde> wrote:
: Then why does it disappear if you add double_illuminate ?

  'double_illuminate' "fixing" it is a clear symptom that it has something
to do with normals, but what confuses me is that the normals should not
depend on camera location. If the object stays static and the light source
stays static and there's no phong/specular finish, the lighting should remain
the same regardless of the point of view.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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