POV-Ray : Newsgroups : povray.general : Grass Server Time
5 Nov 2024 15:52:42 EST (-0500)
  Grass (Message 1 to 7 of 7)  
From: Mike Metheny
Subject: Grass
Date: 28 Apr 1999 02:46:25
Message: <3726a0b1.0@news.povray.org>
Okay, hypothetical I'm thinking of trying.  I create a heightfeild, make a
nice lil hill.  I wanna use a macro to create a nice field of tall wild
grasses.  obviously the base of each stalk needs to be just under the
'ground' or heightfield.  Easy way to do this anyone?


--


Mike Metheny
lon### [at] vtedu
mik### [at] loneshepherdcom
http://www.loneshepherd.com/

"When one's words are no better than silence, one should keep silent."


Post a reply to this message

From: Ken
Subject: Re: Grass
Date: 28 Apr 1999 03:38:13
Message: <3726ABB1.13C51D42@pacbell.net>
Mike Metheny wrote:
> 
> Okay, hypothetical I'm thinking of trying.  I create a heightfeild, make a
> nice lil hill.  I wanna use a macro to create a nice field of tall wild
> grasses.  obviously the base of each stalk needs to be just under the
> 'ground' or heightfield.  Easy way to do this anyone?
> 
> --
> 
> Mike Metheny
> lon### [at] vtedu
> mik### [at] loneshepherdcom
> http://www.loneshepherd.com/
> 
> "When one's words are no better than silence, one should keep silent."

  The easy way is by using the export points command in Leveller. What
you say ? Leveller will sample a HF and then export, as an array, the
xyz location of the height of various points on that HF. You can then
use the array in a while loop to accurately distribute any type of
object along the surface of your HF object. If you created your HF
image using a different program or method than Leveller it still
is no problem. You can import that image into Leveler and then export
the points based on the information contained in your HF image.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Margus Ramst
Subject: Re: Grass
Date: 28 Apr 1999 09:00:22
Message: <3726f856.0@news.povray.org>
Mike Metheny wrote in message <3726a0b1.0@news.povray.org>...
>Okay, hypothetical I'm thinking of trying.  I create a heightfeild, make a
>nice lil hill.  I wanna use a macro to create a nice field of tall wild
>grasses.  obviously the base of each stalk needs to be just under the
>'ground' or heightfield.  Easy way to do this anyone?
>


The easiest and most flexible way would be to use the trace() function of
the Superpatch. If you want to use official POV, Ken's suggestion is fine,
too. But more difficult from a math point of view.

Margus


Post a reply to this message

From: Ken
Subject: Re: Grass
Date: 28 Apr 1999 09:10:41
Message: <3726F96E.1A007B77@pacbell.net>
Margus Ramst wrote:

> The easiest and most flexible way would be to use the trace() function of
> the Superpatch. If you want to use official POV, Ken's suggestion is fine,
> too. But more difficult from a math point of view.

Say WHAT ?

  If I can use it without any problems then math is not the issue here.
All of the work is done for you by Leveller. Any other way that I can
think of would be more math and process intensive.


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Margus Ramst
Subject: Re: Grass
Date: 28 Apr 1999 10:19:30
Message: <37270ae2.0@news.povray.org>
I haven't used the leveller export feature, but I suspect it exports the
points of the HF as height values, so in a 400X400 HF you get 400X400 height
values. But what if you don't want the objects positioned exactly at the HF
grid points? Or you want to place them more densely than the HF resolution?
You would then have to do pretty complex math to interpolate the height of
an arbitrary point on the HF - or use a (potentially inaccurate)
approximation.
With trace() you can use any density, introduce jitter etc. All it takes is
to make 2 nested while loops going from Xmin to Xmax and Ymin to Ymax. I
think I already have the macro somewhere. If you want it, I'll look it up.

Margus

Ken wrote in message <3726F96E.1A007B77@pacbell.net>...
>
>Say WHAT ?
>
>  If I can use it without any problems then math is not the issue here.
>All of the work is done for you by Leveller. Any other way that I can
>think of would be more math and process intensive.
>
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net


Post a reply to this message

From: Ken
Subject: Re: Grass
Date: 28 Apr 1999 10:32:38
Message: <37270C99.79ACC460@pacbell.net>
Margus Ramst wrote:
> 
> I haven't used the leveller export feature, but I suspect it exports the
> points of the HF as height values, so in a 400X400 HF you get 400X400 height
> values. But what if you don't want the objects positioned exactly at the HF
> grid points? Or you want to place them more densely than the HF resolution?
> You would then have to do pretty complex math to interpolate the height of
> an arbitrary point on the HF - or use a (potentially inaccurate)
> approximation.
> With trace() you can use any density, introduce jitter etc. All it takes is
> to make 2 nested while loops going from Xmin to Xmax and Ymin to Ymax. I
> think I already have the macro somewhere. If you want it, I'll look it up.
> 
> Margus

  Leveller will allow you to sample the grid of a HF and pick a % of
the total available amount of coverage that you wish to use. You can
also specify a min/max for the level so you don't for example populate
your lake basin with grass or your mountain top with petunias. It is
a very versatile function that I am familiar with and it is very easy
to use.
  It will also produce the while loop script for you so you don't
have to worry about syntax problems. If you need your objects slightly
higher or lower it's a simple matter off translating the whole works
in the direction you wish to go or since they should be defined at the
origin to begin with you can simply have them slightly higher or lower
than that position to get them to where you need them.

   I would not be recommending it if it were not indeed an easy and
functional process for doing exactly what the original poster requested.
I am personaly into easy when it is available and this is a brainless
operation that offers a lot of power.


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Margus Ramst
Subject: Re: Grass
Date: 28 Apr 1999 12:40:50
Message: <37272c02.0@news.povray.org>
Very well, if you say so. I still maintain all this and more can be done
with trace() and a relatively simple macro. But I don't feel like
re-inventing the bicycle right now.

Margus

Ken wrote in message <37270C99.79ACC460@pacbell.net>...
>
>  Leveller will allow you to sample the grid of a HF and pick a % of
>the total available amount of coverage that you wish to use. You can
>also specify a min/max for the level so you don't for example populate
>your lake basin with grass or your mountain top with petunias. It is
>a very versatile function that I am familiar with and it is very easy
>to use.
>  It will also produce the while loop script for you so you don't
>have to worry about syntax problems. If you need your objects slightly
>higher or lower it's a simple matter off translating the whole works
>in the direction you wish to go or since they should be defined at the
>origin to begin with you can simply have them slightly higher or lower
>than that position to get them to where you need them.
>
>   I would not be recommending it if it were not indeed an easy and
>functional process for doing exactly what the original poster requested.
>I am personaly into easy when it is available and this is a brainless
>operation that offers a lot of power.
>
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net


Post a reply to this message

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