POV-Ray : Newsgroups : povray.advanced-users : Need a script to randomly scatter objects vertically : Re: Need a script to randomly scatter objects vertically Server Time
23 Feb 2024 21:23:06 EST (-0500)
  Re: Need a script to randomly scatter objects vertically  
From: Mike Horvath
Date: 13 May 2021 15:41:20
Message: <609d80e0$1@news.povray.org>
On 5/13/2021 2:55 PM, Bald Eagle wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
> 
>> Could I create a slope map or object pigment? That would be a lot
>> smoother gradient I think than doing a few checks here and there using
>> conditionals.
> 
> Not having implemented any of this in a working scene, I don't presently have
> any practical knowledge of everything that's going on.  As it appeared to me,
> there were a few pigments/functions that governed stuff, and a trace to get a
> normal at a point.  I'm not sure why more maps or pigments would be required or
> how they would be used.
> 

The clutter script already determines the probability of placing an 
object using a grayscale pigment. I am thinking I could leverage that by 
supplying a grayscale pigment representing the slope of the terrain 
object. Not sure how though.

Any heightmap will do right now such as this one:

https://en.wikipedia.org/wiki/File:Heightmap.png

I have attached the code I am working on right now.


Mike


Post a reply to this message


Attachments:
Download 'clutter_001.zip' (105 KB)

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