POV-Ray : Newsgroups : povray.binaries.images : Forest macro 2 Server Time
12 Oct 2026 20:02:37 EDT (-0400)
  Forest macro 2 (Message 1 to 27 of 27)  
From: William Tracy
Subject: Forest macro 2
Date: 8 Feb 2008 23:43:23
Message: <47ad2f6b@news.povray.org>
... I don't care whether there's enough trees to call it a forest, I'm 
still calling it a forest macro ...

I think the macro is almost finished--I'll post the source sometime next 
week.

Actually, I now have an include file with two macros: One that plants a 
single clump of trees centered at a specified location, and one that 
populates an entire landscape by planting many clumps at random 
locations. I can mix and match the two depending on how much control I 
need over the scene.

Also, the landscape planting macro takes two shape arrays now: An array 
of tree shapes, and an array of bush shapes. The bush clumps are 
centered around the tree clumps, but spread out more.

While I'm posting, is anyone besides Sven interested in my landscape 
mesh generator program? I didn't originally intend to distribute the 
program, since Terragen and Geomorph are both already free and much more 
full-featured. However, if people are interested (one person does not 
count as "people") I'll try to clean up the program and put it online.

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

Who could pollute the entire world?
     -- Nausicaa


Post a reply to this message


Attachments:
Download 'a4b.jpg' (171 KB)

Preview of image 'a4b.jpg'
a4b.jpg


 

From: Nicolas Alvarez
Subject: Re: Forest macro 2
Date: 8 Feb 2008 23:48:28
Message: <47ad309c$1@news.povray.org>
William Tracy escribió:
> Actually, I now have an include file with two macros: One that plants a 
> single clump of trees centered at a specified location, and one that 
> populates an entire landscape by planting many clumps at random 
> locations. I can mix and match the two depending on how much control I 
> need over the scene.

Hmm... How about using a heightfield image to tell it where to put more 
trees? :)


Post a reply to this message

From: Ger
Subject: Re: Forest macro 2
Date: 9 Feb 2008 00:23:54
Message: <47ad38ea@news.povray.org>
William Tracy wrote:

> ... I don't care whether there's enough trees to call it a forest, I'm
> still calling it a forest macro ...
> 
> I think the macro is almost finished--I'll post the source sometime next
> week.
> 
> Actually, I now have an include file with two macros: One that plants a
> single clump of trees centered at a specified location, and one that
> populates an entire landscape by planting many clumps at random
> locations. I can mix and match the two depending on how much control I
> need over the scene.
> 
> Also, the landscape planting macro takes two shape arrays now: An array
> of tree shapes, and an array of bush shapes. The bush clumps are
> centered around the tree clumps, but spread out more.
> 
> While I'm posting, is anyone besides Sven interested in my landscape
> mesh generator program? I didn't originally intend to distribute the
> program, since Terragen and Geomorph are both already free and much more
> full-featured. However, if people are interested (one person does not
> count as "people") I'll try to clean up the program and put it online.
> 
Count me in.
-- 
Ger


Post a reply to this message

From: Nekar Xenos
Subject: Re: Forest macro 2
Date: 9 Feb 2008 01:48:21
Message: <47ad4cb5@news.povray.org>
Lovely.

I've been thinking about how trees are distributed and I've noticed that in 
RL  the dense growth tend to be in the valleys and "dents" and of course 
along streams and rivers. I think this has to do with how water flows when 
it rains and tends to accumulate in puddles obviousley carrying any loose 
seeds with it. Maybe an easy way to simulate this is by giving lower 
altitudes a higher denstiy and higher probabilty of clumps.

Keep up the good work!


"William Tracy" <wtr### [at] calpolyedu> wrote in message 
news:47ad2f6b@news.povray.org...

> While I'm posting, is anyone besides Sven interested in my landscape
> mesh generator program? I didn't originally intend to distribute the
> program, since Terragen and Geomorph are both already free and much more
> full-featured. However, if people are interested (one person does not
> count as "people") I'll try to clean up the program and put it online.
>

I'm interested. Especialy because it's done in Pov-Ray :)


-- 
-Nekar Xenos-


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2
Date: 9 Feb 2008 03:10:55
Message: <47ad600f@news.povray.org>
Nicolas Alvarez wrote:
> Hmm... How about using a heightfield image to tell it where to put more 
> trees? :)

