POV-Ray : Newsgroups : povray.newusers : Photon mapping and media do not work Server Time
1 Nov 2024 13:20:32 EDT (-0400)
  Photon mapping and media do not work (Message 1 to 8 of 8)  
From: Artur Rataj
Subject: Photon mapping and media do not work
Date: 24 Jul 2005 10:00:00
Message: <web.42e39dfb7a1f5a6ae9d8b2350@news.povray.org>
Hello!

Here is the POV file, which I though will show some bluish ball:

#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"

global_settings {
  assumed_gamma 2.2
  max_trace_level 5
   photons {
     count 10000000
     max_trace_level 10
     adc_bailout 0.01
     media 1000
   }
}

camera {
   location <0, -5, 0>
   up  <0, 0, 1>
   look_at <0.0, 0.0, 0>


}

light_source { <-5, -5, 5> colour red 0.85 green 0.85 blue 0.85 }


//   object { Cube
//      scale <5, 0.001, 7>
//
//      pigment {
//         checker color Black color White
//      }
//      finish {
//         ambient 0.35
//         diffuse 0.65
//         crand 0.015
//      }
//      photons {
//         target
//         refraction on
//         reflection on
//         collect on
//       }
//   }

   sphere { <0, 2.15, 0>, 2.15
      pigment { White filter 0.95 }
      interior{
         ior 1.45
         fade_distance 2
         fade_power 2
         caustics 2.0
         media {
           scattering {
              1, rgb <0.5, 0.8, 1.0>
           }
         }
      }
      finish {
         ambient 0.2
         diffuse 0.0
         reflection 0.12
         specular 1.0
        roughness 0.001
      }
      photons {
         target
         refraction on
         reflection on
         collect on
       }

   }

but the resulting ball is black but the specular reflections, and the media
is
invisible. Additionally, if I uncomment the cube object, the whole image is
some kind of noise:

  0:00:05 Building Photon Maps Photons 0 (sampling 1x1)

No number of photons is mentioned, no 0x0 sampling. I tried several
different different values of the numbers of photons, and of
max_trace_level, adc_bailout, radius and media settings in the global
settings/photons section. What is wrong with the file?

Cheers,
Artur


Post a reply to this message

From: Warp
Subject: Re: Photon mapping and media do not work
Date: 24 Jul 2005 11:58:49
Message: <42e3bab9@news.povray.org>
1) Remove the 'caustics' definition.
   That has nothing to do with photons and will only interfere with
   the correct renering of photon mapping (it's a cheap trick to get
   fast but very inaccurate caustics, and it doesn't work with media
   anyways).

2) You probably don't need to use fade_distance and fade_power because
   you are using media anyways. Those are cheap&fast tricks to get the
   look of a colored material much faster than with media. Since you
   are using media anyways, you don't need them.

3) Since the sphere contains media you have to define 'hollow' for it.
   (This is basically a historic thing; don't pay attention to its
   illogicality.)

4) After the changes above you will have to reduce photon count to
   about 100000 and the media count to about 100 in order to get a
   decent parse time.

-- 

                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Photon mapping and media do not work
Date: 24 Jul 2005 12:10:29
Message: <42e3bd75@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>    and it doesn't work with media anyways

  Actually, now that I think about it, I'm not sure that is true.

  Anyways, it doesn't change the fact that 'caustics' and 'photons'
should be mutually exclusive (in fact, povray could perhaps even
warn about them being used at the same time).

-- 

                                                          - Warp


Post a reply to this message

From: Christoph Hormann
Subject: Re: Photon mapping and media do not work
Date: 24 Jul 2005 12:30:01
Message: <dc0fgu$16e$1@chho.imagico.de>
Warp wrote:
> 1) [...]

didn't you forget:

0) add a photons{} block to the light source.


Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 01 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Warp
Subject: Re: Photon mapping and media do not work
Date: 25 Jul 2005 07:42:51
Message: <42e4d03b@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> 0) add a photons{} block to the light source.

  For what purpose?

-- 

                                                          - Warp


Post a reply to this message

From: Christoph Hormann
Subject: Re: Photon mapping and media do not work
Date: 25 Jul 2005 07:55:01
Message: <dc2ju7$85c$1@chho.imagico.de>
Warp wrote:
> Christoph Hormann <chr### [at] gmxde> wrote:
> 
>>0) add a photons{} block to the light source.
> 

http://www.povray.org/documentation/view/3.6.1/425/

says photons settings for light sources default to 'off' which conforms 
with my memory - i have not actually tested recently though.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Warp
Subject: Re: Photon mapping and media do not work
Date: 25 Jul 2005 08:31:55
Message: <42e4dbbb@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> http://www.povray.org/documentation/view/3.6.1/425/

> says photons settings for light sources default to 'off' which conforms 
> with my memory - i have not actually tested recently though.

  Where exactly? What I see is this:

"Sometimes, you want photons to be shot from one light source and not
another. In that case, you can turn photons on for an object, but
specify photons { reflection off refraction off } in the light
source's definition."

  This seems to imply that photons are on by default for light sources
and that they have to be turned off explicitly if you don't want them.

  A quick test confirms this:

#global_settings { photons { count 10000 } }
camera { location <0, 5, -5> look_at 0 angle 35 }
light_source { <-80,50,-10>, 1 }
plane { y, -1 pigment { checker rgb .5, rgb 1 } }
sphere
{ 0,1
  pigment { rgbf 1 }
  finish { specular 1 roughness .01 reflection { .1, .3 } }
  interior { ior 1.5 }
  photons { target reflection on refraction on }
}

-- 

                                                          - Warp


Post a reply to this message

From: Christoph Hormann
Subject: Re: Photon mapping and media do not work
Date: 25 Jul 2005 08:50:02
Message: <dc2mu6$8po$1@chho.imagico.de>
Warp wrote:
> 
>>http://www.povray.org/documentation/view/3.6.1/425/
> 
> 
>>says photons settings for light sources default to 'off' which conforms 
>>with my memory - i have not actually tested recently though.
> 
> 
>   Where exactly? What I see is this:
> 

section 2.6.3.2.1:

...

All photons default values:

Global :
   expand_min    : 40
   gather        : 20, 100
   jitter        : 0.4
   media         : 0

Object :
   collect       : on
   refraction    : off
   reflection    : off
   split_union   : on
   target        : 1.0

Light_source:
   area_light    : off
   refraction    : off
   reflection    : off

> 
>   A quick test confirms this:

OK.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

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