POV-Ray : Newsgroups : povray.binaries.images : Towards a procedural tree macro (62kbbu) Server Time
3 Oct 2024 00:29:42 EDT (-0400)
  Towards a procedural tree macro (62kbbu) (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Bill DeWitt
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 25 Mar 2000 23:39:42
Message: <38dd948e$1@news.povray.org>
"Greg M. Johnson" <"gregj;-)56590\""@aol.c;-)om> wrote in message
news:38dd88f2@news.povray.org...
> I've seen some tree makers here which are breathtaking in their visual
> beauty.  I think that the coolest alorgithm for a tree, however, would
> be procedural and not involve lots of translate & rotate statements.
>

    Not too shabby! Looks like an Orange Grove.

    I haven't tried to play with your code yet... looks like fun...


Post a reply to this message

From: mr art
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 25 Mar 2000 23:57:38
Message: <38DD98EB.B5596E93@gci.net>
Could you tell us what the value for gent you used in the posted scene?
All my attempts have given bad results, not at all like yours.
Thanks.

"Greg M. Johnson" wrote:
> 
> I've seen some tree makers here which are breathtaking in their visual
> beauty.  I think that the coolest alorgithm for a tree, however, would
> be procedural and not involve lots of translate & rotate statements.
> 
> Here's my first stab at a procedurally derived tree.  Further
> experimentation underway.  Feel free to take this and improve it.
 

-- 
Mr. Art

"Often the appearance of reality is more important 
than the reality of the appearance."
Bill DeWitt 2000


Post a reply to this message

From: Bill DeWitt
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 26 Mar 2000 11:00:33
Message: <38de3421@news.povray.org>
"Greg M. Johnson" <"gregj;-)56590\""@aol.c;-)om> wrote :
>
> Here's my first stab at a procedurally derived tree.  Further
> experimentation underway.  Feel free to take this and improve it.
>

    Again, not too shabby. But I think that starting from this it will be
hard to improve it much. I would rather see something that is more like the
lparser system that can start from a basic trunk and then divides into
branches and twigs. Then you could use trace or something to put leaves on
it...

    I am really interested in this and am pounding away at it. But I have
little hope of accomplishing it. I can't get a division, not even a simple
Y... once I get that the rest should just be tedium.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 26 Mar 2000 12:32:39
Message: <38de49b7@news.povray.org>
ZERO.
I initially thought I could get it to given randomized appearance of each
tree, but then realized that I was too lazy to code it that way. Lemme know
if zero gives you trouble.......

"mr.art" wrote:

> Could you tell us what the value for gent you used in the posted scene?
> All my attempts have given bad results, not at all like yours.
> Thanks.
>


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 26 Mar 2000 12:47:10
Message: <38de4d1e@news.povray.org>
I chose the noise3d function because it has its own 'branchability' built into
it.
See the following image, with a slightly higher threshold, and a cross section
through the branches.



Bill DeWitt wrote:

> "Greg M. Johnson" <"gregj;-)56590\""@aol.c;-)om> wrote :
> >
> > Here's my first stab at a procedurally derived tree.  Further
> > experimentation underway.  Feel free to take this and improve it.
> >
>
>     Again, not too shabby. But I think that starting from this it will be
> hard to improve it much. I would rather see something that is more like the
> lparser system that can start from a basic trunk and then divides into
> branches and twigs. Then you could use trace or something to put leaves on
> it...
>
>     I am really interested in this and am pounding away at it. But I have
> little hope of accomplishing it. I can't get a division, not even a simple
> Y... once I get that the rest should just be tedium.


Post a reply to this message


Attachments:
Download 'noiseforest02.jpg' (43 KB)

Preview of image 'noiseforest02.jpg'
noiseforest02.jpg


 

From: SamuelT 
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 26 Mar 2000 16:36:13
Message: <38DE858D.B0B3FCF5@aol.com>
I'm thinking a marriage between standard pov objects for branches, and
isosurfaces for leaves might be the best we can do to make good, and hopefully
fast-rendering trees. I might have to try it. :)

"Greg M. Johnson" wrote:

