POV-Ray : Newsgroups : povray.binaries.images : Early morning w/ tree Server Time
14 Nov 2024 22:23:13 EST (-0500)
  Early morning w/ tree (Message 1 to 10 of 10)  
From: Mike Hough
Subject: Early morning w/ tree
Date: 8 Dec 2008 22:36:50
Message: <493de7d2@news.povray.org>
Always wanted to try making a tree and using double_illiminate on the 
leaves. This is one of Gilles Tran's trees with the sun behind it and some 
scattering media to create a nice atmospheric effect.


Post a reply to this message


Attachments:
Download 'lonely_tree.jpg' (296 KB)

Preview of image 'lonely_tree.jpg'
lonely_tree.jpg


 

From: nemesis
Subject: Re: Early morning w/ tree
Date: 9 Dec 2008 00:52:27
Message: <493e079b$1@news.povray.org>
Wonderful.  How about some render times?


Post a reply to this message

From: Alfonso Vicente Zurdo
Subject: Re: Early morning w/ tree
Date: 9 Dec 2008 04:25:00
Message: <web.493e3938c8b65ac518e008aa0@news.povray.org>
"Mike Hough" <nos### [at] nospamcom> wrote:
> Always wanted to try making a tree and using double_illiminate on the
> leaves. This is one of Gilles Tran's trees with the sun behind it and some
> scattering media to create a nice atmospheric effect.

What settings for media did you use?

I'm traying to obtain a similar effect, but I still haven't found what i'm
looking for.

Yes, I like U2 :)


Post a reply to this message

From: Mike Hough
Subject: Re: Early morning w/ tree
Date: 9 Dec 2008 16:39:52
Message: <493ee5a8@news.povray.org>
I wasn't happy with the render time. Didn't write it down but it was 
somewhere between 12 and 20 hours. I started the render at night, checked in 
the morning it was about halfway through and was done by the time I got home 
from work.

"nemesis" <nam### [at] nospamgmailcom> wrote in message 
news:493e079b$1@news.povray.org...
> Wonderful.  How about some render times?


Post a reply to this message

From: Mike Hough
Subject: Re: Early morning w/ tree
Date: 9 Dec 2008 16:47:55
Message: <493ee78b$1@news.povray.org>
This is what I used to produce the light effect. In addition to this there 
is a large sphere surrounding the scene with a pigment to emulate the colors 
of the sky.

plane {y, 150
pigment {color rgbt <1, 1, 1, 1>}
finish {ambient 0}
no_shadow
hollow

interior {
media {
scattering { 4, rgb 0.0007 extinction 1}
  intervals 5
  //intervals 1
  samples 30
  //samples 15
  method 3
  }
  }

  }

The intervals and samples that are commented out are what I used to get the 
colors the way I wanted but the higher values are needed to get smooth rays 
of light.

"Alfonso Vicente Zurdo" <kba### [at] gmailcom> wrote in message 
news:web.493e3938c8b65ac518e008aa0@news.povray.org...
> "Mike Hough" <nos### [at] nospamcom> wrote:
>> Always wanted to try making a tree and using double_illiminate on the
>> leaves. This is one of Gilles Tran's trees with the sun behind it and 
>> some
>> scattering media to create a nice atmospheric effect.
>
> What settings for media did you use?
>
> I'm traying to obtain a similar effect, but I still haven't found what i'm
> looking for.
>
> Yes, I like U2 :)
>
>

Oh heck, here is the whole thing. You just need to get Gilles' MakeTree 
macro and provide a substitution for the "variable_width_example2.png" file. 
The code is very messy, as there was lots of tinkering involved.

