POV-Ray : Newsgroups : povray.newusers : Making grass Server Time
5 Nov 2024 11:18:00 EST (-0500)
  Making grass (Message 1 to 3 of 3)  
From: Justin Smith
Subject: Making grass
Date: 16 Nov 2003 00:15:03
Message: <web.3fb706a87f775ccbb26501b0@news.povray.org>
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).

I've seen some pictures with some very complicated-looking vegetation, so I
know this can be done. But I'm obviously doing something wrong.


Post a reply to this message

From: Christoph Hormann
Subject: Re: Making grass
Date: 16 Nov 2003 04:32:02
Message: <9rrj81-u12.ln1@triton.imagico.de>
Justin Smith 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).

3*500000 triangles should not be a problem if they are in one mesh 
(500000 meshes with each 3 triangles could be a problems though).

None the less most scenes with complex vegetation make use of 
instancing, i.e. the same mesh is used several times in the scene.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christopher James Huff
Subject: Re: Making grass
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.