|
![](/i/fill.gif) |
David Given wrote:
> Here's a fascinatingly failed attempt to perturb the spheres into random
> locations:
well the reason I said that was tricky is because I didn't
see the solution either ;) Basically you need a noise function
that is constant over intervals, such as cells, but then marry
it to the periodic function in such a way that the jumps will
never split an object.
> Which is cool, and an effect worth remembering, but not what I was
> looking for.
Just say that alien vines took off in low gravity.
> This just gives me the problem of how to try and vary the density of
> trees according to some external function.
If you don't mind that some of your objects get partially
removed you can do something like
#local f_base = function {pattern {hexagon rotate 90*x scale 0.005}}
#local f_scape = function(x,y,z)
{
select(
// Large scale density distribution
f_bozo(x*10,y*10,z*10) *
// Small scale nulling pattern (but still > object scale)
f_bozo(x*40,y*40,z*40)-0.2, 1.0, 0.0
) *
// Base pattern that get's nulled by density
select(f_base(x,y,z)-0.2, 1.0, 0.0)
}
It's probably not so bad for distant geometry. You could also
replace the first 0.0 by a linear interpolation from 1.0 to 0.0
depending on the bozo values to avoid hard vertical cutoffs.
> Life would be so, *so* much easier if planets were flat.
Note the use of warp {spherical} in the spiked planet example
I posted here earlier, it might help for some cases.
Post a reply to this message
|
![](/i/fill.gif) |