POV-Ray : Newsgroups : povray.general : Infinite (tiled) Heightfields Server Time
12 Aug 2024 19:29:47 EDT (-0400)
  Infinite (tiled) Heightfields (Message 1 to 8 of 8)  
From: The Crazy Mule
Subject: Infinite (tiled) Heightfields
Date: 22 Jan 1999 20:07:45
Message: <36A92132.37B0AC27@paradise.net.nz>
I had this idea, it's not particularly inspired (seemed fairly logical to me),
and i was just wondering what other ppl thought of it...

Currently, to create a decently size landscape, even a regular repeating one,
you have to make a really big heightfield or make copies, translated, of a
smaller one and bear the glitches running along the edges of each section - And
even then you have to make heaps of copies.  Anyway, it seems to me that by
making the bounding volume the intersection of two planes (ie, an infinite
"slab"), using modulus arithmetic, you could implement infinitely tiling
heightfields quite simply.

I shall refer to the bounding volume as the bounding slab, and the single
repeating heightfield unit as a tile...

If we say a function RayHits finds out where, if anywhere, the ray hits on a
single hf tile, then we can use the following recursive wrapper function to
extend functionality to infinitely tiled:

Function RayHitsHF(Ray) {	
	Modulus the ray origin or entry point to find where on a single tile it
enters/starts
	If (RayHits) then return hitpoint
	else {
		If(Ray Exits Top or bottom) then return no intersection
		Else RayHitsHF(ray_exitpoint translated to the opposite edge of the tile
bounding box)
	}
}

Some method of preventing endless loops would also probably be needeed

What do you think?
-- 
Sam Minnee
    mailto:smi### [at] paradisenetnz
    http://www.geocities.com/SiliconValley/Horizon/4152/

Ignorance is bliss - And don't you go telling me otherwise!


Post a reply to this message

From: Spider
Subject: Re: Infinite (tiled) Heightfields
Date: 22 Jan 1999 20:30:01
Message: <36A92515.9091B0E7@bahnhof.se>
This sounds like a very good idea... 
then one could use procedural textures for a hf... Very interesting...

//Spider

The Crazy Mule wrote:
> 
> I had this idea, it's not particularly inspired (seemed fairly logical to me),
> and i was just wondering what other ppl thought of it...
> 
> Currently, to create a decently size landscape, even a regular repeating one,
> you have to make a really big heightfield or make copies, translated, of a
> smaller one and bear the glitches running along the edges of each section - And
> even then you have to make heaps of copies.  Anyway, it seems to me that by
> making the bounding volume the intersection of two planes (ie, an infinite
> "slab"), using modulus arithmetic, you could implement infinitely tiling
> heightfields quite simply.
> 
> I shall refer to the bounding volume as the bounding slab, and the single
> repeating heightfield unit as a tile...
> 
> If we say a function RayHits finds out where, if anywhere, the ray hits on a
> single hf tile, then we can use the following recursive wrapper function to
> extend functionality to infinitely tiled:
> 
> Function RayHitsHF(Ray) {
>         Modulus the ray origin or entry point to find where on a single tile it
> enters/starts
>         If (RayHits) then return hitpoint
>         else {
>                 If(Ray Exits Top or bottom) then return no intersection
>                 Else RayHitsHF(ray_exitpoint translated to the opposite edge of the
tile
> bounding box)
>         }
> }
> 
> Some method of preventing endless loops would also probably be needeed
> 
> What do you think?
> --
> Sam Minnee
>     mailto:smi### [at] paradisenetnz
>     http://www.geocities.com/SiliconValley/Horizon/4152/
> 
> Ignorance is bliss - And don't you go telling me otherwise!


Post a reply to this message

From: Ron Parker
Subject: Re: Infinite (tiled) Heightfields
Date: 25 Jan 1999 08:53:39
Message: <36ac7763.0@news.povray.org>
On Sat, 23 Jan 1999 02:25:41 +0100, Spider <spi### [at] bahnhofse> wrote:
>This sounds like a very good idea... 
>then one could use procedural textures for a hf... Very interesting...

