POV-Ray : Newsgroups : povray.general : Large field of grass Server Time
17 Nov 2024 05:14:30 EST (-0500)
  Large field of grass (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Florian Brucker
Subject: Large field of grass
Date: 6 Jun 2003 05:31:17
Message: <3ee05f65$1@news.povray.org>
Hey guys!

I'm trying to cover some hills with grass (in POV, our garden is not that
big...). As Gille Tran's MakeGrass only does plane grass patches i'm
searching for an other way to do this.

I wrote a little grass generator (much simpler than MakeGrass). One blade is
one triangle. I'm now wondering if it is better to put this one triangle in
a mesh and place it several times or to put all the blades (quite a lot, ca.
10000*10000) in one mesh. I tried the first method and ran out of my 256mb
RAM, but i think the second one would not save any memory at all.

Or is there another, better solution for large uneven areas of grass?

Thanks a lot
Florian


Post a reply to this message

From: ABX
Subject: Re: Large field of grass
Date: 6 Jun 2003 05:34:40
Message: <irn0ev8k9p7cldo8nb32uccj48ntlnu5qj@4ax.com>
On Wed, 4 Jun 2003 18:22:42 +0200, "Florian Brucker" <tor### [at] torfboldcom> wrote:
> Or is there another, better solution for large uneven areas of grass?

Look at tricky method at runevision.com by Rune. This is unfortunatelly offline
due to database crash at this moment but smart searching in binary groups could
help.

ABX


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Large field of grass
Date: 6 Jun 2003 05:51:38
Message: <3ee0642a$1@news.povray.org>
Before my complete System Crash and my update
from v1.0 to v2.0, I had written a nice grass-generator
which would create a grassblade out of several triangles.
Of these, I would generate about 20 different ones.
Then, I'd take a random selection and built about 5
different grass-bundles, using about 10 of the 20 blades
per bundle. Then, these 5 bundles where saved as meshes
to disk, and later scaled for different size, rotated around
y to make the reuse of the same bundle less obvious, and
translated to desired locations.

An image dating back to those days can be found here:
http://www.digitaltwilight.de/no_lights/grass.jpg

It worked pretty fine, though I do think I had 512 MB
RAM at that moment. Still, using five bundles should
fit into 256 MB RAM, you'd just have to seperate generating
process from rendering process, and maybe use a lesser
resolution for the triangles.
Anyways, the handling for all this was pretty complicated.
I had to save the vertice-positions of the blades in arrays,
so that I may access them to put them into one large
mesh with several other blades. All were positioned on a circle
with blades pointing outwards, so I needed to take the
vertices, translate and rotate them. Only in the final
step, once the bundles are being generated, do I take the
vertices (which should, for every bundle, be at their proper
places now) and construct triangles which are saved to
disk.
So, for the blades I had an array like
Blades[Blade_Number][X_Pos][Y_Pos]. For a bundle, all
I had to do was take another array, like
Bundle[Bundle_Number][Blade][X_Pos][Y_Pos].
So, per Bundle, I'd save a selection of blades, each
with properly rotated vertices saved in X_Pos and Y_Pos.

Only drawback with this method was that the blades had the
same amount of triangles on the x-axis at the base and at the
top tip, but perhaps this could be taken care of by clipping
a diagonal line from base to tip (not in the sense of clipped_by,
but rather leaving a diagonal strip of triangles out).

Perhaps this gets you going, but perhaps this would be overkill
for your image (don't know what you're after, if its foreground
filling or just detail background...)

Regards,
Tim

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> Hey guys!
>
> I'm trying to cover some hills with grass (in POV, our garden is not that
> big...). As Gille Tran's MakeGrass only does plane grass patches i'm
> searching for an other way to do this.
>
> I wrote a little grass generator (much simpler than MakeGrass). One blade
is
> one triangle. I'm now wondering if it is better to put this one triangle
in
> a mesh and place it several times or to put all the blades (quite a lot,
ca.
> 10000*10000) in one mesh. I tried the first method and ran out of my 256mb
> RAM, but i think the second one would not save any memory at all.
>
> Or is there another, better solution for large uneven areas of grass?
>
> Thanks a lot
> Florian
>
>


Post a reply to this message

From: Gilles Tran
Subject: Re: Large field of grass
Date: 6 Jun 2003 06:00:23
Message: <3ee06637$1@news.povray.org>

3ee05f65$1@news.povray.org...
> I'm trying to cover some hills with grass (in POV, our garden is not that
> big...). As Gille Tran's MakeGrass only does plane grass patches i'm
> searching for an other way to do this.

The MakePrairie macro does only plane areas, but you can use trace() and the
Reorient macros to drop grass patches on a hill and orient them along the
terrain normals. If the terrain isn't too bumpy and if the patches are small
enough you can get away with it.
http://www.oyonale.com/ldc/images/lumieres_detail1.jpg
You'll still need a lot of patches though so the texture method a la Rune is
possibly the only way for large surfaces.

G.
--

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


Post a reply to this message

From: Gena Obukhov
Subject: Re: Large field of grass
Date: 6 Jun 2003 11:06:28
Message: <3EE0AC17.140A3265@mail.com>
"Tim Nikias v2.0" wrote:

