POV-Ray : Newsgroups : povray.unofficial.patches : how to mix two hf Server Time
8 Jul 2024 16:27:06 EDT (-0400)
  how to mix two hf (Message 1 to 3 of 3)  
From: Jaime Vives Piqueres
Subject: how to mix two hf
Date: 19 Aug 2001 04:49:22
Message: <3B7F7D8E.30B1066F@ignorancia.org>
Hi All:

  Perhaps I've wake up a bit dazed this sunday, but I can't figure the
solution for a problem I'm having. First, what I try to do is not usual,
or at least I never needed to do it.

  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...

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

From: Christoph Hormann
Subject: Re: how to mix two hf
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

From: Jaime Vives Piqueres
Subject: Re: how to mix two hf
Date: 19 Aug 2001 06:22:38
Message: <3B7F9369.74881675@ignorancia.org>

> 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)) }

  Yes! That's it! I was just trying with the pigment function, but I
would have expended much more time to figure out this one, wich is
perhaps the only way to get it working. Thanks!

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org/


Post a reply to this message

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