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
19 May 2024 22:13:15 EDT (-0400)
  Re: Need a script to randomly scatter objects vertically  
From: Thomas de Groot
Date: 20 Apr 2021 04:29:38
Message: <607e90f2$1@news.povray.org>
Op 20-4-2021 om 09:24 schreef Mike Horvath:
> Awesome, thanks!
> A couple of questions:
> 1. I cannot render either of the scripts you created. Seems the floor 
> and landscape objects are missing. What format do they take?
> 2. What does the proximity function do? I don't know what a proximity 
> function is.
> Mike

Good questions.
"floor" is a placeholder name. When you define your target, i.e. the 
mesh or the height_field on which you want to place your trees and which 
you have already declared before, you fill in their name instead of "floor":

#declare my_HF = height_field {etc etc}

#declare Target  = object {my_HF}

The Proximity Function as defined by Kirk Andrews, and as I understand 
it, is an averaged  pigment which uses the target object repeatedly as 
an object pattern. It can then be used for instance to exclude trees on 
sharp edges of the landscape or scale trees vertically following certain 
rules (there are example uses in some of the commented out lines of the 
code; I switch them on or off according to purpose or need).

I confess that I do not always exactly understand how things work in the 
code, but as long as it does what I want...

If you want, I can design a little demo scene to make things more 
visual. Maybe I even have one somewhere... I need to delve in my dungeons.


Post a reply to this message

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