> I've seen some tree makers here which are breathtaking in their visual
> beauty.  I think that the coolest alorgithm for a tree, however, would
> be procedural and not involve lots of translate & rotate statements.
>
> Here's my first stab at a procedurally derived tree.  Further
> experimentation underway.  Feel free to take this and improve it.
>
> #declare rag=function{ 1/(x^2+y^2+z^2)^0.5*5}   // 35;
> #macro Treegent(gent,tx,ty,tz)
> //gent is currently useless randomizer,  translate to tx, ty, tz
> union{
>  isosurface{
>          function{
> noise3d((x+gent)/rag,(y+gent)/rag,(z+gent)/rag)&(-y-1) }
>                 accuracy .001
>                 threshold  .01
>          contained_by {sphere{0,15} }
>          bounded_by   {sphere{0,2 } }
>                 }
>  isosurface{
>          function{  noise3d((x+gent)/rag,(y+gent)/20/rag,(z+gent)/rag)}
>                 accuracy .001
>                 threshold  .08
>          contained_by { sphere{0,5} }
>          bounded_by   { sphere{0,1} }
>                    }
>  pigment{
>          spherical
>   pigment_map{
>                  [0      Green]
>                         [.2     Brown]
>                         [1     Brown]
>                           }
>                 scale 12
>                 }
>         finish{ambient 0.1}
>         translate <tx,ty,tz>
>         }
>   #end
>
>   ------------------------------------------------------------------------
>  [Image]

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial: http://members.aol.com/stbenge


Post a reply to this message

From: Lummox JR
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 26 Mar 2000 19:31:41
Message: <38DEAD4C.78E3@aol.com>
These trees would look just great in a background, I think; not as good
in the foreground, though.
Two small suggestions:

1) Turbulate the x, y, and z values just slightly based on their
distance from the center. This will give the trees a less hemispherical
look.
2) Change all n^2 to sqr(n) and n^0.5 to sqrt(n). As far as I can tell
from the function code, these should always be faster than using an
exponent.

I think I might give this a try in an old scene (where I wanted
background trees but settled for a textured height field) and see what
happens.

Lummox JR


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 26 Mar 2000 20:49:32
Message: <38debe2c@news.povray.org>
Howdoya  turbulate?

Lummox JR wrote:

> These trees would look just great in a background, I think; not as good
> in the foreground, though.
> Two small suggestions:
>
> 1) Turbulate the x, y, and z values just slightly based on their
> distance from the center. This will give the trees a less hemispherical
> look.
> 2) Change all n^2 to sqr(n) and n^0.5 to sqrt(n). As far as I can tell
> from the function code, these should always be faster than using an
> exponent.
>
> I think I might give this a try in an old scene (where I wanted
> background trees but settled for a textured height field) and see what
> happens.
>
> Lummox JR


Post a reply to this message

From: Steve
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 27 Mar 2000 11:54:16
Message: <slrn8dv2kc.dc4.sjlen@zero-pps.localdomain>
I like the look of this.  I don't know anything about isosurfaces,
but I'll have a play with the code. 
-- 
Cheers
Steve              email mailto:sjl### [at] ndirectcouk

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.ndirect.co.uk/~sjlen/

or  http://start.at/zero-pps

  2:19pm  up 8 days,  9:54,  5 users,  load average: 1.95, 1.95, 1.88


Post a reply to this message

From: Chris Huff
Subject: Re: Towards a procedural tree macro (62kbbu)
Date: 27 Mar 2000 19:09:00
Message: <chrishuff_99-553FDE.19111427032000@news.povray.org>
In article <38debe2c@news.povray.org>, "Greg M. Johnson" 
<"gregj;-)56590\""@aol.c;-)om> wrote:

> Howdoya  turbulate?

You could turbulate an isosurface object by using it's function in a 
pigment function, and using the pigment function for the actual 
isosurface.

#declare TreeFn =
function {
    pigment {function {...}// use the tree function as pigment pattern
        color_map {[0 rgb 0][1 rgb 1]}
        warp {
            turbulence 0.35
        }
    }
}

isosurface {
    function {TreeFn(x,y,z)}
    ...

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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