POV-Ray : Newsgroups : povray.bugreports : Height field smooth-bug Server Time
22 Dec 2024 14:26:56 EST (-0500)
  Height field smooth-bug (Message 1 to 1 of 1)  
From: Sigmund Kyrre Aas
Subject: Height field smooth-bug
Date: 5 May 2000 07:36:55
Message: <3912b257@news.povray.org>
Height fields seem to transmit light when the smooth-attribute is set. It 
was suggested in povray.advanced-users that this may be related to the double 
illumination bug in bicubic_patch, so I included a little patch for reference.
It might also be of interest that this bug can be reproduced in MegaPov 0.4
for Windows.

hf.gif is available in povray.binaries.images:
Subject: hf.gif for a post in p.b.a-u
Date: Sun, 30 Apr 2000 18:21:35 +0200

System:
Microsoft Windows 95, 4.00.950 B, Pov-Ray 3.1e
RedHat Linux 6.1, Pov-Ray 3.1g
AMD K6 233@250
128 MB PC100 SDRAM

--
#version 3.1;

plane { y,0.01 pigment {rgb 0}} 
camera { location  <0.01,0.01,-3> look_at 0 }

light_source { <0,1,10>, 1 } // light above plane
light_source { -<0,1,10>, 1 } //light below plane

background { rgb .1 }

#declare Tex= texture {
    pigment { color rgb <.4,.2,0> }
    finish {ambient 0} 
    //finish {specular .4 roughness .1}
}

bicubic_patch { 
    type 1 flatness 0.0100 u_steps 3 v_steps 3,
    <-1, -1, 0>, <-1, -1, 0>, <0, -1, 0>, <1, -1, 0>, 
    <-1, -1, 0>, <-1, -1, 1>, <0, -1, 1>, <1, -1, 0>, 
    <-1, 0, 0>,  <-1, 0, 1>, <0, 0, 1>, <1, 0, 0>, 
    <-1, 1., 0>, <-1, 1, 0>, <0, 1, 0>, <1, 1, 0> 
    scale .5
    texture {Tex}
}

// lit from behind:
height_field {  // top left
    gif "hf.gif"
    smooth              //  <-- commenting out this makes it appear black as it should
    translate -.5
    rotate 90*x
    texture {Tex}
    translate <-.6,.6,0>
}
height_field {  // top right
    gif "hf.gif"
    //smooth
    translate -.5
    rotate 90*x
    texture {Tex}
    translate <.6,.6,0>
}

// lit from front:
height_field {  // bottom left
    gif "hf.gif"
    smooth
    translate -.5
    rotate 90*x
    texture {Tex}
    translate <-.6,-.6,0>
}
height_field {  // bottom right
    gif "hf.gif"
    //smooth
    translate -.5
    rotate 90*x
    texture {Tex}
    translate <.6,-.6,0>
}


Post a reply to this message

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