POV-Ray : Newsgroups : povray.binaries.images : Vegetation simulation WIP 1 Server Time
7 Aug 2024 07:14:14 EDT (-0400)
  Vegetation simulation WIP 1 (Message 3 to 12 of 22)  
<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>
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

From: Norbert Kern
Subject: Re: Vegetation simulation WIP 1
Date: 8 Jul 2006 17:50:00
Message: <web.44b027e92617f101b0eea8730@news.povray.org>
"stm31415" <sam### [at] cscom> wrote:
> 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.



Thank you!
In fact such a tool is always a fake. I try not to confuse it with reality -
it only has to simulate it. This is because of the control paramenters which
I cannot adjust in a correct way simply because I don't know them. By
example, what is the optimum soil humidity for nettles? At least nettles
seem to grow everywhere, so they can tolerate many conditions from sunny to
pure shady locations. Perhaps they tolerate conditions other plants simply
don't like, but aren't good in competing with other species. In this
respect my model won't be very different from a pure guess.

For water availability I got a tip of Prof. Deussen, one of the Xfrog
authors.
The function, which defines the ground can also serve as approximation to
water content.

Rocks are easy - they cast shadows. A simple image which defines shadowing
from rocks, big plants, houses and so on is sufficient to define smaller
and less dense vegetation near rocks. Near trees you have to consider the
roots too, which lower water availability at those points.

Probability maps are nice. In fact I used simple examples for some of my
images. But with a little practice you can see the difference to an
iterative approach.


Norbert Kern


Post a reply to this message

From: Christoph Hormann
Subject: Re: Vegetation simulation WIP 1
Date: 9 Jul 2006 03:25:03
Message: <e8qapm$jln$1@chho.imagico.de>
Norbert Kern wrote:
> 
> What is a spatial data structure?

A tree stucture like an octree/quadtree or BSP tree that makes it very 
efficient to access an element at a certain location.

Note in your case (and esp. for implementation in SDL) it might be the 
best approach to use a regular grid to store your locations in (or 
alternatively using spatial hashing if a grid would be too large).  This 
technique is widely used in molecular dynamics simulation.  What would 
be necessary for this to work is a limited density or the plants.  If a 
large number of plants can occur very close to each other that would be 
quite difficult to handle in SDL with a grid.

The idea is that with a grid cell size >= the maximum 'influence 
distance' of the plants only plants in neighboring grid cells can 
influence each other.  With a limited plant density that would only take 
constant time.

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

<<< Previous 2 Messages Goto Latest 10 Messages Next 10 Messages >>>

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