POV-Ray : Newsgroups : povray.unofficial.patches : how to mix two hf : Re: how to mix two hf Server Time
6 Oct 2024 11:14:27 EDT (-0400)
  Re: how to mix two hf  
From: Christoph Hormann
Date: 19 Aug 2001 05:40:35
Message: <3B7F8A16.46770AC2@gmx.de>
Jaime Vives Piqueres wrote:
> 
>   In a megapov scene, I've two internally generated hf (with pattern
> image type), wich I simply unioned to get my terrain. The union looks
> very nice, and I already placed, both by hand and with trace(), numerous
> objects in it. So, the memory comsumption increased greatly. As these
> two height_fields are *really* big, to save memory I tough on creating
> only one height_field with the exact same shape as the union. But I
> can't find a pattern type to do this. Average, of course, doesn't work:
> I need the max of the two values, not the average... can anyone figure a
> way to do this? A "maximum" pattern type would have helped a lot, but it
> doesn't exists...
> 

How about using pigment functions and the 'max()' function?

Something like:

#declare fn_1=function { pigment { ... } }
#declare fn_2=function { pigment { ... } }

#declare fn_hf=function { max(fn_1(x, y, z), fn_2(x, y, z)) }

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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