POV-Ray : Newsgroups : povray.binaries.images : Fill Height field : Re: Fill Height field Server Time
13 Aug 2024 01:16:55 EDT (-0400)
  Re: Fill Height field  
From: Mike Williams
Date: 30 May 2003 22:08:49
Message: <F2TtjCAr5A2+EwTS@econym.demon.co.uk>
Wasn't it Xilo Musimene who wrote:
>Hi, to continue my thread in povray.general, I was wondering how to have 
>a filled height field, that is, a height field with sides and interior.
>
>Here is what I get with the following code, I hope you can guess easily 
>what I want from it...
>
>intersection {
>box { <-0.5, -0.5, -0.5>, <0.5, 1, 0.5>}
>// or perhaps: plane { <0,1,0>, 3 }
>height_field { png "Heightfield.png" smooth
>  scale <1,0.1,0>
>  translate <-0.5, 0, -0.5>
>}
>pigment {rgb 1}
>}

It's a simple coincident surface problem. Even though one of the
surfaces isn't really there, it still causes coincidence problems. If
you scale the box down slightly the problem goes away.

intersection {
box { <-0.5, -0.5, -0.5>, <0.5, 1, 0.5> scale 0.9999}
// or perhaps: plane { <0,1,0>, 3 }
height_field { png "Heightfield.png" smooth
  scale <1,0.1,0>
  translate <-0.5, 0, -0.5>
}
pigment {rgb 1}
}

Or you could scale the heightfield up slightly (after the translation,
otherwise it still leaves two faces coincident).

intersection {
box { <-0.5, -0.5, -0.5>, <0.5, 1, 0.5>}
// or perhaps: plane { <0,1,0>, 3 }
height_field { png "Heightfield.png" smooth
  scale <1,0.1,0>
  translate <-0.5, 0, -0.5>
  scale 1.0001
}
pigment {rgb 1}
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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