That's overkill for my specific application. :-)

I need to place a few clumps to cover some artifacts in a render I'm 
working on, then plant the rest of the scene randomly.

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

The flavor of Redcode used in this guide is (mostly) the current de 
facto standard, the ICWS '94 Standard Draft with pMARS 0.8 extensions. 
(Sort of like the Netscape extensions to HTML... Hmm... Luckily we still 
don't have a Microsoft Corewar Simulator. Maybe they think the market's 
too small.)
     -- Ilmari Karonen, http://vyznev.net/corewar/guide.html


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2
Date: 9 Feb 2008 03:25:39
Message: <47ad6383$1@news.povray.org>
Nekar Xenos wrote:
> I've been thinking about how trees are distributed and I've noticed that in 
> RL  the dense growth tend to be in the valleys and "dents" and of course 
> along streams and rivers. I think this has to do with how water flows when 
> it rains and tends to accumulate in puddles obviousley carrying any loose 
> seeds with it. Maybe an easy way to simulate this is by giving lower 
> altitudes a higher denstiy and higher probabilty of clumps.

If you wanted to really do it right, you could find the height of your 
target location, then sample the area immediately around it. If the 
location is lower than its immediate surrounds (i.e., it's in a valley, 
as opposed to being in the middle of a lowland plain), you would 
increase the likelihood of planting a tree. :-)

That said, I'm really only intending to use this macro for this month's 
TC-RTC stills round, and next month's animations round. The macro has 
reached a point where I think it's just about good enough for my entries.

If anyone else wants to try adding extra features to the macro, by all 
means go ahead. :-)

... I'm probably going to need to optimize this a bit more if I'm going 
to use it for animation. Right now, I have a scene that takes forty 
seconds just to parse. :-/

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

If we were told to parse starting *after* the supplied String, then do 
what we need to do to indicate pilot error.
     -- Laird Nelson, blogging on Java programming


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2
Date: 9 Feb 2008 03:36:39
Message: <47ad6617$1@news.povray.org>
William Tracy wrote:
> If you wanted to really do it right ...

Come to think of it, you could implement what I described as some 
external utility that manipulates a height map, and outputs another 
height map that is read as a density function by the tree macro, in the 
same vein as Nicolas' suggestion.

Actually, the height map transformation would probably be just a simple 
convolve operation that could be hacked together in some image editor.

Hmm ... So many ideas, so little time. :-)

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

"You cannot predict the future."
"I knew you were going to say that."


Post a reply to this message

From: Thomas de Groot
Subject: Re: Forest macro 2
Date: 9 Feb 2008 05:28:28
Message: <47ad804c$1@news.povray.org>
Excellent work, William! Looking forward to your macro.

Thomas


Post a reply to this message

From: St 
Subject: Re: Forest macro 2
Date: 9 Feb 2008 19:00:51
Message: <47ae3eb3$1@news.povray.org>
"William Tracy" <wtr### [at] calpolyedu> wrote in message 
news:47ad6383$1@news.povray.org...

> That said, I'm really only intending to use this macro for this month's 
> TC-RTC stills round, and next month's animations round. The macro has 
> reached a point where I think it's just about good enough for my entries.

     Cool, and thanks. :)

    For what it's worth, I'm about 4 days into my stills image now, so I 
should be submitting soon.  ;)

      ~Steve~




> William Tracy
> afi### [at] gmailcom -- wtr### [at] calpolyedu
>
> If we were told to parse starting *after* the supplied String, then do 
> what we need to do to indicate pilot error.
>     -- Laird Nelson, blogging on Java programming


Post a reply to this message

From: Sven Littkowski
Subject: Re: Forest macro 2
Date: 11 Feb 2008 13:22:34
Message: <47b0926a$2@news.povray.org>
Wow!

I love this one, too! Even more!

It looks very, very good!

Sven (with a wicked greedy light in the eyes)



