POV-Ray : Newsgroups : povray.binaries.images : New Planting Method Server Time
15 Nov 2024 22:26:27 EST (-0500)
  New Planting Method (Message 1 to 10 of 32)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Norbert Kern
Subject: New Planting Method
Date: 10 Sep 2005 19:12:21
Message: <43236855@news.povray.org>
This demo scene shows three effects useful for planting many things like
grass, trees, rocks or stones.

1. If you want to show a dense forest from near to a far distance, you may
need millions of tree copies. Even povray has problems with millions of
mesh2 copies.
But if you show only the visible ones, you need only 75000 trees like in
this demo file.
The trick is to define random vectors from the camera position, which point
only to visible parts and to use them in the trace command.

2. The problem with this method is that parts far away seem less dense
populated as nearer parts.
The solution is to find the maximum distance to be populated. Then you  can
use the inverse quadratic relationship to plant with equal density despite
different distances.

3. I always wanted to draw directly on a test image and to use it for
different planting effects. This would give maximum control over the result.
The second image shows the POV logo's image used in the demo scene.

I'll post an (unoptimized) demo file at binaries.scene-files.


Norbert Kern


Post a reply to this message


Attachments:
Download 'Tree_Logo.jpg' (259 KB) Download 'pov_logo.jpg' (49 KB)

Preview of image 'Tree_Logo.jpg'
Tree_Logo.jpg

Preview of image 'pov_logo.jpg'
pov_logo.jpg


 

From: Tim Cook
Subject: Re: New Planting Method
Date: 10 Sep 2005 19:43:55
Message: <43236fbb$1@news.povray.org>
Quit postiing photog...

*is impressed by the shiny shiny image, then notices that the trees 
have...patterns*

heyyyyyyy

o.o

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Slime
Subject: Re: New Planting Method
Date: 10 Sep 2005 19:44:00
Message: <43236fc0$1@news.povray.org>
Nice image! I was going to comment on the strange regularity of the tree
colors until I read your third point. =)

> 2. The problem with this method is that parts far away seem less dense
> populated as nearer parts.
> The solution is to find the maximum distance to be populated. Then you
can
> use the inverse quadratic relationship to plant with equal density despite
> different distances.

But since you don't know where that maximum distance occurs, you still have
to shoot the same density of rays everywhere. Do you then use 1/distance^2
as a probability for discarding the ray?

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Slime
Subject: Re: New Planting Method
Date: 10 Sep 2005 19:45:00
Message: <43236ffc$1@news.povray.org>
By the way, what's your water texture?

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Norbert Kern
Subject: Re: New Planting Method
Date: 10 Sep 2005 20:08:49
Message: <43237591$1@news.povray.org>
yes, exactly. In effect I use that code:
 #if (pow (vlength (cam_loc-Inter) / max_dist, 2) > rand (r4))
Of course it would be possible to set max_dist to something very big.
But then generating the tree coordinates would take much more time.

Norbert Kern

"Slime" <fak### [at] emailaddress> schrieb im Newsbeitrag 
news:43236fc0$1@news.povray.org...

> But since you don't know where that maximum distance occurs, you still 
> have
> to shoot the same density of rays everywhere. Do you then use 1/distance^2
> as a probability for discarding the ray?
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>


Post a reply to this message

From: Norbert Kern
Subject: Re: New Planting Method
Date: 10 Sep 2005 20:12:32
Message: <43237670@news.povray.org>
"Slime" <fak### [at] emailaddress> schrieb im Newsbeitrag 
news:43236ffc$1@news.povray.org...
> By the way, what's your water texture?

For this demo I used a water material from Gilles Tran.
I included a link in the demo at povray.binaries.scene-files.


Norbert Kern


Post a reply to this message

From: EagleSun
Subject: Re: New Planting Method
Date: 10 Sep 2005 23:36:57
Message: <4323a659@news.povray.org>
"Norbert Kern" <nor### [at] t-onlinede> wrote in message 
news:43236855@news.povray.org...
> This demo scene shows three effects useful for planting many things like
> grass, trees, rocks or stones.
>
> 1. If you want to show a dense forest from near to a far distance, you may
> need millions of tree copies. Even povray has problems with millions of
> mesh2 copies.
> But if you show only the visible ones, you need only 75000 trees like in
> this demo file.
> The trick is to define random vectors from the camera position, which 
> point
> only to visible parts and to use them in the trace command.
>
> 2. The problem with this method is that parts far away seem less dense
> populated as nearer parts.
> The solution is to find the maximum distance to be populated. Then you 
> can
> use the inverse quadratic relationship to plant with equal density despite
> different distances.
>
> 3. I always wanted to draw directly on a test image and to use it for
> different planting effects. This would give maximum control over the 
> result.
> The second image shows the POV logo's image used in the demo scene.
>
> I'll post an (unoptimized) demo file at binaries.scene-files.

