POV-Ray : Newsgroups : povray.general : HeightFields and differences, clipping etc. Server Time
10 Aug 2024 15:25:04 EDT (-0400)
  HeightFields and differences, clipping etc. (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Chris Huff
Subject: Re: HeightFields and differences, clipping etc.
Date: 4 Jan 2000 17:59:50
Message: <chrishuff_99-7565C0.17595604012000@news.povray.org>
In article <387276b9@news.povray.org>, "Patrick Dugan" 
<pat### [at] usticom> wrote:

> Now I'll have to find that to make I'm not hallucinating.  I was pretty 
> sure
> that the docs mentioned that clipping or differences cannot be performed 
> on
> "non" solid objects like height fields, dics, planes, etc.  If a 
> difference
> is supposed to work with a height field (like removing a box shape from a
> height field) then I cannot get that to function correctly.  I will post
> some example code that demonstrates my problem.

Differences and other CSG operations don't work on non-solid objects, 
but a height_field is a solid object, it has a defined inside and 
outside. I think clipping works on both with no problems, but it isn't 
exactly a CSG operation.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Patrick Dugan
Subject: Re: HeightFields and differences, clipping etc.
Date: 4 Jan 2000 18:03:04
Message: <38727c28@news.povray.org>
Here is an example of the "odd" behavior I find.  (Odd to me anyway..)

#version 3.0
global_settings {assumed_gamma 2.2}
light_source {<-100, 100, -500> color White * 1.0}
background {Blue}

camera {
   location <0, 0, -3>
   look_at  <0, 0,  0>
}

#declare RedSheet =
object {
   height_field {
      tga "AnyFile.tga"
      hierarchy off
      pigment {Red}
      translate <-0.5, -0.5, -0.5>
   }
   rotate <90,0,180>
   scale <1, 1, 0.005>
}



#declare RedSheetHole =
object {
   difference {
      object {RedSheet}
      torus {0.24, 0.14 pigment {Green} rotate x * 90}
   }
}

object {RedSheetHole scale 2}

Although I have declared the "RedSheetHole" to be a DIFFERENCE between
the heightfield and the torus, the end result is a union rather than
difference.  I am confused since the syntax I have used "seems" correct to
me.  Please advise...




"Patrick Dugan" <pat### [at] usticom> wrote in message
news:3872213e@news.povray.org...
> I have trying (somewhat successfully) to "chop" heightfields.  I first
used
> a bounded_by statement to make the heightfield round (to cut of the
corners)
> but then trying to remove a "chunk" from the inside is difficult.  When I
> tried using the difference statement it never works and whatever the
object
> is (cube for example) ends up showing up regardless of using difference or
> union.  I finally tried using a difference with a cube (with a clear
> pigment) which seems to work but according to the Povray docs I shouldn't
be
> trying a "difference" with a heightfield.  I guess my question is are
there
> any "easy" ways to remove material from a hieghtfield without going to
> convoluted methods??
>
>


Post a reply to this message

From: Chris Huff
Subject: Re: HeightFields and differences, clipping etc.
Date: 4 Jan 2000 18:17:37
Message: <chrishuff_99-3E3849.18174204012000@news.povray.org>
In article <38727c28@news.povray.org>, "Patrick Dugan" 
<pat### [at] usticom> wrote:


> Although I have declared the "RedSheetHole" to be a DIFFERENCE between
> the heightfield and the torus, the end result is a union rather than
> difference.  I am confused since the syntax I have used "seems" correct 
> to me.  Please advise...

If you use:
object {RedSheetHole scale 2 rotate y*250}
you will see that the "union" of the torus and the height field is 
actually the depression left in the heightfield from the torus. If you 
want a hole to be in this area instead, give the torus a clear texture 
so it is invisible. Or you could use this instead:
#declare RedSheet =
object {
   height_field {
      png "plasma2.png"
      hierarchy off
      pigment {Red}
      translate <-0.5, -0.5, -0.5>
   }
   rotate <90,0,180>
   scale <1, 1, 0.005>
   clipped_by {
      torus {0.24, 0.14 inverse rotate x * 90}
   }
}

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Patrick Dugan
Subject: Re: HeightFields and differences, clipping etc.
Date: 4 Jan 2000 21:11:37
Message: <3872a859@news.povray.org>
But WHY is there a torus depression?  The torus should carve out ONLY where
the intersection of the height field and torus intersect, not have an
"extra" area showing outside of the heightfield.  While a "clear" pigment
works it is still not behaving the way a standard solid object would.

"Chris Huff" <chr### [at] yahoocom> wrote in message
news:chrishuff_99-7565C0.17595604012000@news.povray.org...
> In article <387276b9@news.povray.org>, "Patrick Dugan"
> <pat### [at] usticom> wrote:
>
> > Now I'll have to find that to make I'm not hallucinating.  I was pretty
> > sure
> > that the docs mentioned that clipping or differences cannot be performed
> > on
> > "non" solid objects like height fields, dics, planes, etc.  If a
> > difference
> > is supposed to work with a height field (like removing a box shape from
a
> > height field) then I cannot get that to function correctly.  I will post
> > some example code that demonstrates my problem.
>
> Differences and other CSG operations don't work on non-solid objects,
> but a height_field is a solid object, it has a defined inside and
> outside. I think clipping works on both with no problems, but it isn't
> exactly a CSG operation.
>
> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Chris Huff
Subject: Re: HeightFields and differences, clipping etc.
Date: 4 Jan 2000 21:22:09
Message: <chrishuff_99-0B6D7F.21221504012000@news.povray.org>
In article <3872a859@news.povray.org>, "Patrick Dugan" 
<pat### [at] netinsnet> wrote:

> But WHY is there a torus depression?  The torus should carve out ONLY 
> where
> the intersection of the height field and torus intersect, not have an
> "extra" area showing outside of the heightfield.  While a "clear" pigment
> works it is still not behaving the way a standard solid object would.

I am not sure what you mean. It behaves in exactly the same way a 
standard object does. A difference operation leaves the surface of the 
differencing object on the object being differenced.
Don't get confused by the fact that you can see under the top surface of 
the height field, the object is there, there just aren't any surfaces 
around that portion of it. The lower boundaries are set by a cube, while 
the upper boundary is the surface of the height field. This can be seen 
clearly if you fill a height field with media.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Ken
Subject: Re: HeightFields and differences, clipping etc.
Date: 4 Jan 2000 21:34:18
Message: <3872AD62.127444F4@pacbell.net>
Chris Huff wrote:
> 
> In article <3872a859@news.povray.org>, "Patrick Dugan"
> <pat### [at] netinsnet> wrote:
> 
> > But WHY is there a torus depression?  The torus should carve out ONLY
> > where
> > the intersection of the height field and torus intersect, not have an
> > "extra" area showing outside of the heightfield.  While a "clear" pigment
> > works it is still not behaving the way a standard solid object would.
> 
> I am not sure what you mean. It behaves in exactly the same way a
> standard object does. A difference operation leaves the surface of the
> differencing object on the object being differenced.

For what it is worth I agree with Chris's assessment of the operation.
Practice differencing a small sphere from the face of a box or a plane
and you will see what he means.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Johannes Hubert
Subject: Re: HeightFields and differences, clipping etc.
Date: 5 Jan 2000 04:29:04
Message: <38730ee0@news.povray.org>
Patrick Dugan <pat### [at] netinsnet> wrote in message
news:3872a859@news.povray.org...
> But WHY is there a torus depression?  The torus should carve out ONLY
where
> the intersection of the height field and torus intersect, not have an
> "extra" area showing outside of the heightfield.  While a "clear" pigment
> works it is still not behaving the way a standard solid object would.

Maybe you have the heightfield upside down and are looking at the underside
of your heightfield?
Just an idea...

Johannes.


Post a reply to this message

From: Fabien Mosen
Subject: Re: HeightFields and differences, clipping etc.
Date: 5 Jan 2000 12:39:35
Message: <38738237.B782BECC@skynet.be>
Chris Huff wrote:

> Don't get confused by the fact that you can see under the top surface of
> the height field, the object is there, there just aren't any surfaces
> around that portion of it. The lower boundaries are set by a cube, 

If I remember well, the "lower" part of the "inside" of a HF extends
to the infinity, just like a plane does.

Fabien.


Post a reply to this message

From: Chris Huff
Subject: Re: HeightFields and differences, clipping etc.
Date: 5 Jan 2000 13:14:23
Message: <chrishuff_99-CD5BEB.13143005012000@news.povray.org>
In article <38738237.B782BECC@skynet.be>, Fabien Mosen 
<fab### [at] skynetbe> wrote:

> If I remember well, the "lower" part of the "inside" of a HF extends
> to the infinity, just like a plane does.

Hmm, it seems you are right. I was fooled by the section of the 
documentation that says the height field fills a 1*1*1 box. I assumed 
all points in that box and under the height field were considered 
"inside".

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Peter Popov
Subject: Re: HeightFields and differences, clipping etc.
Date: 5 Jan 2000 16:01:49
Message: <GbFzOBM7+phfQstcsHWS2vQHMS0x@4ax.com>
On Wed, 05 Jan 2000 18:41:11 +0100, Fabien Mosen
<fab### [at] skynetbe> wrote:

>Chris Huff wrote:
>
>> Don't get confused by the fact that you can see under the top surface of
>> the height field, the object is there, there just aren't any surfaces
>> around that portion of it. The lower boundaries are set by a cube, 
>
>If I remember well, the "lower" part of the "inside" of a HF extends
>to the infinity, just like a plane does.
>
>Fabien.

I think you're right but it is also automaticallt bounded by a unit
box and this may cause problems if you try to access the volume below
the x-z plane.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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