POV-Ray : Newsgroups : povray.general : Punching a hole in a height field : Re: Punching a hole in a height field Server Time
2 Nov 2024 03:15:54 EDT (-0400)
  Re: Punching a hole in a height field  
From: Mike Williams
Date: 27 May 2004 13:36:46
Message: <mklFHDAcaitAFw1Y@econym.demon.co.uk>
Wasn't it gil who wrote:
>"gil" <nomail@nomail> wrote:
>> I have a height field I'm using as a mountain from the outside, and a cave
>> from the inside.
>>
>> What I want to do is punch a hole in the heightfield so I can stand inside
>> and look out, or vice-versa.
>>
>> I tried
>> #declare mountain = difference
>> {
>>    object <the height field>
>>    object <a box that spans the skin of the height field>
>> }
>>
>> but I don't seem to be able to see beyond the skin of the box, which I can
>> see projecting into the cave.
>>
>> What am I doing wrong??
>
>Well.... I answered it myself.  I made the box pigment {rgbt<1,0,0,1>}. I
>now have a tunnel through from inside to outside.
>
>But, in a totally different example, if I'd taken a box, and drilled through
>it with a cylinder ie difference{box{} cylinder{}}, I wouldn't have had to
>make the cylinder transparent.
>
>
>Why?

As far as I can see difference{box{} cylinder{}} works exactly the same
way as difference{height_field{} box{}}.

If I understand what you're trying to achieve, you should be doing is
height_field{clipped_by{box{}}}.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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