POV-Ray : Newsgroups : povray.binaries.images : Vegetation simulation WIP 1 Server Time
5 Nov 2024 18:25:39 EST (-0500)
  Vegetation simulation WIP 1 (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Norbert Kern
Subject: Vegetation simulation WIP 1
Date: 7 Jul 2006 17:10:01
Message: <web.44aecceb9373cf132680557b0@news.povray.org>
Hi,

I want to share the first results of my planned plant distribution tool.

In principle it's an solvable problem, see
http://graphics.stanford.edu/papers/ecosys/ecosys.pdf for a basic procedure
example.
First you have to check distances to all neighbors of each plant. Dependent
of the distance and whether the neighbor is another species or not,
increase or decrease the size of the plants. A plant will be replaced after
several iterations or if the size becomes too small.
The problem is to avoid checking each plant against each other on each
iteration, because this leads to n*(n-1) checks, if n is the number of
plants.

My idea is to use my favorite povray commands - 'trace' and 'eval_pigment'.
For each plant a disc is defined with a cylindrical pigment. Then you search
for neighbors by conducting traces. If you hit a neighboring disc, you check
the pigment at this point. This way I 'linearized' the problem, at least I
hope so.
So I implemented aging and influences of several species - light, water,
roots, (soils, slope...) will be considered next.

The image shows distributions of four species after 1, 10 and 40 iterations,
each with equal plant parameters. A regular start distribution pattern was
chosen to show the effect. After 40 iterations representing 2.5 average
lifetimes no pattern is recognizable anymore.
A simple render with four different plants shows this result.


Norbert Kern


Post a reply to this message


Attachments:
Download 'vegetation wip1.jpg' (332 KB)

Preview of image 'vegetation wip1.jpg'
vegetation wip1.jpg


 

From: dlm
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 01:50:51
Message: <44af47bb$1@news.povray.org>
Wow! That's amazing.
DLM

"Norbert Kern" <nor### [at] t-onlinede> wrote in message 
news:web.44aecceb9373cf132680557b0@news.povray.org...
> Hi,
>
> I want to share the first results of my planned plant distribution tool.
>
> In principle it's an solvable problem, see
> http://graphics.stanford.edu/papers/ecosys/ecosys.pdf for a basic 
> procedure
> example.
> First you have to check distances to all neighbors of each plant. 
> Dependent
> of the distance and whether the neighbor is another species or not,
> increase or decrease the size of the plants. A plant will be replaced 
> after
> several iterations or if the size becomes too small.
> The problem is to avoid checking each plant against each other on each
> iteration, because this leads to n*(n-1) checks, if n is the number of
> plants.
>
> My idea is to use my favorite povray commands - 'trace' and 
> 'eval_pigment'.
> For each plant a disc is defined with a cylindrical pigment. Then you 
> search
> for neighbors by conducting traces. If you hit a neighboring disc, you 
> check
> the pigment at this point. This way I 'linearized' the problem, at least I
> hope so.
> So I implemented aging and influences of several species - light, water,
> roots, (soils, slope...) will be considered next.
>
> The image shows distributions of four species after 1, 10 and 40 
> iterations,
> each with equal plant parameters. A regular start distribution pattern was
> chosen to show the effect. After 40 iterations representing 2.5 average
> lifetimes no pattern is recognizable anymore.
> A simple render with four different plants shows this result.
>
>
> Norbert Kern
>


Post a reply to this message

From: Christoph Hormann
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 03:55:03
Message: <e8noc4$j3a$1@chho.imagico.de>
Norbert Kern wrote:
> Hi,
> 
> I want to share the first results of my planned plant distribution tool.

Very nice.

> My idea is to use my favorite povray commands - 'trace' and 'eval_pigment'.
> For each plant a disc is defined with a cylindrical pigment. Then you search
> for neighbors by conducting traces. If you hit a neighboring disc, you check
> the pigment at this point. This way I 'linearized' the problem, at least I
> hope so.

I assume you use a union of discs and trace it. This is not really 
linear but you probably reduced it to O(n*m) where only n is calculated 
in interpreted code and m is in the builtin trace() (it could probably 
actually be O(n*log(m)) but the bounding structures are not yet 
generated at parse time AFAIK).

BTW if you generate cones/spheres instead of discs you could avoid the 
additional pigment evaluation and determine the distance from the 
vertical coordinate/normal.

A hardcoded implementation of this would still be way faster since you 
could store the plants in a spatial data structure.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 01 Jun. 2006)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Stefan Viljoen
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 05:57:44
Message: <44af8198@news.povray.org>
dlm spake:

