POV-Ray : Newsgroups : povray.binaries.images : Radiosity and scattering media. Server Time
5 Nov 2024 08:26:03 EST (-0500)
  Radiosity and scattering media. (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Bruno Cabasson
Subject: Radiosity and scattering media.
Date: 12 Sep 2007 08:05:01
Message: <web.46e7d537f833d28de8ba46670@news.povray.org>
Hi all!

I have a concern with radiosity and scattering media. I tried to find
previous info on this topic but did not get a clear answer. In a
full-radiosity scene, does scattering media react (= 'shine') to radiosity
rays? According to the following scene it appears not, and only the
extincion effect is visible, not the scattering itself.

Thanks for enlighting me!

#include "colors.inc"

#declare Radiosity=on;

global_settings {
  assumed_gamma 1.0
  max_trace_level 25
  #if (Radiosity)
    radiosity {
      pretrace_start 0.04           // start pretrace at this size
      pretrace_end   0.01           // end pretrace at this size
      count 100                      // higher -> higher quality (1..1600)
[35]
      nearest_count 5               // higher -> higher quality (1..10) [5]
      error_bound 0.6               // 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                  // 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]
    }
  #end
}

#default {
  texture {
    pigment {rgb 1}
    #if (Radiosity)
      finish {
        ambient 0.0
        diffuse 0.6
        specular 0.3
      }
    #else
      finish {
        ambient 0.1
        diffuse 0.6
        specular 0.3
      }
    #end
  }
}

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

camera {
  right x*image_width/image_height
  angle 50
  location  0
  look_at   z
  rotate 10*x
  translate <0,0.75,-4>
}


sky_sphere {pigment {White}}

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

plane {y, -1 pigment {color 0.5*White}}

box
{
  -0.5, 0.5
  hollow
  pigment {rgbt 1}
  interior
  {
    ior 1.05
    media
    {
        scattering {1, 2}
    }
  }
  rotate -15*x + 30*y
}


Bruno


Post a reply to this message


Attachments:
Download 'mediarad.png' (9 KB)

Preview of image 'mediarad.png'
mediarad.png


 

From: Bruno Cabasson
Subject: Re: Radiosity and scattering media.
Date: 12 Sep 2007 08:20:01
Message: <web.46e7d93f964c6ca3e8ba46670@news.povray.org>
Well, I seeked the web but not the documentation. It clearly stated in
"3.6.2.1.3  Scattering":

The scattering effect is only visible when light is shining on the media
from a light source.

So I re-formulate: how can I use scattering media in a full-radiosity scene?
Is it possible? What about the Cornell radiosity example if there is a
media-filled box in te room?

Bruno.


Post a reply to this message

From: Alain
Subject: Re: Radiosity and scattering media.
Date: 12 Sep 2007 11:58:43
Message: <46e80cb3$1@news.povray.org>
Bruno Cabasson nous apporta ses lumieres en ce 2007/09/12 08:19:
> Well, I seeked the web but not the documentation. It clearly stated in
> "3.6.2.1.3  Scattering":
> 
> The scattering effect is only visible when light is shining on the media
> from a light source.
> 
> So I re-formulate: how can I use scattering media in a full-radiosity scene?
> Is it possible? What about the Cornell radiosity example if there is a
> media-filled box in te room?
> 
> Bruno.
> 
Light been scattered by a scattering media will affect the radiosity, if "media 
on" is set.
Radiosity ray are only affected by the extinction and never illuminate any media.

You can fake it, somewhat, by using an emiting media together with the 
scattering media. Mostly work in relatively simple cases. Good with large 
ambient surfaces "lighting" simple shapes.

-- 
Alain
-------------------------------------------------
Q. What's the difference between Batman and Bill Gates?
A. When Batman fought the Penguin, he won.
                                            -- J. Levine


Post a reply to this message

From: Bruno Cabasson
Subject: Re: Radiosity and scattering media.
Date: 12 Sep 2007 12:20:00
Message: <web.46e81166964c6ca3e8ba46670@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Bruno Cabasson nous apporta ses lumieres en ce 2007/09/12 08:19:
> > Well, I seeked the web but not the documentation. It clearly stated in
> > "3.6.2.1.3  Scattering":
> >
> > The scattering effect is only visible when light is shining on the media
> > from a light source.
> >
> > So I re-formulate: how can I use scattering media in a full-radiosity scene?
> > Is it possible? What about the Cornell radiosity example if there is a
> > media-filled box in te room?
> >
> > Bruno.
> >
> Light been scattered by a scattering media will affect the radiosity, if "media
> on" is set.
> Radiosity ray are only affected by the extinction and never illuminate any media.
>
> You can fake it, somewhat, by using an emiting media together with the
> scattering media. Mostly work in relatively simple cases. Good with large
> ambient surfaces "lighting" simple shapes.
>
> --
> Alain
> -------------------------------------------------
> Q. What's the difference between Batman and Bill Gates?
> A. When Batman fought the Penguin, he won.
>                                             -- J. Levine

