|
![](/i/fill.gif) |
> The exact use case is: I am trying to place a very large number of
> objects on a terrain. I can describe one object as an isosurface, but
> the number of objects is so high that I can't model them as CSG. So, I
> need to be able to create a single isosurface that will model all my
> objects in one go.
>
> Is this kind of thing feasible?
It depends whether you can express the placement pattern with
a simple function. Generating millions of min and selects will
make the result much slower than using object copies. On the other
hand, a function that has a periodicity can be used to multiply
object instances. For example, here's a million object copies
placed in a grid that renders reasonably fast:
#declare f_obj = function(x,y,z) {f_sphere(x,y,z,0.05)}
#declare f_grid = function(x,y,z) {f_obj(sin(x*10)/10,y,sin(z*10)/10)}
isosurface
{
function { f_grid(x,y,z) }
contained_by { box {<-50,0,0>,<50,1,100>} }
accuracy 0.001
max_gradient 1
pigment {color White}
}
Randomizing locations with f_noise3d and the likes without
deforming the objects will be tricky, although its probably
possible by discretizing the noise (modulo, rounding?) so
it will be constant around the domain of your object.
Post a reply to this message
|
![](/i/fill.gif) |