Difference between revisions of "General scattering and absorbing media"

From PlanarRad
Jump to navigation Jump to search
Line 26: Line 26:
 
== Step 1 : Set up single band run ==
 
== Step 1 : Set up single band run ==
  
We will be working with a single wavelength so we need to set up a small "band specification file" to specify this. Create a text file called "bands1.bsf", or alternatively edit 'bands17.bsf' that can be found in the 'planarrad_test04' directory. Create new folder called 'slabtest' (or whatever) and save 'bands1.bsf' in it.
+
We will be working with a single wavelength so we need to set up a small "band specification file" to specify this. Create a text file called "bands1.bsf", or alternatively edit 'bands17.bsf' that can be found in the 'planarrad_test04' directory.  
 +
 
 +
[[File:Notepadpp_bands1_bsf.png]]
 +
 
 +
Create new folder called 'slabtest' (or whatever) and save 'bands1.bsf' in it.
 +
 
 +
[[File:Slabtest_dir_bands1_bsf.png]]
 +
 
 +
[[Media:Example.ogg]]

Revision as of 14:37, 23 February 2014

IN PROGRESS


PlanarRad was designed for use with data corresponding to natural water bodies, however it can be used to model the light field or reflectance properties of homegenous 'slabs' of any kind of media, as long as the following inputs are known at the wavelength to be modelled:

  • The extinction coefficient (a.k.a. the attenuation coefficient, c, they are the same thing).
  • The absorption coefficient, a.
  • The phase function, i.e. the angular probability of scattering when it occurs.
  • The refractive index inside and outside the media.

These concepts may be expressed in other ways that contain the required information. For example if you have a volume scattering function (VSF) and single scattering albedo, you can then calculate c, a and the phase function. Depending on the material you might be able to assume an isotropic phase function - that at each scattering event the direction of scattering is equally probable in any direction over the sphere, and that simplifies things.

Note the following two caveats:

1) The method described below assumes that the interface of the slab, what we might call the air-media interface (assuming what is above the media is air) is completely flat. If it isn't the interface transmission and reflectance function needs to be modified and unfortunatly PlanarRad currently only has methods for doing that that are appropriate for wind-blown water surfaces. If you need additional functionality here then it is worth contacting me.

2) PlanarRad does not have functionality for slabs of infinite depth or thickness. You have to specify a thickness and a reflectance function of whatever is below the slab. However normally this can be solved by setting a sufficiently deep slab that the bottom infleunce is negligible. Checking his can be done by setting the bottom reflectance to zero, and then re-running with a higher bottom reflectance, and veirifying the effect on the output is negligible.

Worked example: BRDF of a material with isotropic phase function

This example shows how to model the bidirectional reflectance distribution function (BRDF) of a material for which the extinction and absorption co-efficients are known and we can assume the phase function is isotropic. We are interested in slab of this material that is sufficiently thick that whatever is underneath it has negligible effect on its reflectance, i.e. you can't see through it. In fact we can will work out how thick that needs to be in the analysis.

The example uses the Windows version of PlanarRad. It will involve working witha few text files for which you can use Wordpad. In general Notepad does not work because (I think) it doesn't handle the Unix-style line endings. However I strongly recommend using Notepad++ for working with text files under Windows, and that is what the screenshots here are taken from.

Step 1 : Set up single band run

We will be working with a single wavelength so we need to set up a small "band specification file" to specify this. Create a text file called "bands1.bsf", or alternatively edit 'bands17.bsf' that can be found in the 'planarrad_test04' directory.

Error creating thumbnail: Unable to save thumbnail to destination

Create new folder called 'slabtest' (or whatever) and save 'bands1.bsf' in it.

File:Slabtest dir bands1 bsf.png

Media:Example.ogg