POV-Ray : Newsgroups : povray.advanced-users : Grass : Re: Grass Server Time
29 Jul 2024 08:23:57 EDT (-0400)
  Re: Grass  
From: Le Forgeron
Date: 30 Aug 2002 09:59:51
Message: <3D6F7A84.3050403@free.fr>
Niki Estner wrote:

> Hi there,
> 
> I got a scene where I need some grass. I know, there are include files on
> the www that do wonderful grass, but in my case the camera is quite far of,
> so only rough shapes can be seen: I decided to make only ellipsoids for the
> grass. So I built a #while loop that creates 500.000 spheres, all scaled,
> rotated and translated.
> Unfortunately this needs far too much memory. (much more that I have)
> I tried something alike with triangles (in a mesh), but with that it'd need
> weeks to render the scene (spheres with lots of swapping are actually
> faster!)
> 
> I don't think this is a new problem: using many particles for hair, grass,
> explosions isn't a big idea, and using the fastest raytracing object - the
> sphere - is also only reasonable. Did anyone find a way to keep the memory
> usage in bounds?


Classical with grass is to make a mesh of triangles for a "unit",
then duplicate the mesh around to pave.

The right tuning of "unit" is nevertheless required:
  - too small, there is too much mesh bounding box to test against.
  - too big, memory usage is too high and there is more time
    to find the intersection in the mesh than finding the mesh it is 
part of with bounding box.

To avoid pattern repetition, a little jitter as well as random rotation


Post a reply to this message

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