POV-Ray : Newsgroups : povray.binaries.images : Some grass (86kbu) : Re: Some grass (86kbu) Server Time
16 Aug 2024 08:13:55 EDT (-0400)
  Re: Some grass (86kbu)  
From: Gilles Tran
Date: 2 Apr 2002 11:42:51
Message: <3ca9df8b@news.povray.org>

However, Gilles' macro can only create grass on flat surfaces AFAIK. Since
> using many copies of the same mesh isn't possible to the same extent when
> covering hills with grass, maybe doing that with mesh grass would still be
> less efficient, or even impossible on many machines?

Actually it's not very difficult for a good coder to modify the code and
make it "drop" the original grass patch on a surface following a grid,
thanks to the trace function and to the reorient macro. Check the slope
angle (to avoid putting patches where they shouldn't grow), add some
randomness and that's all.
http://www.oyonale.com/ldc/images/arbreteledetail1.jpg

The code was written for this specific picture and is not generic. I can
send it to you, it's just very ugly. Mick Hazelgrove did that with his own
macro too I guess. Note that I'm talking about covering the surface by
repeating a square, flat grass patch, not a patch that would fit the
underlying surface. The trick to optimize this is to make it in 2 steps, one
that creates the patch file and one that creates the patches coordinates
file. Then I use the coordinates file to save on the parsing time or even
add other layers of objects.
It is going to be efficient anyway because meshes are always fast.
I attached a test I did some years ago using a similar routine, but with a
car instead of a grass patch.

Your macro may be easier to use though and better-looking in some cases (in
fact I just have a project where it's going to be handy).

G.


--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message


Attachments:
Download 'trafic03a.jpg' (43 KB)

Preview of image 'trafic03a.jpg'
trafic03a.jpg


 

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