> Before my complete System Crash and my update
> from v1.0 to v2.0, I had written a nice grass-generator
> which would create a grassblade out of several triangles.
> Of these, I would generate about 20 different ones.
> Then, I'd take a random selection and built about 5
> different grass-bundles, using about 10 of the 20 blades
> per bundle. Then, these 5 bundles where saved as meshes
> to disk, and later scaled for different size, rotated around
> y to make the reuse of the same bundle less obvious, and
> translated to desired locations.

This is my pending plan - to make something like that :)
To make flexible and highly customizable plant system for
POV-Ray. There are many scripts already written for that
purpose but whenever I tried to use it I always faced some
sort of restrictions.
Here are some highlights of that possible system:
- triangle/mesh oriented
- flexible blade generator.
    Blade could be flat, two-fold and more folds.
    Ability to have UV-mapping for blade (for closup)
    Ability to configure all blade parameters:
        hieght, bredth, curve radius, blade edge (straight, curved, zigzag),
        random parameters etc.
   Such blade generator could be implemented as Java GUI.
- stem generator with the same functionality as blade generator.
- leaf and petal generator  with the same functionality as blade generator
- flower/plant generator based on leaf, stem and petal generator with
  additional parameters specific for the whole flower.

When grass/flower/plant is ready it could be used by a set of scripts/macros
for placement on surface. Those scripts/macros could take as input parameter
array of different plants (grass/flower). Those scripts could be divided into
such groups as:
- placement on flat surface (rectangle, circle and polygon) with ability to
  scale/rotate/change color for plants which are close to the border of the
shape
- placement on curved surface (using trace) with the same functionality as above

- placement on flat/curved surface specified by procedural texture. For example
  in case of b&w bozo to place plant only on black zone. For transition from
from
  black to white - scale plants down proportionally.

For painting those plants there could be another script(s) with the following
functionality:
- single color
- color randomly selected from the provided array of colors with separate
  array for plants which are close to the border
- color selected from specified procedural texture
- array of UV maps

Gena.


Post a reply to this message

From: Florian Brucker
Subject: Re: Large field of grass
Date: 7 Jun 2003 11:10:27
Message: <3ee20063$1@news.povray.org>
Hey ABX!

> Look at tricky method at runevision.com by Rune.
I know his nice texture trick, but I'm afraid this won't look that good in a
closeup, and using it together with "real" grass in the foreground would
bring up other problems imho.

thanks anyway,
florian


Post a reply to this message

From: Florian Brucker
Subject: Re: Large field of grass
Date: 7 Jun 2003 11:10:28
Message: <3ee20064@news.povray.org>
Hey Gena!

> This is my pending plan - to make something like that :)
> To make flexible and highly customizable plant system for
> POV-Ray.

I always admired your work - both in artistic and technical aspects. But
this project would be a *really* wonderful tool for building POV scenes. I'm
definitely looking forward to it!
I'm just not sure if i can wait till it's finished.

Oh and I've got a feature-request for it, too: pigment-based growth. I
implemented it in my little grass generator and it's really helpful.

Keep up the good work!
Florian


Post a reply to this message

From: Florian Brucker
Subject: Re: Large field of grass
Date: 7 Jun 2003 11:10:29
Message: <3ee20065@news.povray.org>
Hey Tim!

Sounds like quite a bit of work ;-)
The result is really nice, but I hope I can find sth simpler. But who
knows...

Thanks,
Florian


Post a reply to this message

From: Florian Brucker
Subject: Re: Large field of grass
Date: 7 Jun 2003 11:10:29
Message: <3ee20065$2@news.povray.org>
Hey Gilles!

>you can use trace() and the Reorient macros
Yes, I thought about that, too. I'll try it.

BTW: Your MakeGrass-Macro is really nice - like all the other tools & images
you created over the years. I love your work!

Thanks,
Florian


Post a reply to this message

From: davidafisher
Subject: Re: Large field of grass
Date: 12 Feb 2012 15:35:00
Message: <web.4f38221f55dd79fd3f5700d00@news.povray.org>
> The MakePrairie macro does only plane areas, but you can use trace() and the
> Reorient macros to drop grass patches on a hill and orient them along the
> terrain normals. If the terrain isn't too bumpy and if the patches are small
> enough you can get away with it.
> http://www.oyonale.com/ldc/images/lumieres_detail1.jpg
> You'll still need a lot of patches though so the texture method a la Rune is
> possibly the only way for large surfaces.
>
> G.
> --

I followed the trace() advice and ran into a problem. I use an ordnance Survey
digital map for my topography and have a GPS location that coincides with the
Landmass, this location is set for the center of my scene:

 CenS     = 197610.0310786000, 11.1000000000, -695109.5844980000

 my plan was to radiate out from this spot and place grass patches to help in
the depth of field. As you can see from the x,z coordinates using <0,0,0> as a
trace point would not work (glancing blow or some other part of the topography
might intercede), so I set two points one above and one below the terrain by
adding and subtracting 50 to the y coordinate.

   new_up = 197610.0310786000, 61.1000000000, -695109.5844980000

 new_down = 197610.0310786000, -38.9000000000, -695109.5844980000
run the trace
#local clump_position  =  trace (landmass,new_up, new_down,TraceNorm);

as a test trace between these two points you would think I would get the
original CenS value, but this is what I get:

 TraceNorm      = -0.0852216709,  0.9928279034,  0.0838452206
 clump_position = 198132.9729394691, 60.9970576631, -696949.0756293016

a difference in x of 522.9418609 and z of -1839.491131

What is it that I don't understand about trace?


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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