//=========================================
// Leaf & Tree examples for the MakeTree macro
//==========================================
// Copyright 1999-2004 Gilles Tran http://www.oyonale.com
// -----------------------------------------
// This work is licensed under the Creative Commons Attribution License.
// To view a copy of this license, visit 
http://creativecommons.org/licenses/by/2.0/
// or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, 
California 94305, USA.
// You are free:
// - to copy, distribute, display, and perform the work
// - to make derivative works
// - to make commercial use of the work
// Under the following conditions:
// - Attribution. You must give the original author credit.
// - For any reuse or distribution, you must make clear to others the 
license terms of this work.
// - Any of these conditions can be waived if you get permission from the 
copyright holder.
// Your fair use and other rights are in no way affected by the above.
//==========================================
// Still another classic tree example
//-----------------------------------------
// This file calls the MakeTree and MakeLeaf macros
// and defines the textures and parameters
// Set the [dofile] parameter to "true"
// when you want to create the final file
//-----------------------------------------
#include "colors.inc"
#include "txttree.inc"
#include "maketree.pov" // tree & leaf macro
//=========================================
// Camera & light
//-----------------------------------------
#declare PdV=<0, 4 , -120>;
#declare PdA=<0,25,0>;
camera {location  PdV direction <0.0 , 0.0 , 1.3 > up y  right 4*x/3 look_at 
PdA angle 55}
//-----------------------------------------
//light_source{PdV color White*0.5  shadowless}
//light_source{<130,40,-200> color White*1.8}
union {
light_source {<0, 0, -9000> color 1.8*White}
sphere {<0, 0, -9000>, 200 pigment {color rgb <1,1,.95>}
finish {ambient 10 diffuse 0}
no_shadow
}
rotate <15, 183, 0>
}

/*the sun*/
/*
sphere {<0, 50, 50>, 10 pigment {color rgb <1, 1, .9>}
finish {ambient 1}
no_shadow
}
*/
#declare reduction = .4;

#declare sun =
pigment {wood color_map { // sun sky
 [0.05 color rgb <1,1,.95>*3*reduction] // this index is size of sun
 [0.055 color rgb <1,1,.9>*2.0*reduction] // this one starts the fade out 
edge of sun
 [0.15 color rgb <.8,.9,1>*1.3*reduction]
 //[0.25 color rgb <.6,.7,.9>]
 [1.00 color rgb <.3,.6,.9>*reduction]
}
rotate <19,183,0>
} // places sun (raise or lower x for altitude, y for left/right)

#declare skyness =
pigment {gradient y color_map { // horizon sky
 //[0.05 color rgbf <.8,1,1,.1>*reduction] // this index is size of sun
 //[0.25 color rgbf <.6,.8,.9,.4>*reduction]
 //[1.00 color rgbf <.4,.3,.9,.5>*reduction]
   [0.05 color rgb <.8,1,1>*reduction filter .1] // this index is size of 
sun
   [0.25 color rgb <.6,.8,.9>*reduction filter .6]
   [1.00 color rgbf <.4,.3,.9>*reduction filter .9]
} }

sphere {<0, 0, 0>, 1
texture {
pigment {
average
pigment_map {
[1, sun]
[1, skyness]
}
}

finish {ambient 1 diffuse 0}
}

double_illuminate
no_shadow

hollow
scale 500
}


//=========================================
// Tree macro Parameters
//-----------------------------------------
// These parameters must be declared before calling the tree macro
//-----------------------------------------
#declare dofile=true;    // true creates a tree file ; false otherwise
#declare dotexture=false;  // true creates a textured tree (with the texture 
following the branch); false otherwise
#declare ftname="gttree7.inc" // file name for tree
#declare fvname="gtfoliage7.inc" // file name for foliage
#declare ffname="gtleaf7.inc" // file name for leaf
#declare txtTree=texture{txtTree_3} // Bark texture

//-----------------------------------------
// Random streams
// one stream for branches and another one for leaves
// so that the leafed tree has the same structure as the leafless one
//-----------------------------------------
#declare rsd=1431;      // random seed
#declare rsd=1432;      // random seed
#declare rsd=1433;      // random seed
#declare rd=seed(rsd);  // random stream for branches
#declare rdl=seed(rsd); // separate random stream for leaves

//-----------------------------------------
// Tree structure parameters
// test with low level0 and nseg0 (3 or 4)
// High (>=6) recursion levels [level0] gives more complex trees
// High (>=6) segment numbers [nseg0] gives smoother trees
//-----------------------------------------
#declare level0=6;      // recursion level
//#declare level0=3;      // recursion level
#declare nseg0=10;       // initial number of branch segments (decreases of 
one at each level)
#declare nb=5;          // max number of branches per level
#declare dotop=true;   // if true, generates an extra branch on top of trunk 
(sometimes necessary to give more verticality)

#declare lb0=30;        // initial branch length
#declare rb0=1.5;         // initial branch radius
#declare ab0=40;        // initial branch angle (x angle between the trunk 
and the first branch)
#declare qlb=0.65;       // branch length decrease ratio (1=constant length)
#declare qrb=0.59;       // branch radius decrease ratio (1=constant radius)
#declare qab=0.88;       // branch angle decrease ratio (1=constant angle)
#declare stdax=20;      // stdev of x angle (angle x = ax+(0.5-rand)*stdax)
#declare stday=10;      // stdev of y angle (angle y = ay+(0.5-rand)*stday)

#declare branchproba=0.8; // probability of branch apparition
#declare jb=0.5;        // secondary branches start after this ratio of 
branch length

#declare fgnarl=0.25;    // gnarledness factor - keep it low <0.8
#declare stdlseg=0.5;     // stddev of branch segment length (0...1) (adds 
more randomness to branch length)

#declare twigproba=0.59; // probability to have a twig on a trunk segment

#declare v0=<0,1,0>;    // initial direction - change to give an initial 
orientation
#declare pos0=<0,0,0>;  // initial trunk position (no need to change this 
one)

//-----------------------------------------
// constraints parameters
//-----------------------------------------
#declare vpush=<0,-1,0>;// direction of push (wind, gravity...) <0,-1,0> = 
gravity ; <0,1,0> = antigravity
#declare fpush=0.2;       // force of push
#declare aboveground=0; // constrains the branches above this level
#declare belowsky=140;  // constrains the branches below this level

//-----------------------------------------
// root parameters
//-----------------------------------------
#declare rootproba=0;   // probability of root 0=no root ; 1=all [nb] roots
#declare nroot=5;      // number of roots;
#declare vroot=<1,0,0>; // initial direction of root
#declare yroot=<0,0.5,0>;   // initial position of root above ground

//-----------------------------------------
// leaf position parameters
//-----------------------------------------
#declare leafproba=1;   // probability of leaf 0=no leaf ; 1=leaf on each 
segment
//#declare leafproba=0;   // probability of leaf 0=no leaf ; 1=leaf on each 
segment
#declare leaflevel=3;   // level where the leaves start to appear
#declare alz0=100;       // max z angle for leaf
#declare alx0=-10;      // start x angle for leaf
#declare stdalx=40;     // std x angle for leaf
#declare stdlsize=0.1;     // stddev of leaf size 0=constant size; size = 
leafsize*(1+stdlsize*rand)

//-----------------------------------------
// leaf structure parameters
//----------------------------------------- 
#declare colLeaf_1=rgbf <0.7,1,0.2, .5>*0.8; // greenish
#declare colLeaf_2=rgbf <1,0.7,0.2, .5>*0.8; // yellow
#declare txtLeaf_5=texture{pigment{agate color_map{[0.0 color colLeaf_1][0.3 
color colLeaf_2] [0.7 color colLeaf_2][1.0 color colLeaf_1] }}
        finish{ambient 0 specular 0.3 roughness 0.01} scale 10}
#declare txtLeaf=texture{txtLeaf_5} // Leaf texture
#declare lsize=0.34;     // leaf size
#declare seg=10;        // nb of leaf segments and stalk segments : increase 
to smooth
#declare ll=5;          // leaf length
#declare wl=1.2;          // leaf width
#declare fl=0.5;        // depth of leaf fold
#declare lpow=1;        // modifies the leaf shape : lpow=3 makes 
heart-shaped leaf
#declare al=100;        // leaf bending angle : the leaf bends backward 
until this angle
#declare apow=1;        // curve power, how slow the leaf bends
#declare ndents=0;      // dents in the leaf (8 = "oak" leaf). May require a 
high seg >20
#declare nlobes=3;      // number of lobes (individual leaves)
#declare alobes=110;    // angle made by all the lobes
#declare qlobes=0.7;    // size of the farest lobe (0.9 = size will be 
0.9*leaf length)
#declare ls=3;          // stalk length (0=no stalk)
#declare ws=0.12;        // width of stalk
#declare as=10;         // stalk bending angle : the stalk bends forward
//-----------------------------------------
// end of parameters
//=========================================

//=========================================
// Make the tree now !
//-----------------------------------------
///*
object{
        #if (leafproba>0)
        #declare Leaf=object{MakeLeaf(lsize,seg,ll,wl,fl,lpow,al,apow,
                 ndents,nlobes,alobes,qlobes,ls,ws,as,dofile,ffname)
                 #if (dotexture=false)  // no texture applied to tree 
