POV-Ray : Newsgroups : povray.off-topic : Heightfield modification : Re: Heightfield modification Server Time
8 Jul 2024 08:57:35 EDT (-0400)
  Re: Heightfield modification  
From: Le Forgeron
Date: 15 Aug 2015 05:05:33
Message: <55cf00dd$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 15/08/2015 07:33, Mike Horvath a écrit :
> On 8/15/2015 1:17 AM, clipka wrote:
>> Am 15.08.2015 um 06:49 schrieb Mike Horvath:
>>> Let's say that I have a array of points generated from a height
>>> field. But I want areas of low slope to be made completely flat
>>> and rounded to the nearest 24 vertical units.
>>> 
>>> I know that the result will no longer be a classic heightfield
>>> since there will be vertical areas that will need to be joined
>>> by new triangles. But how would I accomplish this?
>> 
>> Sounds like what you want is the equivalent of a 2D array of
>> boxes, with each box's height determined by an input image. Do I
>> understand that correctly?
>> 
>> POV-Ray currently doesn't provide any native support for such an
>> object (except of course an actual array of boxes, a mesh
>> generated by a custom macro, or some such). It shouldn't be too
>> difficult to implement such a primitive though.
>> 
> 
> 
> I only need the special behavior when the slope is already low.
> For areas with a large slope I want to retain the original smooth
> mesh.
> 

Assuming the height-field is created from an image, what you seems to
want is a local filter to detect slope and make them flat... aka
uniform in colour.

With the exception of nearest 24 vertical unit rounding, that looks
like a color/palette reduction in any decent picture manipulation
program. That kind of thing.

> I will have to do the calculations myself because I need to be able
> to import the mesh into LDraw.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlXPAN0ACgkQhKAm8mTpkW2fcAQAifIjBBLeXx45pPguEg2d2YXI
hdev1wOnwEbrEMW0GGJ/oTPJ6bAKY78+LeKh/Bn7m5JXVCf8FRPA/MHWSNjwXnJ4
WAYRGgHkOM4SMZtUKB1KjB3i310FOFJ8qRQusl8R3oG2o4X8CxnyyboN461Wz+Q6
SaOq9MvsmB9lH6SZi50=
=4Hr0
-----END PGP SIGNATURE-----


Post a reply to this message

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