POV-Ray : Newsgroups : povray.binaries.images : Heightfield with road Server Time
2 Aug 2024 18:14:13 EDT (-0400)
  Heightfield with road (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: John VanSickle
Subject: Re: Heightfield with road
Date: 22 Jun 2007 15:44:00
Message: <467c2680@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?

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

From: SharkD
Subject: Re: Heightfield with road
Date: 22 Jun 2007 22:20:02
Message: <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.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Heightfield with road
Date: 23 Jun 2007 03:55:36
Message: <467cd1f8@news.povray.org>
"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'
hf_differencetest.jpg


 

From: Marc
Subject: Re: Heightfield with road
Date: 23 Jun 2007 04:26:49
Message: <467cd949$1@news.povray.org>

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

From: SharkD
Subject: Re: Heightfield with road
Date: 23 Jun 2007 13:30:02
Message: <web.467d582b35b0b2889ecc95aa0@news.povray.org>
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'
outdoorscene_h.jpg


 

From: SharkD
Subject: Re: Heightfield with road
Date: 24 Jun 2007 13:10:01
Message: <web.467ea4fc35b0b288f62948820@news.povray.org>
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'
outdoorscene.jpg


 

From: Alain
Subject: Re: Heightfield with road
Date: 25 Jun 2007 07:55:17
Message: <467fad25@news.povray.org>
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

<<< Previous 10 Messages Goto Initial 10 Messages

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