![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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](/povray.binaries.images/attachment/%3Cweb.467a2ea1b829942996f3cfc0%40news.povray.org%3E/outdoorscene.jpg?ttop=443866&toff=3800&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christian Froeschlin <chr### [at] chrfr de> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] rarius co uk> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
SharkD wrote:
> Christian Froeschlin <chr### [at] chrfr de> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] chrfr de> wrote:
> SharkD wrote:
> > Christian Froeschlin <chr### [at] chrfr de> 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](/povray.binaries.images/attachment/%3Cweb.467b274435b0b288877afef70%40news.povray.org%3E/outdoorscene_b.jpg?ttop=443866&toff=3800&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |