POV-Ray : Newsgroups : povray.binaries.images : Heightfield with road Server Time
4 Nov 2024 20:12:49 EST (-0500)
  Heightfield with road (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: SharkD
Subject: Heightfield with road
Date: 21 Jun 2007 04:00:02
Message: <web.467a2ea1b829942996f3cfc0@news.povray.org>
I've created a scene with a heightfield. I want to place a road over the
heightfield. I created a macro to generate a spline-shaped road that is
interpolated through points on the heightfield. The problem is that the
road cuts into (or floats over) the terrain depending on the slope of the
terrain around it. I don't expect there's a way to fix this. The only thing
I can think of is to modifiy the heightfield. Unfortunately, the resolution
of my heightfield is not great enough to do this.

What do the professionals do when they are facing similar problems?


Post a reply to this message


Attachments:
Download 'outdoorscene.jpg' (56 KB)

Preview of image 'outdoorscene.jpg'
outdoorscene.jpg


 

From: Tim Nikias
Subject: Re: Heightfield with road
Date: 21 Jun 2007 05:00:37
Message: <467a3e35$1@news.povray.org>
SharkD wrote:
> I've created a scene with a heightfield. I want to place a road over the
> heightfield. I created a macro to generate a spline-shaped road that is
> interpolated through points on the heightfield. The problem is that the
> road cuts into (or floats over) the terrain depending on the slope of the
> terrain around it. I don't expect there's a way to fix this. The only thing
> I can think of is to modifiy the heightfield. Unfortunately, the resolution
> of my heightfield is not great enough to do this.
> 
> What do the professionals do when they are facing similar problems?

Two solutions:
1. Select more points for the road to make it fit better to the heightfield.
2. Add some base to the road and place it slightly higher. Lots of roads 
have some gravel or such to the left and right, slightly elevating the 
road above the usual ground. Additionally, water running down the hills 
wouldn't necessarily run straight across the road with all the mud, but 
instead, just hit the banking and seep through underneath it.

Regards,
Tim

-- 
aka "Tim Nikias"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Rarius
Subject: Re: Heightfield with road
Date: 21 Jun 2007 07:07:28
Message: <467a5bf0@news.povray.org>
You have two problems, one that the road gets buried and another that the 
road floats above the ground.

1) Road gets buried. I think you could fix this by differencing out of the 
ground a cone-sweep...make an object that is a union of a LOT of cones that 
follow the spline of the road. make the base of the cone the same width (or 
slightly wider than) the road and make it high enough to clear any hill. 
Just make the top wide enough to give a good slope along the side of the 
road.

2) Use tha same cone-sweep and scale it by -1 vertically... union that to 
the road and you'll get the banks supporting the road.

I hope this helps

Rarius

"SharkD" <nomail@nomail> wrote in message 
news:web.467a2ea1b829942996f3cfc0@news.povray.org...
> I've created a scene with a heightfield. I want to place a road over the
> heightfield. I created a macro to generate a spline-shaped road that is
> interpolated through points on the heightfield. The problem is that the
> road cuts into (or floats over) the terrain depending on the slope of the
> terrain around it. I don't expect there's a way to fix this. The only 
> thing
> I can think of is to modifiy the heightfield. Unfortunately, the 
> resolution
> of my heightfield is not great enough to do this.
>
> What do the professionals do when they are facing similar problems?
>


Post a reply to this message

From: Darren New
Subject: Re: Heightfield with road
Date: 21 Jun 2007 14:30:13
Message: <467ac3b5@news.povray.org>
SharkD wrote:
> I've created a scene with a heightfield. I want to place a road over the
> heightfield. I created a macro to generate a spline-shaped road that is
> interpolated through points on the heightfield. 

Perhaps it would help to use trace() to put more points on the spline, 
based on the intermediate heights of the heightfield?

-- 
   Darren New / San Diego, CA, USA (PST)
     His kernel fu is strong.
     He studied at the Shao Linux Temple.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Heightfield with road
Date: 21 Jun 2007 15:12:31
Message: <467acd9f$1@news.povray.org>
If your road doesn't need to be elevated over the terrain,
you could just layer a road texture on top.


Post a reply to this message