"William Tracy" <wtr### [at] calpolyedu> schrieb im Newsbeitrag 
news:47ad2f6b@news.povray.org...
> ... I don't care whether there's enough trees to call it a forest, I'm
> still calling it a forest macro ...
>
> I think the macro is almost finished--I'll post the source sometime next
> week.
>
> Actually, I now have an include file with two macros: One that plants a
> single clump of trees centered at a specified location, and one that
> populates an entire landscape by planting many clumps at random
> locations. I can mix and match the two depending on how much control I
> need over the scene.
>
> Also, the landscape planting macro takes two shape arrays now: An array
> of tree shapes, and an array of bush shapes. The bush clumps are
> centered around the tree clumps, but spread out more.
>
> While I'm posting, is anyone besides Sven interested in my landscape
> mesh generator program? I didn't originally intend to distribute the
> program, since Terragen and Geomorph are both already free and much more
> full-featured. However, if people are interested (one person does not
> count as "people") I'll try to clean up the program and put it online.
>
> -- 
> William Tracy
> afi### [at] gmailcom -- wtr### [at] calpolyedu
>
> Who could pollute the entire world?
>     -- Nausicaa
>


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2
Date: 11 Feb 2008 16:59:50
Message: <47b0c556$1@news.povray.org>
The final render is up on the TC-RTC
http://tc-rtc.co.uk/display/index.html
Under the title, "Systema Metropolis: In the Wild."

The code, including the tree macro, is posted to p.b.s-f.

Finally: Surprise!

How many of you saw *that* final scene coming? :-D

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

One time I put my car into reverse while traveling 70 mph on the 
freeway. It was a very exciting learning experience.
     -- seen on Slashdot


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 12:14:39
Message: <47b3257f@news.povray.org>
I'm playing with this scene and huge resolutions :)

Of course, to render at super-high resolutions, tiled rendering is 
needed (to distribute between computers/cores). But I can't split the 
scene into tiles using the "normal method" (setting +w and +h to the 
full res, and using +sc +ec +sr +er). I tried it with very high 
resolutions (32768 x something) and POV-Ray crashed, or gave out of 
memory error, apparently because it attempts to allocate memory for the 
whole image. However, I successfully managed huge tiled renders with 
zoomin.inc, where I can set +w and +h to the size of a single tile.

#include "zoomin.inc"

#macro Str(N) str(N,0,-1) #end
#declare Rows=4;
#declare Cols=4;
#macro ZoominParams(X,Y)
   concat(
     " +sr",Str(Y/Rows),
     " +er",Str((Y+1)/Rows),
     " +sc",Str(X/Cols),
     " +ec",Str((X+1)/Cols)
   )
#end
#declare Tile = frame_number;
#local X = mod(Tile, Cols);
#local Y = div(Tile, Cols);

Set_Zoom_Area(camera_location, camera_look_at, ZoominParams(X,Y))
Update_Camera_Zoom()

I rendered a 2048x1536 image, using 16 tiles, just for the sake of 
testing. I can't really tell how much time it took, since I kept 
changing some things while the tiles were being rendered, and then 
re-rendered the ones that were left with old parameters.

Area lights and radiosity are disabled. I tested radiosity, and 
confirmed it gets noticeable artifacts between one tile and the other. 
All trees were loaded from linden-lowres5.inc, including bushes, to 
decrease parse time to around 15 seconds.

I just noticed the PNG image is 5.3MB, even after optipng'ing it! JPEG 
got it to 800KB while keeping more than acceptable quality. EDIT: and I 
had to lower quality a bit more; I forgot how much overhead base64 
causes, and the server gave a size limit error. Down to 700KB, retrying.


Post a reply to this message


Attachments:
Download 'inthewild_big.jpg' (680 KB)

Preview of image 'inthewild_big.jpg'
inthewild_big.jpg


 

From: Alain
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 12:44:06
Message: <47b32c66$1@news.povray.org>
Nicolas Alvarez nous apporta ses lumieres en ce 2008/02/13 12:11:
> I'm playing with this scene and huge resolutions :)
> 
> Of course, to render at super-high resolutions, tiled rendering is 
> needed (to distribute between computers/cores). But I can't split the 
> scene into tiles using the "normal method" (setting +w and +h to the 
> full res, and using +sc +ec +sr +er). I tried it with very high 
> resolutions (32768 x something) and POV-Ray crashed, or gave out of 
> memory error, apparently because it attempts to allocate memory for the 
> whole image. However, I successfully managed huge tiled renders with 
> zoomin.inc, where I can set +w and +h to the size of a single tile.
> 
When rendering at very large dimentions, add "+d" to suppress the prevew window. 
This will save memory.