Um... one can already use procedural textures for a hf, though with 
the same limitations as apply to all heightfields.  Grab a copy of 
the Superpatch if you don't already have it.


Post a reply to this message

From: Ron Parker
Subject: Re: Infinite (tiled) Heightfields
Date: 25 Jan 1999 09:04:27
Message: <36ac79eb.0@news.povray.org>
On Sat, 23 Jan 1999 14:09:06 +1300, The Crazy Mule 
	<smi### [at] paradisenetnz> wrote:
>If we say a function RayHits finds out where, if anywhere, the ray hits on a
>single hf tile, then we can use the following recursive wrapper function to
>extend functionality to infinitely tiled:
>
>Function RayHitsHF(Ray) {	
>	Modulus the ray origin or entry point to find where on a single tile it
>enters/starts
>	If (RayHits) then return hitpoint
>	else {
>		If(Ray Exits Top or bottom) then return no intersection
>		Else RayHitsHF(ray_exitpoint translated to the opposite edge of the tile
>bounding box)
>	}
>}

You'll still have glitches along the edges, unless you use a tileable 
image and kludge the hf to wrap around correctly.  But why should it
be recursive?  It seems like you're just following the ray through a 
virtual "grid" of heightfields, finding any intersections for each 
instance of the heightfield.  No need for recursion there.  You will,
as you say, have to terminate somehow.  I can't think of any way to
detect a ray that is parallel to the bounding slab but that does not
intersect the height field at any point, so maybe you'd have to bail
out after traversing a set number of grid squares or a set distance.

This isn't a bad idea, and it seems far easier to implement than one 
might at first think.  A further modification might be to "flip" 
adjacent copies of the HF along the appropriate axes, to make it
tile relatively smoothly without the need for a tileable image.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Infinite (tiled) Heightfields
Date: 25 Jan 1999 12:24:51
Message: <36aca8e3.0@news.povray.org>
In article <36ac79eb.0@news.povray.org> , par### [at] my-dejanewscom (Ron 
Parker) wrote:

> I can't think of any way to
> detect a ray that is parallel to the bounding slab

Hmm, if I understand it right the heightfield is bounded by two parallel
planes, so all you need to test is if a ray is parallel one of the planes
(which is easy). Then you test is there is any intersection with this ray
and the heightfields within the first 2*sqrt(2) (for a heightfield scaled to
1 only) and you are done.


      Thorsten


Post a reply to this message

From: Ron Parker
Subject: Re: Infinite (tiled) Heightfields
Date: 25 Jan 1999 12:47:13
Message: <36acae21.0@news.povray.org>
On Mon, 25 Jan 1999 11:24:47 -0600, Thorsten Froehlich 
	<fro### [at] charliecnsiitedu> wrote:
>In article <36ac79eb.0@news.povray.org> , par### [at] my-dejanewscom (Ron 
>Parker) wrote:
>
>> I can't think of any way to
>> detect a ray that is parallel to the bounding slab
>
>Hmm, if I understand it right the heightfield is bounded by two parallel
>planes, so all you need to test is if a ray is parallel one of the planes
>(which is easy). Then you test is there is any intersection with this ray
>and the heightfields within the first 2*sqrt(2) (for a heightfield scaled to
>1 only) and you are done.

Not necessarily.  If you're using tiled heightfields as described here,
and the tile is a high resolution and consists of all zeros except 
for a 1 in the exact center (at (.5,.5)), there are an infinite number 
of rays which will not intersect within the space of two tiles but will 
intersect at some point beyond that (consider the ray that starts at 
(0,0) and proceeds in the direction of (.5,5.5)), and there are an 
infinite number of rays that will never intersect at all (consider the 
ray that starts at (0,.5) and proceeds due northeast).


Post a reply to this message

