POV-Ray : Newsgroups : povray.binaries.images : Radiosity interact with scattering Media? Server Time
8 Nov 2024 04:20:15 EST (-0500)
  Radiosity interact with scattering Media? (Message 1 to 3 of 3)  
From: jceddy
Subject: Radiosity interact with scattering Media?
Date: 19 Jul 2013 14:45:01
Message: <web.51e988e4c0e4f1cb314aa6840@news.povray.org>
Is there any way to get Radiosity to interact with scattering Media?

In the left side of the attached image I have a point light inside a
media-filled shell and it looks the way I would expect.

On the right side I replace the light with a white sphere with ambient 1 and
turn on radiosity...in this case the light doesn't interact with the scattering
media at all.

Is there a way to do it?

Example scene below:


#version 3.6;

#include "colors.inc"

#declare use_rad = true;

global_settings {
  assumed_gamma 2.2

  #if(use_rad)
  radiosity {
    pretrace_start 0.08           // start pretrace at this size
    pretrace_end   0.04           // end pretrace at this size
    count 35 //50 //35                      // higher -> higher quality
(1..1600) [35]
    nearest_count 5 //7 //5               // higher -> higher quality (1..10)
[5]
    error_bound 1.8               // higher -> smoother, less accurate [1.8]
    recursion_limit 3             // how much interreflections are calculated
(1..5+) [3]
    low_error_factor .5           // reduce error_bound during last pretrace
step
    gray_threshold 0.0            // increase for weakening colors (0..1) [0]
    minimum_reuse 0.015           // reuse of old radiosity samples [0.015]
    brightness 1 //.75 //.25 //1                  // brightness of radiosity
effects (0..1) [1]

    adc_bailout 0.01/2
    normal on                   // take surface normals into account [off]
    media on                    // take media into account [off]
    //save_file "file_name"       // save radiosity data
    //load_file "file_name"       // load saved radiosity data
    //always_sample off           // turn sampling in final trace off [on]
    //max_sample 1.0              // maximum brightness of samples
  }
  #end
}

// ----------------------------------------

camera {
  location  <0.0, 0.0, -4.0>
  direction 1.0*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

difference {
  sphere { <0, 0, 0>, 2.0 }
  sphere { <0, 0, 0>, 1.0 }

  texture {
    pigment { color rgbt 1.0 }
    finish { ambient 0 }
  }

  hollow

  interior {
    media {
      scattering { 1, 1 extinction 0.01 }
      density {
        granite
        density_map {
          [0.45 color rgb 0]
          [0.55 color rgb 1]
        }
        turbulence 0.5
      }

      samples 30, 100
    }
  }
}

#if(use_rad)
  sphere {
    <0, 0, 0>, 0.5

    texture {
      pigment { color rgb 1.0 }
      finish { ambient 1 }
    }
  }
#else
  light_source {
    0*x                  // light's position (translated below)
    color rgb <1,1,1>    // light's color
  }
#end


Post a reply to this message


Attachments:
Download 'radtest.jpg' (153 KB)

Preview of image 'radtest.jpg'
radtest.jpg


 

From: clipka
Subject: Re: Radiosity interact with scattering Media?
Date: 19 Jul 2013 14:55:15
Message: <51e98b93$1@news.povray.org>
Am 19.07.2013 20:43, schrieb jceddy:
> Is there any way to get Radiosity to interact with scattering Media?
>
> In the left side of the attached image I have a point light inside a
> media-filled shell and it looks the way I would expect.
>
> On the right side I replace the light with a white sphere with ambient 1 and
> turn on radiosity...in this case the light doesn't interact with the scattering
> media at all.
>
> Is there a way to do it?

What you're trying to do seems to be...

>    radiosity {
>      pretrace_start 0.08           // start pretrace at this size
>      pretrace_end   0.04           // end pretrace at this size
>      count 35 //50 //35                      // higher -> higher quality
> (1..1600) [35]
>      nearest_count 5 //7 //5               // higher -> higher quality (1..10)
> [5]
>      error_bound 1.8               // higher -> smoother, less accurate [1.8]
>      recursion_limit 3             // how much interreflections are calculated
> (1..5+) [3]
>      low_error_factor .5           // reduce error_bound during last pretrace
> step
>      gray_threshold 0.0            // increase for weakening colors (0..1) [0]
>      minimum_reuse 0.015           // reuse of old radiosity samples [0.015]
>      brightness 1 //.75 //.25 //1                  // brightness of radiosity
> effects (0..1) [1]
>
>      adc_bailout 0.01/2
>      normal on                   // take surface normals into account [off]
>      media on                    // take media into account [off]

... kind of the opposite of this last statement.

"radiosity { media on }" causes light /from/ media (either scattered or 
emitted) to be taken into account when computing how much light a 
surface receives from sources other than traditional light sources.

If I understand you correctly, then you want POV-Ray to compute how much 
light the /media/ receives from sources other than traditional light 
sources.

If that is your intention, then the answer to your question is a simple 
yet unsatisfactory "No". MCPov might support it (and it should, given 
that it doesn't support traditional light sources at all), but I'm not 
entirely sure about that.


Post a reply to this message

From: Alain
Subject: Re: Radiosity interact with scattering Media?
Date: 19 Jul 2013 16:41:59
Message: <51e9a497$1@news.povray.org>

> Is there any way to get Radiosity to interact with scattering Media?
>
> In the left side of the attached image I have a point light inside a
> media-filled shell and it looks the way I would expect.
>
> On the right side I replace the light with a white sphere with ambient 1 and
> turn on radiosity...in this case the light doesn't interact with the scattering
> media at all.
>
> Is there a way to do it?
>

Short answer: No.

Currently, there is no way to have scattering media illuminated by 
radiosity alone.

I don't think that there are any simple workaround.

A possibility would be to add some emissive media with a spherical 
pattern properly scalled and using a poly_wave 0.5 to simulate the 
natural fading of light.



Alain


Post a reply to this message

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