segments, so the leaf texture must be used for the individual leaf
                        texture{txtLeaf}
                 #end
                 double_illuminate
        }

        #end
        MakeTree()

        #if (dotexture = true) // texture is already applied to tree so that 
we can safely apply the leaf texture to the leaves
                texture {txtLeaf}
        #else

                texture {txtTree} // apply tree texture  regardless of the 
tree structure
        #end
}
//*/

include "textures.inc"

#declare mudtex =
texture {
average
texture_map {
[1, Brown_Agate rotate 40]
[.5, pigment {color rgb .7*<1, 1, 1>}
finish {specular .6 roughness 0.01 diffuse .5 brilliance .7}]
}
}

#declare mud =
height_field {
png "variable_width_example2.png"
smooth

//translate <-.5, 0, -.5>
scale <20, .4, 20>
}

#declare strip = union {
object {mud}
object {mud translate <-20, 0, 0>}
object {mud translate <-40, 0, 0>}
object {mud translate <-60, 0, 0>}
object {mud translate <-80, 0, 0>}
object {mud translate <20, 0, 0>}
object {mud translate <40, 0, 0>}
object {mud translate <60, 0, 0>}
object {mud translate <80, 0, 0>}
}

union{
object {strip}
object {strip translate <0, 0, -20>}
object {strip translate <0, 0, -40>}
object {strip translate <0, 0, -60>}
object {strip translate <0, 0, 20>}
object {strip translate <0, 0, 40>}
object {strip translate <0, 0, 60>}
object {strip translate <0, 0, 80>}
object {strip translate <0, 0, 100>}
scale <2, 1, 2>
texture {mudtex scale 20}
}


plane{y,0

texture {mudtex}
}

//*
//sphere {<0, 0, 0>, 1
plane {y, 150
pigment {color rgbt <1, 1, 1, 1>}
finish {ambient 0}
no_shadow
hollow
//scale <500, 500, 20>

interior {
media {
scattering { 4, rgb 0.0007 extinction 1}
  intervals 5
  //intervals 1
  samples 30
  //samples 15
  method 3
  }
  }

  }
//*/
//background{color rgb <0.8,0.9,1>}

//tests for tree texture, leaf and leaf textures
//cylinder{0,y*4,1 texture{txtTree} scale 10}
//#declare 
Leaf=object{MakeLeaf(lsize,seg,ll,wl,fl,lpow,al,apow,ndents,nlobes,alobes,qlobes,ls,ws,as,dofile,ffname)

texture{txtLeaf}}
//object{Leaf scale 15 rotate y*1 translate y*30 texture{txtLeaf} }
//box{<-20.8239,-3.15052,-15.6178>,<16.2539,48.6219,22.4758> pigment{Green}}


Post a reply to this message

