POV-Ray : Newsgroups : povray.binaries.images : Playing with Photons Server Time
1 Aug 2024 18:21:11 EDT (-0400)
  Playing with Photons (Message 1 to 10 of 32)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Kirk Andrews
Subject: Playing with Photons
Date: 16 Mar 2008 15:10:00
Message: <web.47dd7cf19ebc6382a5d4a01d0@news.povray.org>
I began playing with this scene, with no particular final result in mind, so it
has developed on its own.  But in the end, I decided I'd like to have the
caustics of light reflected from the water playing on the bottom surfaces of
the canyon, so I added photons.  I've never really played with photons, so I'm
hoping someone more experienced with them might assist me--I'm not getting
quite what I hoped for.

I used standard photon settings.

You'll notice strange artifacts along the walls of bright specks--they do not
appear until both photons and radiosity are turned on.


Post a reply to this message


Attachments:
Download 'photoncanyon03.jpg' (273 KB)

Preview of image 'photoncanyon03.jpg'
photoncanyon03.jpg


 

From: Stefan Viljoen
Subject: Re: Playing with Photons
Date: 17 Mar 2008 11:43:16
Message: <47de9fa4@news.povray.org>
Kirk Andrews wrote:

> I began playing with this scene, with no particular final result in mind,
> so it
> has developed on its own.  But in the end, I decided I'd like to have the
> caustics of light reflected from the water playing on the bottom surfaces
> of
> the canyon, so I added photons.  I've never really played with photons, so
> I'm hoping someone more experienced with them might assist me--I'm not
> getting quite what I hoped for.
> 
> I used standard photon settings.
> 
> You'll notice strange artifacts along the walls of bright specks--they do
> not appear until both photons and radiosity are turned on.

Well, this image already looks pretty nice...

-- 
Stefan


Post a reply to this message

From: Alain
Subject: Re: Playing with Photons
Date: 17 Mar 2008 17:50:29
Message: <47def5b5$1@news.povray.org>
Kirk Andrews nous apporta ses lumieres en ce 2008/03/16 16:05:
> I began playing with this scene, with no particular final result in mind, so it
> has developed on its own.  But in the end, I decided I'd like to have the
> caustics of light reflected from the water playing on the bottom surfaces of
> the canyon, so I added photons.  I've never really played with photons, so I'm
> hoping someone more experienced with them might assist me--I'm not getting
> quite what I hoped for.
> 
> I used standard photon settings.
> 
> You'll notice strange artifacts along the walls of bright specks--they do not
> appear until both photons and radiosity are turned on.
> 
> 
> ------------------------------------------------------------------------
> 
Very nice.

Is the source code available? May need some experimentations to see if it sould, 
or not, look like this.

-- 
Alain
-------------------------------------------------
How come we choose from just two people to run for President and over fifty for 
Miss America?


Post a reply to this message

From: Kenneth
Subject: Re: Playing with Photons
Date: 18 Mar 2008 17:55:00
Message: <web.47e047a2f97379d78dcad930@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
>
> You'll notice strange artifacts along the walls of bright specks--they do not
> appear until both photons and radiosity are turned on.

Which one seems to be the culprit? I.e., do they appear when using ONLY rad or
ONLY photons? Or only when both are on?

Ken W.


Post a reply to this message

From: Alain
Subject: Re: Playing with Photons
Date: 18 Mar 2008 21:15:30
Message: <47e07742@news.povray.org>
Kenneth nous apporta ses lumieres en ce 2008/03/18 18:52:
> "Kirk Andrews" <kir### [at] tektonartcom> wrote:
>> You'll notice strange artifacts along the walls of bright specks--they do not
>> appear until both photons and radiosity are turned on.
> 
> Which one seems to be the culprit? I.e., do they appear when using ONLY rad or
> ONLY photons? Or only when both are on?
> 
> Ken W.
> 
> 
> 
He clearly say the the effect *ONLY* apears when using *BOTH* radiosity AND photons.
NO effect using only radiosity.
NO effect using only photons.

-- 
Alain
-------------------------------------------------
But I thought YOU did the backups...


Post a reply to this message

From: Kenneth
Subject: Re: Playing with Photons
Date: 19 Mar 2008 16:05:00
Message: <web.47e17ed6f97379d78dcad930@news.povray.org>
Alain <ele### [at] netscapenet> wrote:

> He clearly say the the effect *ONLY* apears when using *BOTH* radiosity AND photons.
> NO effect using only radiosity.
> NO effect using only photons.
>

Hmm. You're right!

As Alain says, the source code would be useful, to help track down the problem.
The bright areas *look* like radiosity artifacts, which sometimes occur along
sharp edges--which is where they seem to be showing up-- depending on the rad
settings.  Hard to tell, though, from just the image.

Ken W.


Post a reply to this message

From: Kirk Andrews
Subject: Re: Playing with Photons
Date: 19 Mar 2008 16:30:00
Message: <web.47e18563f97379da5d4a01d0@news.povray.org>
Well, the file is not too long, I'll just post it here:

#version 3.6;

#include "colors.inc"

#declare IsoOk = on;
#declare MediaOk = on;
#declare RadiosityOk = on;
#declare Photons = on;

global_settings {
  assumed_gamma 1.0
  #if (RadiosityOk = on)
    radiosity {
      count 50
      error_bound 1
      recursion_limit 1
      brightness .8
      normal on
    }
  #end
  #if (Photons)          // global photon block
    photons {
      spacing 0.03                 // specify the density of photons
    }

  #end
}

//****************************************************************************************************
//***********************************    LIGHTING
************************************************
//****************************************************************************************************

camera {
  location  <0.0, -0.5, -5.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, -2.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [1.0 rgb <0.2,0.3,0.8>]
    }
    warp {repeat y flip y}
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1.5, 1.2, .6>*4  // light's color
  translate <0, 20,  10>*1000

  photons {           // photon block for a light source
    refraction on
    reflection on
  }

}


#if (MediaOk = on)
sphere {0,500
  hollow
  pigment {rgbt 1}
  interior {
    media {    // atmospheric media sample
      intervals 4
      scattering { 1, rgb 0.01 }
      samples 1, 10
      confidence 0.9999
      variance 1/1000
      ratio 0.9
      density {
        planar
        //poly_wave 1/4
        scale 10
        translate -5*y
        turbulence .2
      }
    }
  }
  photons {collect off pass_through}
}
#end


//****************************************************************************************************
//***********************************    TEXTURES
************************************************
//****************************************************************************************************


#default {
  texture { pigment {color rgb 1} finish{ambient 0.0} }
}

#declare GrassColor =
pigment {
  cells
  turbulence 2 lambda 5
  scale .3
  pigment_map {
    [0.0 rgb  <0.1, 0.2, 0.0>]
    [0.3 rgb  <0.2, 0.2, 0.0>]
    [0.9 rgb  <0.2, 0.3, 0.0>]
    [1.0 rgbt <0.1, 0.3, 0.0, 1.0>]
  }
}

#declare GrassPig =
  pigment {
    slope y
    pigment_map {
      [ 0.0 rgbt  1]
      [ 0.4 rgbt  1]
      [ 0.8 GrassColor]
      [ 1.0 GrassColor]
    }
  }

#declare LRockPig =
  pigment{
    wrinkles
    turbulence .5
    scale 5
    scale 2*y
    color_map {
      [0 rgb <.7,.5,.4>]
      [1 rgb <.5,.4,.3>]
    }

  }


#declare MountPig =
  pigment {
    cells
    turbulence <1,.1,1>
    scale .24
    pigment_map{
      [0.0 rgb <.6,.3,.2>]
      [1.0 rgb <.5,.2,.1>]
    }
    scale <100,1,100>*3
  }


#declare MountainTex =
texture {
  pigment {MountPig}
  normal {crackle turbulence .5 scale <.2,.05,.2>*2 }
}


//****************************************************************************************************
//***********************************     SCENE
************************************************
//****************************************************************************************************


#declare Cany =
function {
  pigment {
        gradient x
        turbulence <.5,.0,.5>
        //lambda 0
        color_map {
          [0.0 rgb .59 ]
          [0.29 rgb .59 ]
          [0.3 rgb .51 ]
          [0.4 rgb .1 ]
          [0.5 rgb .05 ]
          [0.6 rgb .1 ]
          [0.7 rgb .55 ]
          [0.71 rgb .59 ]
          [1.0 rgb .59 ]
        }
  }
}

