POV-Ray : Newsgroups : povray.general : Endogenic height field : Re: Endogenic height field Server Time
31 Jul 2024 16:26:25 EDT (-0400)
  Re: Endogenic height field  
From: Nicolas George
Date: 3 Dec 2006 15:29:24
Message: <457333a4$1@news.povray.org>
Warp  wrote in message <45732d8c@news.povray.org>:
>   Read the documentation more carefully. You can create a height_field
> from such a function without the need for an external image file.

There is indeed something directly in the height field, thanks for pointing
it.

But it is not in the doc. The doc says:

# HEIGHT_FIELD:
#     height_field{
#       [HF_TYPE]
#       "filename"
#       [HF_MODIFIER...]
#       [OBJECT_MODIFIER...]
#     }
# HF_TYPE:
#     gif | tga | pot | png | pgm | ppm | jpeg | tiff | sys | function
# HF_MODIFIER:
#     hierarchy [Boolean]  |
#     smooth               |
#     water_level Level
(copypasted from http://www.povray.org/documentation/view/3.6.1/279/)

And the keyword "function" is nowhere to be seen in the explanation. After a
look in the source code, I find that the correct syntax is something like
that:

height_field {
  function 200, 200 { height(2 * x - 1, 2 * y - 1, 0) }
  pigment { Cyan }
  scale <2, 1, 2>
  translate <-1, 0, -1>
  translate dist * z
}

With the 200, 200 being the size of the height field. Please note that it is
not conform to the documented syntax, since the "filename" field is said to
be mandatory.

I believe there is a problem in the documentation about this feature.


Post a reply to this message

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