POV-Ray : Newsgroups : povray.newusers : Making grass : Re: Making grass Server Time
30 Jul 2024 18:17:49 EDT (-0400)
  Re: Making grass  
From: Christopher James Huff
Date: 16 Nov 2003 19:31:52
Message: <cjameshuff-D9A0DD.19283016112003@netplex.aussie.org>
In article <web.3fb706a87f775ccbb26501b0@news.povray.org>,
 "Justin Smith" <t74### [at] yahoocom> wrote:

> I've written a fairly simple grass macro. I want to use it to coat some
> isosurface terrain. Each blade of grass consists of only 3 triangle
> objects. The macro works by using trace() at a random x,z position with
> each blade of grass. I think I need around 500,000 blades of grass to get a
> realistic look. The problem here is that even with 2.1 Ghz and 1 GB of Ram,
> I never even get to the rendering step of generating the output image. It
> spends about a half hour on the parsing, and then at least 2 more hours on
> generating bounding slabs (I quit after that).

It sounds like you are constructing your grass out of individual 
triangle objects. This is a very inefficient way to do it. Mesh objects 
are designed for efficient storage of multiple triangles. For example, 
your 3 triangle blades probably have 5 vertices. Doing it with 3 
triangles requires storing 9 vertices, a mesh will store only 5.

Also, a copy of a mesh references the original data, rather than 
creating a new copy. The usual way of making grass is to make several 
mesh patches, and place many copies of these patches across the 
landscape. This allows you to get good coverage with surprisingly little 
memory usage.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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