POV-Ray : Newsgroups : povray.general : Using a height_field for a CSG difference ... : Re: Using a height_field for a CSG difference ... Server Time
2 Aug 2024 02:24:11 EDT (-0400)
  Re: Using a height_field for a CSG difference ...  
From: Slime
Date: 1 Feb 2005 23:32:48
Message: <420057f0$1@news.povray.org>
> One of the bizarre effects was that
> no matter what I did, the hole cut by the heightfield would extend all the
> way through to the other side of the object.  It didn't seem to matter how
> small I made the heightfield or how deep I made the box.


The sample code you gave gives the expected results for me. Remember that
the "inside" of a height field is everything under the surface, all the way
down to negative infinity. When you difference the height field like you're
doing there, its surface coincides with one side of the box and the other
side is "underneath" the now-sideways height field. So both sides get cut
out. Also, since height fields have no surfaces on the sides, your box looks
hollow in the places where the sides of the height field cut into it.

Maybe replacing your height field with this will give you the results you
expected?

intersection {
    height_field {png "hole.png"}
    box {0.0001, 0.9999} // forces the height field to have a bottom and
sides
    ...
}

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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