#declare G =
function {
  pigment {
    wrinkles
    //turbulence 1
    scale .25*y
    scale 2
  }
}

#declare GG =
function {
  pigment {
    granite
    //turbulence 1
    scale .5*y
    scale .1
  }
}


#if (IsoOk = off)
height_field {
  function
  1000, 1000 {
    Cany(x,y,z*1).red*.5
  }
  //scale 3*z
  translate <-.5,-1,-.5>
  //rotate 180*y
  scale 4
  pigment {rgbt <1,0,0,.5>}
}

#else

#declare Terrain =
isosurface {
  function { y - Cany(x,y*2,z).red*2 }//- G(x,y,z).red*GG(x,y,z).red*.5}
 // function (can also contain declared functions
  //function { fn_X(x, y, z) }        // alternative declared function
  contained_by { box { 0, <1.3,1,6> } }  // container shape
  //threshold 0.0                     // optional threshold value for isosurface
[0.0]
  accuracy 0.0001                      // accuracy of calculation [0.001]
  max_gradient 30                      // maximum gradient the function can have
[1.1]
  //evaluate 5, 1.2, 0.95             // evaluate the maximum gradient
  //max_trace 1                       // maybe increase for use in CSG [1]
  //all_intersections                 // alternative to 'max_trace'
  //open                              // remove visible container surface
  translate <-.5,-1,-.5>
  scale 4
  texture {MountainTex scale .1}

}

#end


Terrain


#declare Obj = Terrain;
#declare Norm = <0, 0, 0>;
//#declare Start = < -880.5, 1000.5,   -800>;
#declare Start = <  -0.3, 1000.5,   -1.8>;
#declare CPos = trace (
                  Obj,             // object to test
                  Start,           // starting point
                  -y,              // direction
                  Norm );          // normal

#declare Start2 = <1, 1000.5,  3>;
#declare CPos2 = trace (
                  Obj,             // object to test
                  Start2,           // starting point
                  -y,              // direction
                  Norm );          // normal


camera {
  location  CPos + <0,.3,0>
  direction 1.25*z
  look_at   CPos2 + <0,-.5,0>
  right     x*image_width/image_height
}





box { <-1,-3,-2>,<1.5,-2.2,3>
  pigment {rgbt 1}
  normal {bumps .1 turbulence .2 scale .03 }
  finish {reflection {.3,.9}}
  interior {
    ior 1.3
    fade_power 1001
    fade_distance 0.7
    fade_color <0.5,0.8,0.6>
  }
  photons {  // photon block for an object
    target 1.0
    refraction on
    reflection on
  }

}


Post a reply to this message

From: Kenneth
Subject: Re: Playing with Photons
Date: 20 Mar 2008 07:40:00
Message: <web.47e25a0ff97379d78dcad930@news.povray.org>
"Kirk Andrews" <kir### [at] tektonartcom> wrote:
> Well, the file is not too long, I'll just post it here:
>

Thanks.

There were a few minor cut-and-paste errors in the code that needed cleaning up,
but they were simply fixed. (And down around line 226 in the code, there were
two values in brackets that needed commenting out.) No problem, the scene
runs OK now.

I'll get back with some comments, if I can make any useful contribution.

Ken W.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Playing with Photons
Date: 20 Mar 2008 08:19:38
Message: <47e2646a$1@news.povray.org>
I tried a couple of exotic changes, but no solution to the problem. I shall 
experiment further.

Thomas


Post a reply to this message

From: Kirk Andrews
Subject: Re: Playing with Photons
Date: 20 Mar 2008 08:45:01
Message: <web.47e26959f97379da5d4a01d0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Kirk Andrews" <kir### [at] tektonartcom> wrote:
> > Well, the file is not too long, I'll just post it here:
> >
>
> Thanks.
>
> There were a few minor cut-and-paste errors in the code that needed cleaning up,
> but they were simply fixed. (And down around line 226 in the code, there were
> two values in brackets that needed commenting out.) No problem, the scene
> runs OK now.
>
> I'll get back with some comments, if I can make any useful contribution.
>
> Ken W.

Oh--I think text-wrapping did some funny things when I pasted it here.  Sorry.
Thanks.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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