-- 
Alain
-------------------------------------------------
I believe that banking institutions are more dangerous to our liberties than
standing armies. Already they have raised up a monied aristocracy that has
set the government at defiance. The issuing power should be taken from the
banks and restored to the people to whom it properly belongs.
Thomas Jefferson


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 12:47:53
Message: <47b32d49$1@news.povray.org>
Alain escribió:
> When rendering at very large dimentions, add "+d" to suppress the prevew 
> window. This will save memory.
> 

With display enabled, I got an out of memory error. When using -d, I got 
a crash.

zoomin will do :)


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 15:05:50
Message: <47b34d9e$1@news.povray.org>
Nicolas Alvarez wrote:
> I'm playing with this scene and huge resolutions :)

On the one hand, that is really cool.

On the other hand, all the little mistakes I'd hoped nobody would notice 
are now magnified (several of the machines are levitating slightly ...). 
Eek!

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

In Fig. 3.18 we define two local variables, four and twenty (no jokes 
about blackbirds, please).
     -- Jeffrey D. Ullman, _Elements of ML Programming_


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 15:19:18
Message: <47b350c6@news.povray.org>
William Tracy escribió:
> On the other hand, all the little mistakes I'd hoped nobody would notice 
> are now magnified (several of the machines are levitating slightly ...). 
> Eek!
> 

Hey, most people would have faked the trees at the resolution you 
originally used... (fake meaning they wouldn't be meshes with individual 
leaves!)

Anyway, take it as an opportunity to do those little fixes :) It could 
be even more res next time:

http://stuff.povaddict.com.ar.nyud.net/inthewild_tile52-100.png

tile <5,2> (on a 10x10 grid), all trees linden-lowres5, area lights on, 
radiosity off


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 17:25:43
Message: <47b36e67$1@news.povray.org>
Nicolas Alvarez wrote:
> Hey, most people would have faked the trees at the resolution you 
> originally used... (fake meaning they wouldn't be meshes with individual 
> leaves!)

I was running out of modeling time, and had the choice of trying to fake 
the trees with a texture on the ground, or using (mostly) pre-modeled 
trees from Povtree. normal{bumps} wasn't cutting it at this resolution, 
so I used Povtree trees.

> Anyway, take it as an opportunity to do those little fixes :) It could 
> be even more res next time:

What are the specs on the machine you're running this on? You've 
inspired me to try a 2048x1536 RSOCP render; I'm finding that I have 
more than enough memory to do it in one shot, but it is taxing my processor.

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

And the Format source code tells me that *really* the indicator of an 
error is whether the index has changed value or not. If it has *not* 
changed value, then some of the Format class' innards assume that since 
parsing didn't happen, an error must have occurred. (Pause for 
Buddhist-like contemplation of this leap of logic and faith.)
     -- Laird Nelson, blogging on the "dank recesses" of java.text


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 13 Feb 2008 17:38:58
Message: <47b37182$1@news.povray.org>
William Tracy escribió:
> What are the specs on the machine you're running this on? You've 
> inspired me to try a 2048x1536 RSOCP render; I'm finding that I have 
> more than enough memory to do it in one shot, but it is taxing my 
> processor.
> 

AMD Athlon 64 X2 Dual Core 4200+, 2.20GHz
2GB RAM
Running Windows XP SP2 32-bit, so 32-bit POV-Ray as well

I did the 2048x1536 render with 16 tiles, manually making sure both 
cores were always busy with one tile or the other :)


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 14 Feb 2008 00:07:55
Message: <47b3ccab$1@news.povray.org>
William Tracy escribió:
> On the other hand, all the little mistakes I'd hoped nobody would notice 
> are now magnified (several of the machines are levitating slightly ...). 
> Eek!
> 

I'm now seeing trees that are mostly below the landscape surface.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 14 Feb 2008 00:43:05
Message: <47b3d4e9@news.povray.org>
Nicolas Alvarez escribió:
> http://stuff.povaddict.com.ar.nyud.net/inthewild_tile52-100.png
> 
> tile <5,2> (on a 10x10 grid), all trees linden-lowres5, area lights on, 
> radiosity off