Really NICE photo!  (tho not sure it's allowed here) hehe.

Still trying to figure out what you're saying here.. cause I'm a novice with 
POV-Ray.  Sounds like you're trying to define only those trees that are in 
view, and not ALL the trees.... when I ran the veg_many_things_WRITE 
script... I gave up waiting for it to finish, and I think it did only 300 
trees.  Not sure this shortcut of yours is anything short at all.


Post a reply to this message

From: Christoph Hormann
Subject: Re: New Planting Method
Date: 11 Sep 2005 02:25:01
Message: <dg0ifb$2oi$1@chho.imagico.de>
Norbert Kern wrote:
> This demo scene shows three effects useful for planting many things like
> grass, trees, rocks or stones.
> 
> 1. If you want to show a dense forest from near to a far distance, you may
> need millions of tree copies. Even povray has problems with millions of
> mesh2 copies.

Could you elaborate?  Lots of mesh instances of course take memory (much 
less than copying the mesh though) but this should scale without 
problems as long as you have enough memory and the performance should be 
O(log n) as long as the trees do not overlap too much.

> But if you show only the visible ones, you need only 75000 trees like in
> this demo file.
> The trick is to define random vectors from the camera position, which point
> only to visible parts and to use them in the trace command.

Interesting idea this 'image space object placement' - it has a few 
problems though:

- Esp. with lower tree density you have the problems that trees with 
their bottom below visibility (only the top looking above a mountain 
ridge for example) don't get placed.

To avoid this but still keep the number of trees placed low you can use 
the normal scene space placing and trace a 'visibility ray' to the 
camera location to check if to actually place the tree.  If you trace 
this ray from the top of the tree this will solve the issue.  The major 
disadvantage is of course this is very slow (lots of unsuccessful tests, 
two traces per test)

- it only works for camera types you have written a mapping function 
for.  For this might be good to have scene language support for image 
space/scene space transformation.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Tim Nikias
Subject: Re: New Planting Method
Date: 11 Sep 2005 02:38:05
Message: <4323d0cd@news.povray.org>
Nice image and interesting technique. I guess I'll try something similiar a
the near future, though I'd probably go the longer and more complicated way
as Christoph described it. You can't have trees just stop behind a hill...

I'd probably use my Surcoat-Macros, and an idea I just had: if I'd place a
parallel lightsource in place of the camera and view from above, the hills
should throw shadows onto the terrain itself. So I only get bright spots
(where placing of objects will take place) where the camera sees it. If I
then "grow" a rim around that area, I'd have a little more space in all
directions... Hm. Need to think about this more.

Anyways, how did you create the tree? POV-Tree, or did you do it yourself?

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Norbert Kern
Subject: Re: New Planting Method
Date: 11 Sep 2005 03:56:06
Message: <4323e316@news.povray.org>
sorrry, I should have mentioned the time needed.
It takes about 10 minutes with a 2.7 GHz P4 system to complete the 
coordinate finding for the 75000 trees.
You need an aspect ratio of 2:1 like in +w800 +h400 despite ending with a 
black image.
After you generated the tree coordinates once parsing the Tree_Logo.pov file 
needs only 20 seconds.

Norbert Kern

"EagleSun" <nomail@nomail> schrieb im Newsbeitrag 
news:4323a659@news.povray.org...
>
> "Norbert Kern" <nor### [at] t-onlinede> wrote in message 
> news:43236855@news.povray.org...
>> This demo scene shows three effects useful for planting many things like
>> grass, trees, rocks or stones.
>>
>> 1. If you want to show a dense forest from near to a far distance, you 
>> may
>> need millions of tree copies. Even povray has problems with millions of
>> mesh2 copies.
>> But if you show only the visible ones, you need only 75000 trees like in
>> this demo file.
>> The trick is to define random vectors from the camera position, which 
>> point
>> only to visible parts and to use them in the trace command.
>>
>> 2. The problem with this method is that parts far away seem less dense
>> populated as nearer parts.
>> The solution is to find the maximum distance to be populated. Then you 
>> can
>> use the inverse quadratic relationship to plant with equal density 
>> despite
>> different distances.
>>
>> 3. I always wanted to draw directly on a test image and to use it for
>> different planting effects. This would give maximum control over the 
>> result.
>> The second image shows the POV logo's image used in the demo scene.
>>
>> I'll post an (unoptimized) demo file at binaries.scene-files.
>
> Really NICE photo!  (tho not sure it's allowed here) hehe.
>
> Still trying to figure out what you're saying here.. cause I'm a novice 
> with POV-Ray.  Sounds like you're trying to define only those trees that 
> are in view, and not ALL the trees.... when I ran the 
> veg_many_things_WRITE script... I gave up waiting for it to finish, and I 
> think it did only 300 trees.  Not sure this shortcut of yours is anything 
> short at all.
>
>


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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