|
|
Norbert Kern wrote:
> This demo scene shows three effects useful for planting many things like
> grass, trees, rocks or stones.
>
> 1. If you want to show a dense forest from near to a far distance, you may
> need millions of tree copies. Even povray has problems with millions of
> mesh2 copies.
Could you elaborate? Lots of mesh instances of course take memory (much
less than copying the mesh though) but this should scale without
problems as long as you have enough memory and the performance should be
O(log n) as long as the trees do not overlap too much.
> But if you show only the visible ones, you need only 75000 trees like in
> this demo file.
> The trick is to define random vectors from the camera position, which point
> only to visible parts and to use them in the trace command.
Interesting idea this 'image space object placement' - it has a few
problems though:
- Esp. with lower tree density you have the problems that trees with
their bottom below visibility (only the top looking above a mountain
ridge for example) don't get placed.
To avoid this but still keep the number of trees placed low you can use
the normal scene space placing and trace a 'visibility ray' to the
camera location to check if to actually place the tree. If you trace
this ray from the top of the tree this will solve the issue. The major
disadvantage is of course this is very slow (lots of unsuccessful tests,
two traces per test)
- it only works for camera types you have written a mapping function
for. For this might be good to have scene language support for image
space/scene space transformation.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|