Thanks for your reply. Waiting for someone to answer, I made a few more
tries and tested the trick with emissive media. I don't find it very
satisfatory in that the object is illuminated, but emits light. In a
radiosity scene, it is preferable to avoid this.

I am trying another idea ...

Bruno


Post a reply to this message

From: Samuel Benge
Subject: Re: Radiosity and scattering media.
Date: 12 Sep 2007 15:21:35
Message: <46e83c3f$1@news.povray.org>
Bruno Cabasson wrote:
> 
> Thanks for your reply. Waiting for someone to answer, I made a few more
> tries and tested the trick with emissive media. I don't find it very
> satisfatory in that the object is illuminated, but emits light. In a
> radiosity scene, it is preferable to avoid this.
> 
> I am trying another idea ...

Bruno,

You might try Alain's idea of faking it with other light_sources. You 
need not worry about the other lights affecting the scene if you make a 
light_group, like so:

/* begin pseudocode
light_group{
  light_source{...}
  light_source{...}
  object{ media_object }
}
end pseudocode*/

The lights will only illuminate the media object, so you are free to try 
different light_source settings to fake global illumination. The lights, 
however, may cast shadows from unlit objects. Be aware of that.

Sam


Post a reply to this message

From: Bruno Cabasson
Subject: Re: Radiosity and scattering media.
Date: 12 Sep 2007 19:00:01
Message: <web.46e86f32964c6ca3cf5057fe0@news.povray.org>
Samuel Benge <stb### [at] THIShotmailcom> wrote:
> Bruno Cabasson wrote:
> >
> > Thanks for your reply. Waiting for someone to answer, I made a few more
> > tries and tested the trick with emissive media. I don't find it very
> > satisfatory in that the object is illuminated, but emits light. In a
> > radiosity scene, it is preferable to avoid this.
> >
> > I am trying another idea ...
>
> Bruno,
>
> You might try Alain's idea of faking it with other light_sources. You
> need not worry about the other lights affecting the scene if you make a
> light_group, like so:
>
> /* begin pseudocode
> light_group{
>   light_source{...}
>   light_source{...}
>   object{ media_object }
> }
> end pseudocode*/
>
> The lights will only illuminate the media object, so you are free to try
> different light_source settings to fake global illumination. The lights,
> however, may cast shadows from unlit objects. Be aware of that.
>
> Sam

This is exactly what I was thinking of and experimenting. The last scene is
currently rendering ...

Bruno


Post a reply to this message

From: Bruno Cabasson
Subject: Re: Radiosity and scattering media.
Date: 13 Sep 2007 02:20:00
Message: <web.46e8d541964c6ca3cf5057fe0@news.povray.org>
Here is a quick try with low radiosity settings and a first attempt to the
material of the box. Needs tuning and improvements, especially a density
function for the media in order to give granularity, and the normal also
needs to be re-worked.

The scene is lit by a 2-color dome (Yellow/Blue which combine into Gray with
radiosity), and the media box is lit by 2 sets of 50 randomly positionned
light_sources (Yellow on the left, Blue on the right) within a light_group.
The circle of small balls is just decoration.

I intend to get an acceptable translucent Wax material. Here, the lighting
is not suitable to show translucency.

Bruno


Post a reply to this message


Attachments:
Download 'mediarad.png' (111 KB)

Preview of image 'mediarad.png'
mediarad.png


 

From: Bruno Cabasson
Subject: Re: Radiosity and scattering media.
Date: 13 Sep 2007 09:35:00
Message: <web.46e93c77964c6ca3e8ba46670@news.povray.org>
My last experiment.

Regards.


Post a reply to this message


Attachments:
Download 'mediarad.jpg' (34 KB)

Preview of image 'mediarad.jpg'
mediarad.jpg


 

From: Alain
Subject: Re: Radiosity and scattering media.
Date: 13 Sep 2007 17:50:53
Message: <46e9b0bd$1@news.povray.org>
Bruno Cabasson nous apporta ses lumieres en ce 2007/09/13 09:34:
> My last experiment.
> 
> Regards.
> 
> 
> ------------------------------------------------------------------------
> 
Nice waxy cube.

-- 
Alain
-------------------------------------------------
Q: If pro is opposite of con,then what is the opposite of progress?

A: Congress!
Men's restroom, House of Representatives, Washington , DC


Post a reply to this message

From: Kenneth
Subject: Re: Radiosity and scattering media.
Date: 19 Sep 2007 03:15:00
Message: <web.46f0cbe5964c6ca3ddc78dcc0@news.povray.org>
"Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
> My last experiment.
>

Really nice. Looks like wax to me!  Best wax cube I've seen...not that I've
seen that many of 'em.  ;-)

The only jarring part of the image is the red sphere; just seems out of
place (visually speaking.)  Draws too much attention to itself.

Mind posting your final "wax" code? It's quite impressive.

Ken W.


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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