From: The Crazy Mule
Subject: Re: Infinite (tiled) Heightfields
Date: 26 Jan 1999 02:46:49
Message: <36AD733F.84163C9B@paradise.net.nz>
Ummm, is anyone who is familiar with the POV source interested in implementing
this?

The Crazy Mule wrote:
> 
> I had this idea, it's not particularly inspired (seemed fairly logical to me),
> and i was just wondering what other ppl thought of it...
> 
> Currently, to create a decently size landscape, even a regular repeating one,
> you have to make a really big heightfield or make copies, translated, of a
> smaller one and bear the glitches running along the edges of each section - And
> even then you have to make heaps of copies.  Anyway, it seems to me that by
> making the bounding volume the intersection of two planes (ie, an infinite
> "slab"), using modulus arithmetic, you could implement infinitely tiling
> heightfields quite simply.
> 
> I shall refer to the bounding volume as the bounding slab, and the single
> repeating heightfield unit as a tile...
> 
> If we say a function RayHits finds out where, if anywhere, the ray hits on a
> single hf tile, then we can use the following recursive wrapper function to
> extend functionality to infinitely tiled:
> 
> Function RayHitsHF(Ray) {
>         Modulus the ray origin or entry point to find where on a single tile it
> enters/starts
>         If (RayHits) then return hitpoint
>         else {
>                 If(Ray Exits Top or bottom) then return no intersection
>                 Else RayHitsHF(ray_exitpoint translated to the opposite edge of the
tile
> bounding box)
>         }
> }
> 
> Some method of preventing endless loops would also probably be needeed
> 
> What do you think?
> --
> Sam Minnee
>     mailto:smi### [at] paradisenetnz
>     http://www.geocities.com/SiliconValley/Horizon/4152/
> 
> Ignorance is bliss - And don't you go telling me otherwise!

-- 
Sam
    mailto:smi### [at] paradisenetnz
    http://www.geocities.com/SiliconValley/Horizon/4152/

Ignorance is bliss - And don't you go telling me otherwise!


Post a reply to this message

From: The Crazy Mule
Subject: Re: Infinite (tiled) Heightfields
Date: 26 Jan 1999 02:47:08
Message: <36AD734C.54D8932C@paradise.net.nz>
Thanks for all your comments

Ummm, is anyone who is familiar with the POV source interested in implementing
this?

The Crazy Mule wrote:
> 
> I had this idea, it's not particularly inspired (seemed fairly logical to me),
> and i was just wondering what other ppl thought of it...
> 
> Currently, to create a decently size landscape, even a regular repeating one,
> you have to make a really big heightfield or make copies, translated, of a
> smaller one and bear the glitches running along the edges of each section - And
> even then you have to make heaps of copies.  Anyway, it seems to me that by
> making the bounding volume the intersection of two planes (ie, an infinite
> "slab"), using modulus arithmetic, you could implement infinitely tiling
> heightfields quite simply.
> 
> I shall refer to the bounding volume as the bounding slab, and the single
> repeating heightfield unit as a tile...
> 
> If we say a function RayHits finds out where, if anywhere, the ray hits on a
> single hf tile, then we can use the following recursive wrapper function to
> extend functionality to infinitely tiled:
> 
> Function RayHitsHF(Ray) {
>         Modulus the ray origin or entry point to find where on a single tile it
> enters/starts
>         If (RayHits) then return hitpoint
>         else {
>                 If(Ray Exits Top or bottom) then return no intersection
>                 Else RayHitsHF(ray_exitpoint translated to the opposite edge of the
tile
> bounding box)
>         }
> }
> 
> Some method of preventing endless loops would also probably be needeed
> 
> What do you think?
> --
> Sam Minnee
>     mailto:smi### [at] paradisenetnz
>     http://www.geocities.com/SiliconValley/Horizon/4152/
> 
> Ignorance is bliss - And don't you go telling me otherwise!

-- 
Sam
    mailto:smi### [at] paradisenetnz
    http://www.geocities.com/SiliconValley/Horizon/4152/

Ignorance is bliss - And don't you go telling me otherwise!


Post a reply to this message

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