POV-Ray : Newsgroups : povray.advanced-users : pigment from array : Re: pigment from array Server Time
3 Jul 2024 04:59:29 EDT (-0400)
  Re: pigment from array  
From: Chris B
Date: 10 Mar 2009 15:09:56
Message: <49b6bb04$1@news.povray.org>
"clipka" <nomail@nomail> wrote in message 
news:web.49b6a2f11a97d4f7f708085d0@news.povray.org...
> In one scene I'm working on, I need to sample data from discrete points 
> using
> trace(). From this, I'm currently generating a heightfield-like mesh.
>
> Now I want to add some "ground fog"-like effect that follows the contours 
> of
> this height field.
>
> I tried with a pigment based on a function that takes the values from an 
> array,
> but it seems that accessing an array from within functions is not possible 
> (or
> I'm doing something wrong).
>
> Another idea would be to do an orthographic shot of the heightfield mesh 
> with a
> gradient pattern to convert it into a heightfield image; however, I would
> prefer to avoid the additional rendering step.
>
> Any smart idea how to accomplish this?
>

Just thinking aloud really, but you might be able to get something like this 
by taking a transparent copy of the mesh scaled down in Y relative to its 
top extent and filled with fog-like media. This should give you thicker fog 
in the deeper and lower parts of the mesh and thinner fog over the ridges, 
but would follow the contours of your mesh. You could even translate a 
little in X or Z to give thicker fog on the leeward side of the hill.

Regards,
Chris B.


Post a reply to this message

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