From: SharkD
Subject: Re: Heightfield with road
Date: 21 Jun 2007 18:45:02
Message: <web.467afe9d35b0b28817967ea70@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> If your road doesn't need to be elevated over the terrain,
> you could just layer a road texture on top.

Yes, but this would require large images, and I'm already running out of
memory as it is.


Post a reply to this message

From: SharkD
Subject: Re: Heightfield with road
Date: 21 Jun 2007 18:55:01
Message: <web.467b00de35b0b28817967ea70@news.povray.org>
I'm using Chris Colefax's spline macro to generate the road. Also, the road
banks around corners. I don't know if I can create the sweep and not have
it interfere with the road surface.

"Rarius" <rar### [at] rariuscouk> wrote:
> You have two problems, one that the road gets buried and another that the
> road floats above the ground.
>
> 1) Road gets buried. I think you could fix this by differencing out of the
> ground a cone-sweep...make an object that is a union of a LOT of cones that
> follow the spline of the road. make the base of the cone the same width (or
> slightly wider than) the road and make it high enough to clear any hill.
> Just make the top wide enough to give a good slope along the side of the
> road.
>
> 2) Use tha same cone-sweep and scale it by -1 vertically... union that to
> the road and you'll get the banks supporting the road.
>
> I hope this helps
>
> Rarius


Post a reply to this message

From: Alain
Subject: Re: Heightfield with road
Date: 21 Jun 2007 19:03:58
Message: <467b03de@news.povray.org>
SharkD nous apporta ses lumieres en ce 2007/06/21 03:54:
> I've created a scene with a heightfield. I want to place a road over the
> heightfield. I created a macro to generate a spline-shaped road that is
> interpolated through points on the heightfield. The problem is that the
> road cuts into (or floats over) the terrain depending on the slope of the
> terrain around it. I don't expect there's a way to fix this. The only thing
> I can think of is to modifiy the heightfield. Unfortunately, the resolution
> of my heightfield is not great enough to do this.
> 
> What do the professionals do when they are facing similar problems?
> 
> 
> ------------------------------------------------------------------------
> 
Start by cuting away the path of the road from the hight_field using a 
difference. You can use boxes, cylinders, sphere_sweep, or a collection of 
prism. This will solve the buried road problem.
Give some thickness to your road, or give it some foundation. This will solve 
the floating road problem.

The suggestion from Rarius can work but will be very slow, due to bounding 
ineficiency when differencing. If you go that way, it may be worth it to use 
merge instead of union (you remove 1 merge instead of each individual union 
object), or set split_union off (on by default).

-- 
Alain
-------------------------------------------------
AI programmers only think they do it


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Heightfield with road
Date: 21 Jun 2007 19:22:12
Message: <467b0824$1@news.povray.org>
SharkD wrote:
> Christian Froeschlin <chr### [at] chrfrde> wrote:
> 
>>If your road doesn't need to be elevated over the terrain,
>>you could just layer a road texture on top.
> 
> Yes, but this would require large images, and I'm already running out of
> memory as it is.

I was thinking more of a function pattern based on your road spline.
Alternatively, you can make a thick road object and intersect it
with the hf to get the road geometry.


Post a reply to this message

From: SharkD
Subject: Re: Heightfield with road
Date: 21 Jun 2007 21:40:02
Message: <web.467b274435b0b288877afef70@news.povray.org>
I opted to just use an image map for the road. At this scale it doesn't look
too bad.

The source image for the road is 4096x4096 pixels and 250MB in Photoshop! (I
needed to use Photoshop in order to draw on a new layer on top of an
overhead view of the heightfield.)

Christian Froeschlin <chr### [at] chrfrde> wrote:
> SharkD wrote:
> > Christian Froeschlin <chr### [at] chrfrde> wrote:
> >
> >>If your road doesn't need to be elevated over the terrain,
> >>you could just layer a road texture on top.
> >
> > Yes, but this would require large images, and I'm already running out of
> > memory as it is.
>
> I was thinking more of a function pattern based on your road spline.
> Alternatively, you can make a thick road object and intersect it
> with the hf to get the road geometry.


Post a reply to this message


Attachments:
Download 'outdoorscene_b.jpg' (71 KB)

Preview of image 'outdoorscene_b.jpg'
outdoorscene_b.jpg


 

Goto Latest 10 Messages Next 7 Messages >>>

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