POV-Ray : Newsgroups : povray.windows : Wall of China Problem Server Time
28 Jul 2024 18:24:13 EDT (-0400)
  Wall of China Problem (Message 1 to 7 of 7)  
From: David Vincent-Jones
Subject: Wall of China Problem
Date: 7 Jul 1998 23:46:45
Message: <35a2dd95.0@news.povray.org>
I am trying to depict a long and complex wall structure that is defined only
by its center-line in the normal ground plane (x,z)
The wall has a consistent height (y) and width.
I am trying to read in this x0,z0,x1,z1......xn,zn array and finish up with
a povray wall.

Currently the only real solution that I see is to break the wall into
multiple segments, and calculate a Box element for each leg of the wall
This is a very tedious solution and creates poor corners.

Any ideas out there.


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Wall of China Problem
Date: 8 Jul 1998 01:23:36
Message: <35a5f115.182778068@news.povray.org>
On Tue, 7 Jul 1998 19:27:58 -0700, "David Vincent-Jones"
<geo### [at] galaxynetcom> wrote:

>I am trying to depict a long and complex wall structure that is defined only
>by its center-line in the normal ground plane (x,z)
>The wall has a consistent height (y) and width.
>I am trying to read in this x0,z0,x1,z1......xn,zn array and finish up with
>a povray wall.
>
>Currently the only real solution that I see is to break the wall into
>multiple segments, and calculate a Box element for each leg of the wall
>This is a very tedious solution and creates poor corners.

You could make the corners better by making the box too big, then
clipping it with a plane that bisects the angle between consecutive
segments.

If it doesn't have to work with CSG, you could write a program to
create a mesh.


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Wall of China Problem
Date: 8 Jul 1998 23:14:00
Message: <35a423d7.78254543@news.povray.org>
On Tue, 7 Jul 1998 19:27:58 -0700, "David Vincent-Jones"
<geo### [at] galaxynetcom> wrote:

>Currently the only real solution that I see is to break the wall into
>multiple segments, and calculate a Box element for each leg of the wall
>This is a very tedious solution and creates poor corners.

How about using a prism?  You'll have to use a little vector algebra
to compute the control points, and you'll have to be able to read the
points in the file backwards and forwards, but it shouldn't be too
hard.


Post a reply to this message

From: Reinhard Rettelbach
Subject: Re: Wall of China Problem
Date: 12 Jul 1998 06:56:31
Message: <35A8880A.462F@t-online.de>
David Vincent-Jones wrote:
> 
> I am trying to depict a long and complex wall structure that is defined only
> by its center-line in the normal ground plane (x,z)
> The wall has a consistent height (y) and width.
> I am trying to read in this x0,z0,x1,z1......xn,zn array and finish up with
> a povray wall.
> 
> Currently the only real solution that I see is to break the wall into
> multiple segments, and calculate a Box element for each leg of the wall
> This is a very tedious solution and creates poor corners.
> 
> Any ideas out there.

Hi David,

also try this:

intersection{
height_field {tga "your_landscape_file.tga"
	      texture {your_wall_texture}
	      translate your_wall_height*y
	     }
union {
	box{//a box with appropriate dimensions and something higher
	    // than your_wall_height
	    texture {your_wall_texture}
	    }
	height_field {tga "your_landscape_file.tga"
		      texture {your_landscape_texture}
		     }
      }
           }

It works, I just tried it without appropriate teturing and scaling.

Cheers Reinhard


Post a reply to this message

From: Dan Connelly
Subject: Re: Wall of China Problem
Date: 25 Jul 1998 12:34:36
Message: <35B9FB0C.96AB7BBB@flash.net>
Depending on the complexity of the terrain and the scales
involved, it might also be a good idea to run the original height
field through a smoothing filter (using appropriate software --
hf_gray_16 images can't be trivially filtered by most paint programs)
to prevent the wall from tracking every small length-scale deviation
in the underlying ground.  Then the smoothed version can be used for
the wall, with the unmodified version for the ground.



Reinhard Rettelbach wrote:
> 
> also try this:
> 
> intersection{
> height_field {tga "your_landscape_file.tga"
>               texture {your_wall_texture}
>               translate your_wall_height*y
>              }
> union {
>         box{//a box with appropriate dimensions and something higher
>             // than your_wall_height
>             texture {your_wall_texture}
>             }
>         height_field {tga "your_landscape_file.tga"
>                       texture {your_landscape_texture}
>                      }
>       }
>            }
> 
> It works, I just tried it without appropriate teturing and scaling.
-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: ReVerSi
Subject: Re: Wall of China Problem
Date: 26 Jul 1998 06:13:43
Message: <35BAF2EC.4C94@t-online.de>
Dan Connelly wrote:
> 
> Depending on the complexity of the terrain and the scales
> involved, it might also be a good idea to run the original height
> field through a smoothing filter (using appropriate software --
> hf_gray_16 images can't be trivially filtered by most paint programs)
> to prevent the wall from tracking every small length-scale deviation
> in the underlying ground.  Then the smoothed version can be used for
> the wall, with the unmodified version for the ground.

Very good idea indeed; on discussing the matter in detail with David,
I'd seen this problem, especially if walls are not quite narrow and the
height_field has a considerable slope perpendicular to the axis of the
wall segment. Then the top of the wall will not look quite clean.

But your suggestion should solve this too. I'll make smoothing the
terrain directly with leveller, the program that creates the
height_field too. Then I'll save both height_fields and take the
smoothed for intersection (top) and the unsmoothed for union (foot) of
the wall.

Thanks.
Reinhard


Post a reply to this message

From: Dan Connelly
Subject: Re: Wall of China Problem
Date: 26 Jul 1998 15:57:27
Message: <35BB7C20.62DB8C0A@flash.net>
Reinhard:

There will, however, remain the problem that real walls have tops
which are laterally flat, even though they track the terrain 
longitudinally.  This is not as easily resolved.... but depending
on the viewpoint and the nearness of the wall to the camera, it
may not be necessary to address it.

Let us know how the image turns out...

Dan


ReVerSi wrote:
> 
> Dan Connelly wrote:
> >
> > Depending on the complexity of the terrain and the scales
> > involved, it might also be a good idea to run the original height
> > field through a smoothing filter....
> 
> Very good idea indeed; on discussing the matter in detail with David,
> I'd seen this problem, especially if walls are not quite narrow and the
> height_field has a considerable slope perpendicular to the axis of the
> wall segment. Then the top of the wall will not look quite clean.
> 
> But your suggestion should solve this too. I'll make smoothing the
> terrain directly with leveller, the program that creates the
> height_field too. Then I'll save both height_fields and take the
> smoothed for intersection (top) and the unsmoothed for union (foot) of
> the wall.
> 
> Thanks.
> Reinhard

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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