From: William Tracy
Subject: Re: Early morning w/ tree
Date: 10 Dec 2008 00:05:22
Message: <493f4e12$1@news.povray.org>
Interesting. I have a very similar scene that I can render in just an 
hour or two (on one core of my laptop's Centrino) that uses the 
following media:

box {
         <-20, -07, -7.9>, <20, 20, 5>
         pigment {color rgbt 01.}
         hollow
         interior {
                 media {
                         scattering {
                                 1, 0.1
                                 extinction 0.5
                         }
                         samples 300, 10000
                 }
         }
}

No extinction (too fiddly for me, honestly) and no intervals--I need to 
re-red the docs on what intervals does.

I had some short trees that cast lots of light rays down below the 
horizon line, and I couldn't make those light rays look quite right to 
me without cranking the samples way up.

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

I disapprove of what you say, but I will defend to the death your right 
to say it.
     -- Evelyn Beatrice Hall, frequently mis-attributed to Voltaire


Post a reply to this message

From: Thomas de Groot
Subject: Re: Early morning w/ tree
Date: 10 Dec 2008 04:12:49
Message: <493f8811@news.povray.org>
"William Tracy" <wtr### [at] calpolyedu> schreef in bericht 
news:493f4e12$1@news.povray.org...
>
> No extinction (too fiddly for me, honestly) and no intervals--I need to 
> re-red the docs on what intervals does.
>

Be aware that intervals is 1 by default (contrary to what the docs say!). My 
understanding is that you can best leave that alone and crank up the samples 
instead. Rendering will be faster and quality not worse.

Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Early morning w/ tree
Date: 10 Dec 2008 16:55:00
Message: <web.49403952c8b65ac578dcad930@news.povray.org>
William Tracy <wtr### [at] calpolyedu> wrote:

> No extinction (too fiddly for me, honestly) and no intervals--I need to
> re-red the docs on what intervals does.
>

I kind of gave up on trying to understand what intervals does. :-|
Be aware that the docs (those that come with the program, anyway) have wrong
default media values. The correct defaults are:

method 3
intervals 1
samples 10

It seems that a fair number of users try fiddling with the intervals value; but
IMO, it's just easier (and more understandable) to leave intervals at 1 and
crank up the samples until things looks good. I think that's a recommendation
in the docs anyway (when using method 3.) Others have noted that it's faster,
too, although I haven't experimented to find out.

KW


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: Early morning w/ tree
Date: 10 Dec 2008 17:17:07
Message: <49403fe3$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kenneth wrote:
> William Tracy <wtr### [at] calpolyedu> wrote:
> 
>> No extinction (too fiddly for me, honestly) and no intervals--I need to
>> re-red the docs on what intervals does.
>>
> 
> I kind of gave up on trying to understand what intervals does. :-|
> Be aware that the docs (those that come with the program, anyway) have wrong
> default media values. The correct defaults are:
> 
> method 3
> intervals 1
> samples 10
> 
> It seems that a fair number of users try fiddling with the intervals value; but
> IMO, it's just easier (and more understandable) to leave intervals at 1 and
> crank up the samples until things looks good. I think that's a recommendation
> in the docs anyway (when using method 3.) Others have noted that it's faster,
> too, although I haven't experimented to find out.
> 
	Note also that the "intervals" setting is actually the *minimum*
that povray will use. Povray will increase this number automatically
as needed. (With method 3). So there is no problem leaving it at the
default setting.

	Multiple intervals make a difference when there are spotlights in
the scene: they ensure that more samples get taken in the spotlight
beams than outside the beams.

		Jerome
- --
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklAQGAACgkQd0kWM4JG3k9OIACfUH+DA382q8fvaQSBwB9u/el7
XkIAn0RRq5no3MJ8Hxq4lw1IeF2czgne
=txde
-----END PGP SIGNATURE-----


Post a reply to this message

From: Mike Hough
Subject: Re: Early morning w/ tree
Date: 10 Dec 2008 17:37:04
Message: <49404490$1@news.povray.org>
As has already been pointed out, in my scene there really was no reason to 
change intervals to 4 from 1. That was my lazy way of increasing the sample 
size based on my understanding of how type 2 media works. My understanding 
of type 3 is not so good though.

Intervals are sections of the ray along which samples are taken from the 
camera (or is it the light? I forget) to the first object hit. Then samples 
are taken within each interval up to the samples value. When I made type 2 
media I just altered the existing code so that those samples were created at 
even intervals within each interval rather than at random, which helped 
smooth out some things. In essence it restored the way some of the old halo 
and atmosphere worked in 3.0 and found it made some scenes look much better.

The total number of samples taken is min samples*intervals in type 2. 
Looking at the docs I can see that more than one interval is not recommended 
for type 3 media and max samples is ignored because it uses an antialiasing 
method.

"Kenneth" <kdw### [at] earthlinknet> wrote in message 
news:web.49403952c8b65ac578dcad930@news.povray.org...
> William Tracy <wtr### [at] calpolyedu> wrote:
>
>> No extinction (too fiddly for me, honestly) and no intervals--I need to
>> re-red the docs on what intervals does.
>>
>
> I kind of gave up on trying to understand what intervals does. :-|
> Be aware that the docs (those that come with the program, anyway) have 
> wrong
> default media values. The correct defaults are:
>
> method 3
> intervals 1
> samples 10
>
> It seems that a fair number of users try fiddling with the intervals 
> value; but
> IMO, it's just easier (and more understandable) to leave intervals at 1 
> and
> crank up the samples until things looks good. I think that's a 
> recommendation
> in the docs anyway (when using method 3.) Others have noted that it's 
> faster,
> too, although I haven't experimented to find out.
>
> KW
>
>


Post a reply to this message

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