POV-Ray : Newsgroups : povray.general : Endogenic height field : Endogenic height field Server Time
31 Jul 2024 16:28:39 EDT (-0400)
  Endogenic height field  
From: Nicolas George
Date: 3 Dec 2006 14:55:12
Message: <45732ba0$1@news.povray.org>
Hi.

The tutorial for the height_field primitive makes the user generate a sample
height field by rendering a trivial scene with a plane and a wrinkles
pattern.

I often felt the need of such a purely random height field, to serve as a
natural floor for a scene. I find the need for an external file somewhat
annoying: the file must either be carried around with the scene, or
re-generated, it is cumbersome.

I just found that patterns and pigments could be programatically queried
through the use of user-defined functions. Something like:

#declare height = function { pattern { wrinkles } }

This opens the possibility to use it directly as a height field, either with
an iso_surface (function { y - height(x, z, 0) }) or by building a mesh
(less elegant, but seems to be faster).

Are there drawbacks in doing so? Or more elegant solutions to this problem?


Post a reply to this message

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