POV-Ray : Newsgroups : povray.macintosh : Tree Media Server Time
24 Nov 2024 08:57:31 EST (-0500)
  Tree Media (Message 1 to 2 of 2)  
From: Josh Franklin
Subject: Tree Media
Date: 17 Sep 1999 00:03:56
Message: <37E1BD5F.34A257FC@yahoo.com>
While I was finally teaching myself how to actually use media, I found a
neat application for it: fast, easy, trees. This code makes a simple
evergreen tree...the only problem is that the green is not quite solid enough...

#declare tree =
union {
	cone {
		< 0, 0, 0 >, .3,
		< 0, 3, 0 >, .1
		texture {
			pigment { color rgb < 0.7, 0.7, 0.3 > }
		}
	}
	cone {
		< 0, 1.2, 0 >, 1.1,
		< 0, 4.2, 0 >, 0.05
		texture {
			pigment { color rgbf 1.0 }
		}
		interior {
			media {
      			emission < 0.25, .75, 0.2 >*1.5
      			absorption < 0.75, 0, 0.8 >
				intervals 20
				samples 1, 10
				confidence 0.9999
				variance 1/1000
				density {
					cylindrical
					poly_wave pi
					turbulence 0.8
					omega 2
					lambda 0.8
					octaves 0.9
					color_map {
						[ 0.0 color rgbf < 0.0, 0.0, 0.0, 0.5 > ]
						[ 0.02 color rgbf < 0.0, 0.0, 0.0, 1.0 > ]
						[ 0.1 color rgb < 0.09, 0.3, 0.1 > ]
						[ 0.96 color rgb < 0.03, 0.2, 0.0 > ]
						[ 0.99 color rgbf < 0.0, 0.2, 0.0 > ]
						[ 1.0 color rgbf 1.0 ]
					}
					scale < 0.25, .008, 0.25 >
				}
				scale < 5, .8, 5 >
			}
		}
		hollow
	}
}

by changing the last two values of scale, you can modify the density of
the "branches"...with a little imagination I'm sure that trees with
multi-colored leaves or even leaves that change color over time as in an
animation would be easy to do...also this could make for interesting
shrub animals

anyways, any input you could give me would be great ( and yes I know
that the trunk has no texture )

-Josh


Post a reply to this message

From: ryan mooney
Subject: Re: Tree Media
Date: 29 Dec 1999 15:51:48
Message: <386924EF.5990E393@earthlink.net>
give your pigment declaration half the filter or transmit value and step up the
emission
value to desired color ... this gave the tree a odd looking circular shape at the
bottom but
the media wont change color w/ background and gives it more of a solid feel...

happy new year...

Josh Franklin wrote:

> While I was finally teaching myself how to actually use media, I found a
> neat application for it: fast, easy, trees. This code makes a simple
> evergreen tree...the only problem is that the green is not quite solid enough...
>
> #declare tree =
> union {
>         cone {
>                 < 0, 0, 0 >, .3,
>                 < 0, 3, 0 >, .1
>                 texture {
>                         pigment { color rgb < 0.7, 0.7, 0.3 > }
>                 }
>         }
>         cone {
>                 < 0, 1.2, 0 >, 1.1,
>                 < 0, 4.2, 0 >, 0.05
>                 texture {
>                         pigment { color rgbf 1.0 }
>                 }
>                 interior {
>                         media {
>                         emission < 0.25, .75, 0.2 >*1.5
>                         absorption < 0.75, 0, 0.8 >
>                                 intervals 20
>                                 samples 1, 10
>                                 confidence 0.9999
>                                 variance 1/1000
>                                 density {
>                                         cylindrical
>                                         poly_wave pi
>                                         turbulence 0.8
>                                         omega 2
>                                         lambda 0.8
>                                         octaves 0.9
>                                         color_map {
>                                                 [ 0.0 color rgbf < 0.0, 0.0, 0.0,
0.5 > ]
>                                                 [ 0.02 color rgbf < 0.0, 0.0, 0.0,
1.0 > ]
>                                                 [ 0.1 color rgb < 0.09, 0.3, 0.1 > ]
>                                                 [ 0.96 color rgb < 0.03, 0.2, 0.0 >
]
>                                                 [ 0.99 color rgbf < 0.0, 0.2, 0.0 >
]
>                                                 [ 1.0 color rgbf 1.0 ]
>                                         }
>                                         scale < 0.25, .008, 0.25 >
>                                 }
>                                 scale < 5, .8, 5 >
>                         }
>                 }
>                 hollow
>         }
> }
>
> by changing the last two values of scale, you can modify the density of
> the "branches"...with a little imagination I'm sure that trees with
> multi-colored leaves or even leaves that change color over time as in an
> animation would be easy to do...also this could make for interesting
> shrub animals
>
> anyways, any input you could give me would be great ( and yes I know
> that the trunk has no texture )
>
> -Josh


Post a reply to this message

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