|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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?
Build a long, skinny mound that runs along the roadway. Texture the
bottom like the grass of the HF, and the top like the roadway. Make it
slope gently away from the road so that it looks like a natural part of
the HF.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Differencing will be a problem due to the fact that the heightfield is a
polygon-based object, and therefore has no inside. You'll be able to see
through the hole to the underside of the heightfield.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"SharkD" <nomail@nomail> schreef in bericht
news:web.467c834435b0b28870b838070@news.povray.org...
> Differencing will be a problem due to the fact that the heightfield is a
> polygon-based object, and therefore has no inside. You'll be able to see
> through the hole to the underside of the heightfield.
>
>
No. You can difference a cube or whatever from a height_field. The
differenced part will show as a negative image of the cube. See the attached
image (quick-and-dirty) made in Moray.
Thomas
Post a reply to this message
Attachments:
Download 'hf_differencetest.jpg' (77 KB)
Preview of image 'hf_differencetest.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
web.467c834435b0b28870b838070@news.povray.org...
> Differencing will be a problem due to the fact that the heightfield is a
> polygon-based object, and therefore has no inside. You'll be able to see
> through the hole to the underside of the heightfield.
>
As says Thomas, it works. A heighfield has an inside.
It is easy for pov to find it as the heightfield has no overhanging.
It is the same section as the heightfield, and is infinite in the -y
direction (before any tranformation of course)
Marc
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here's what I did:
1) I enlarged the heightfield source image. I did this by rendering an
overhead orthographic view of just the heightfield with a y-axis, black to
white ambient gradient pigment and no light source.
2) I changed the spline object's (the road's) pigment to a y-axis gradient
from black to white. I then rendered the scene from an overhead
orthographic view with the same dimensions as the new heightfield image
(alpha is turned on, so there's no other stuff in the scene). In this way,
I have generated a new heightfield that conforms to the road surface and
nothing else.
3) I combined the two images in Photoshop. The result is a new terrain
heightfield that doesn't float above or below the road surface.
Post a reply to this message
Attachments:
Download 'outdoorscene_h.jpg' (69 KB)
Preview of image 'outdoorscene_h.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I rendered the scene again, with the following slope map for the terrain:
slope {-y}
color_map
{
[0 color rgb <046/255,104/255,058/255,>]
[0.0625 color rgb <139/255,117/255,102/255,>]
[0.0625 color Gray]
[0.125 color Gray]
}
The problem areas are around the road where the terrain is particularly
steep. They are nearly vertical. They should be completely gray. Why isn't
the slope map being applied properly to these areas?
Post a reply to this message
Attachments:
Download 'outdoorscene.jpg' (36 KB)
Preview of image 'outdoorscene.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
SharkD nous apporta ses lumieres en ce 2007/06/24 13:08:
> I rendered the scene again, with the following slope map for the terrain:
>
> slope {-y}
> color_map
> {
> [0 color rgb <046/255,104/255,058/255,>]
> [0.0625 color rgb <139/255,117/255,102/255,>]
> [0.0625 color Gray]
> [0.125 color Gray]
> }
>
> The problem areas are around the road where the terrain is particularly
> steep. They are nearly vertical. They should be completely gray. Why isn't
> the slope map being applied properly to these areas?
>
>
>
> ------------------------------------------------------------------------
>
...and the flat areas are gray.
Change the color_map as follow as a test:
[0.05 color Gray]
[0.06 color rgb <139/255,117/255,102/255>]
[0.1 color rgb <046/255,104/255,058/255>
--
Alain
-------------------------------------------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |