POV-Ray : Newsgroups : povray.binaries.scene-files : how the **** do you make NICE grass ? : Re: how the **** do you make NICE grass ? Server Time
18 Apr 2024 23:05:10 EDT (-0400)
  Re: how the **** do you make NICE grass ?  
From: Gordon
Date: 20 Dec 1998 23:54:53
Message: <367dd49d.0@news.povray.org>
There is a way!!!

Assume you want to cover a square 10x10 units.

First write a short routine to create a blade of grass as a mesh. Use say
4-8 triangles.
Place this inside a loop that creates, say, 1000x1000 blades of grass spread
over the 10x10 area.
This should end up as a single mesh{} object declared as, say, GrassPatch,
apply the texture to this object, not the individual blades.
Finally, use another set of loops to create, say 400 copies of the object
GrassPatch. Rotate these by random multiples of 90 degress around the
vertical axis, scale some of them by -1 to flip horizontally and translate
them by a random amount of +/- 1 units in the plane. This does put some
grass outside the fence, but makes the edges very realistic. You can always
clip the edges!

The net result is 400x1000x1000 blades of grass. A total of several BILLION
triangles. I have rendered these scenes with 64 Meg of memory with no
problems. They even render fast. The key is the fact that copies of mesh
objects are just pointers and you can have LOTS of them.

Using several different GrassPatch objects gives a very realistic patch of
grass/weeds/wheat/...

Hope that is useful.

Regards
Gordon
<gbe### [at] birdcameroncomau>

PS I didn't post the actual plug_in as its all at home and I'm at work. Mail
me if you want it.

Ken wrote in message <362E21C9.696F3F92@pacbell.net>...
>Jonatan Hedborg wrote:
>
>> Hi!
>> How do i make nice grass?
>> in 3D, not colormap or whatever.
>> I want it realistic...
>> please help me!
>
>  That is one of the projects (pov related) that I am working on right now.
>If I come up with something I'll let you know. My current strategy is
tending
>towards height fields but even that method lacks finesse in that you can't
have
>individual grasses overlapping each other on on a height field. Trying to
do
>blades of grass on an individual level is next to impossible on a pc unless
you
>nave 1000 megs of memory and a 1000 MHz processor. Well maybe I am
>exaggerating a tad but it is difficult to distribute the quantities
necessary to get
>the right coverage and not end up with files producing  100k + or even
>300 - 500k +  objects per scene.
>
>Ken Tyler
>


Post a reply to this message

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