http://stuff.povaddict.com.ar.nyud.net/inthewild_tile82-100.png

The rust texture looks pretty good even at that res...


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2 [800KB]
Date: 14 Feb 2008 19:30:00
Message: <47b4dd08$1@news.povray.org>
Nicolas Alvarez wrote:
> I'm now seeing trees that are mostly below the landscape surface.

Are they near the base of the machine at the far left or the one in the 
foreground? If so, I already know. Otherwise, you found a new bug in my 
tree macro. :-P

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

I saw a poster that read:
"Simpsons: The Movie: Rent it or own it."
I'm not sure, but I think it's a threat.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 14 Feb 2008 20:46:13
Message: <47b4eee5$1@news.povray.org>
William Tracy escribió:
> Nicolas Alvarez wrote:
>> I'm now seeing trees that are mostly below the landscape surface.
> 
> Are they near the base of the machine at the far left or the one in the 
> foreground? If so, I already know. Otherwise, you found a new bug in my 
> tree macro. :-P
> 

Well, I changed the random seeds, so I'm probably not seeing the same 
landscape as you.


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2 [800KB]
Date: 14 Feb 2008 20:57:38
Message: <47b4f192$1@news.povray.org>
Nicolas Alvarez wrote:
> Well, I changed the random seeds, so I'm probably not seeing the same 
> landscape as you.

The random seeds shouldn't affect that.

I was having trouble posing those particular machines, so I added some 
blob shapes to make the ground effectively conform to their legs (rather 
than posing the legs to conform to the ground). The tree placement macro 
doesn't take those blobs into account, and any trees landing in those 
places will intersect the blobs.

Do a quick render without any trees or bushes, and you'll clearly see 
the extra objects. I hand-placed some bush clumps to hide the line where 
they intersect the landscape mesh. ;-)

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

Who could pollute the entire world?
     -- Nausicaa


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 14 Feb 2008 22:35:53
Message: <47b50899@news.povray.org>
Nicolas Alvarez escribió:
> I'm playing with this scene and huge resolutions :)

I'm now the proud owner of a 35MB PNG file. Did I go too far?

(5120x3840, 5 hours of CPU time, although real time is half that thanks 
to dualcore)


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2 [800KB]
Date: 15 Feb 2008 00:00:47
Message: <47b51c7f$1@news.povray.org>
Nicolas Alvarez wrote:
> I'm now the proud owner of a 35MB PNG file. Did I go too far?
> 
> (5120x3840, 5 hours of CPU time, although real time is half that thanks 
> to dualcore)

Well, Zazzle posters go up to 5200x7800 resolution. ;-)

There are enough people involved in this image that I would need to dig 
into licensing details before going ahead with a print.

Still, that would be cool.

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

    When you expect to live another two hundred years, you behave 
differently from when you expect to live only twenty.
     -- Kim Stanley Robinson, _Red Mars_


Post a reply to this message

From: William Tracy
Subject: Re: Forest macro 2 [800KB]
Date: 15 Feb 2008 16:32:02
Message: <47b604d2@news.povray.org>
Your server seems to be struggling, so I've temporarily mirrored here 
the two tiles that you shared:
http://users.csc.calpoly.edu/~wtracy/povray/inthewild_tile52-100.png
http://users.csc.calpoly.edu/~wtracy/povray/inthewild_tile82-100.png

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

    The point is not to make another Earth. Not another Alaska or Tibet, 
not a Vermont nor a Venice, not even an Antarctica. The point is to make 
something new and strange, something Martian.
     -- Kim Stanley Robinson, _Green Mars_


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Forest macro 2 [800KB]
Date: 15 Feb 2008 16:51:30
Message: <47b60962$1@news.povray.org>
William Tracy escribió:
> Your server seems to be struggling, so I've temporarily mirrored here 
> the two tiles that you shared:
> http://users.csc.calpoly.edu/~wtracy/povray/inthewild_tile52-100.png
> http://users.csc.calpoly.edu/~wtracy/povray/inthewild_tile82-100.png
> 

My "server" is my home machine with 128kbps upstream, running Apache. I 
used CoralCDN as a caching proxy (by adding nyud.net to the image URLs) 
to make the downloading speed a bit more sane...


Post a reply to this message

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