> Wow! That's amazing.
> DLM

I agree!

Going to make it available soon? My mouth is already watering. It will look
very good in a scene I'm currently working on.

Nicely done,
-- 
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions


Post a reply to this message

From: Norbert Kern
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 11:25:00
Message: <web.44afcd642617f101b0eea8730@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:

> I assume you use a union of discs and trace it. This is not really
> linear..


Thank you for the hint! Now I know, why my render time rised with a power of
two whereas I assumed the contrary. But I've an idea to overcome this
challenge.


> A hardcoded implementation of this would still be way faster since you
> could store the plants in a spatial data structure.


What is a spatial data structure?


Norbert Kern


Post a reply to this message

From: Norbert Kern
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 11:40:00
Message: <web.44afd0fe2617f101b0eea8730@news.povray.org>
Thank you!

To publish the plant distribution tool will take time, because first I've to
solve some speed issues, then I need experience with my plant parameters and
finally I want to implement new features...
But if you want to use it as it is now I can send you the code.


Norbert Kern


Post a reply to this message

From: Norbert Kern
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 11:40:00
Message: <web.44afd18e2617f101b0eea8730@news.povray.org>
"dlm" <me### [at] addressinvalid> wrote:
> Wow! That's amazing.
> DLM

Thank you very much!

Norbert Kern


Post a reply to this message

From: M a r c
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 12:41:10
Message: <44afe026$1@news.povray.org>

news: web.44aecceb9373cf132680557b0@news.povray.org...
> Hi,
>
> I want to share the first results of my planned plant distribution tool.
>
Wonderfull!!
I think you used it for your  IRTC Light and Fog entry and not for the Music
round.

Marc


Post a reply to this message

From: stm31415
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 12:55:01
Message: <web.44afe30b2617f10158f44e3c0@news.povray.org>
I'm being told to get offline, so I haven't gotten more than a page into the
PDF, but I assume there is some way of determining how a plant is replaced?
Can it depend on elevation, or water concentration? That is, do I get to
make an image (or something) that would allow variations in the ecosystem,
have a higher plant density at a creek and lower on rocky ground, with
varaiation in the type of population in each area? It seems like it would
be too hard to give the replacement a type given a probability map for the
set of possible plants. I just going off the top of my head here, but this
is really, really cool - it's got me excited.
Thanks for showing it to us.

-s
5TF!


Post a reply to this message

From: Norbert Kern
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 16:50:01
Message: <web.44b01a322617f101b0eea8730@news.povray.org>
"M_a_r_c" <jac### [at] wanadoofr> wrote:

> Wonderfull!!
> I think you used it for your IRTC Light and Fog entry and not for the Music
> round.

Thank you, Marc!
In my 'Music' entry I used a single gradient pigment to control distribution
of grass, shrubs and trees. The flowers were meant to look like outpoured
notes from the violin. They were placed with the help of masks.

In my new entry for the 'Light and Fog' round I intended to use a plant
distribution tool in fact, but there was no time to accomplish it.
Now I want to demonstrate to myself, that I'm able to create such a tool.

There are good plant and tree generators and some have written excellent
landscape generators for povray. I hope to close the gap betwen them.


Norbert Kern


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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