Module Radio :: Class Radio
[frames | no frames]

Class Radio


The Radiosity object

This object wraps the current Scene's radiosity context in Blender.
Method Summary
  addMesh()
Add the new mesh created by the radiosity simulation (see go) to Blender.
  collectMeshes()
Convert selected visible meshes to patches for radiosity calculation.
  filterElems()
Filter elements to remove aliasing artifacts.
  filterFaces()
Force an extra smoothing.
  freeData()
Release all memory used by radiosity.
float getConvergence()
Get lower thresholdo of unshot energy.
int getDrawType()
Get the draw type: Wire, Solid or Gouraud as an int value, see DrawTypes.
int getElemLimit()
Get the range for removing doubles.
int getElemMax()
Get the maximum size of an element.
int getElemMin()
Get the minimum size of an element.
float getGamma()
Get change in the contrast of energy values.
int getHemiRes()
Get hemicube size.
int getMaxElems()
Get the maximum number of elements.
int getMaxIter()
Get maximum number of radiosity rounds.
int getMaxSubdivSh()
Get the maximum number of initial shoot patches evaluated.
int getMode()
Get mode as an int (or'ed bitflags), see Modes dictionary.
float getMult()
Get the energy value multiplier.
int getPatchMax()
Get the maximum size of a patch.
int getPatchMin()
Get the minimum size of a patch.
int getSubShElem()
Get the number of times the environment is tested to detect elements.
int getSubShPatch()
Get maximum number of times the environment is tested to detect patches.
  go()
Start the radiosity simulation.
  limitSubdivide()
Subdivide patches (optional, it may improve results).
  removeDoubles()
Join elements (nodes) which differ less than the defined element limit.
  replaceMeshes()
Replace the original input meshes with the one calculated by the radiosity simulation.
  setConvergence(fval)
Set lower threshold of unshot energy.
  setDrawType(dt)
Set the draw type.
  setElemLimit(ival)
Set the range for removing doubles.
  setElemMax(ival)
Set the maximum size of an element.
  setElemMin(ival)
Set the minimum size of an element.
  setGamma(fval)
Set change in the contrast of energy values.
  setHemiRes(ival)
Set hemicube size.
  setMaxElems(ival)
Set the maximum number of elements.
  setMaxIter(ival)
Set maximum number of radiosity rounds.
  setMaxSubdivSh(ival)
Set the maximum number of initial shoot patches evaluated.
  setMode(mode1, mode2)
Set mode flags as strings: 'ShowLimits' and 'Z'.
  setMult(fval)
Set the energy value multiplier.
  setPatchMax(ival)
Set the maximum size of a patch.
  setPatchMin(ival)
Set the minimum size of a patch.
  setSubShElem(ival)
Set number of times the environment is tested to detect elements.
  setSubShPatch(ival)
Set the maximum number of times the environment is tested to detect patches.
  subdivideElems()
Pre-subdivision: detect high-energy elements (nodes) and subdivide them (optional, it may improve results).
  subdividePatches()
Pre-subdivision: detect high-energy patches and subdivide them (optional, it may improve results).

Method Details

addMesh()

Add the new mesh created by the radiosity simulation (see go) to Blender. The radiosity results are stored in this mesh's vertex colors.

Note: see replaceMeshes for a destructive alternative.

collectMeshes()

Convert selected visible meshes to patches for radiosity calculation.

Note: Object.Object.select can be used to (un)select objects via bpython.

filterElems()

Filter elements to remove aliasing artifacts. This method can be called only after the simulation has been calculated (go).

filterFaces()

Force an extra smoothing. This method can be called only after the simulation has been calculated (go).

freeData()

Release all memory used by radiosity.

getConvergence()

Get lower thresholdo of unshot energy.
Returns:
the current value.
           (type=float)

getDrawType()

Get the draw type: Wire, Solid or Gouraud as an int value, see DrawTypes.
Returns:
the current draw type.
           (type=int)

getElemLimit()

Get the range for removing doubles.
Returns:
the current value.
           (type=int)

getElemMax()

Get the maximum size of an element.
Returns:
the current value.
           (type=int)

getElemMin()

Get the minimum size of an element. The range is [1, 100].
Returns:
the current value.
           (type=int)

getGamma()

Get change in the contrast of energy values.
Returns:
the current value.
           (type=float)

getHemiRes()

Get hemicube size.
Returns:
the current hemicube size.
           (type=int)

getMaxElems()

Get the maximum number of elements.
Returns:
the current value.
           (type=int)

getMaxIter()

Get maximum number of radiosity rounds.
Returns:
the current maxiter value.
           (type=int)

getMaxSubdivSh()

Get the maximum number of initial shoot patches evaluated.
Returns:
the current value.
           (type=int)

getMode()

Get mode as an int (or'ed bitflags), see Modes dictionary.
Returns:
the current value.
           (type=int)

getMult()

Get the energy value multiplier.
Returns:
the current value.
           (type=float)

getPatchMax()

Get the maximum size of a patch.
Returns:
the current value.
           (type=int)

getPatchMin()

Get the minimum size of a patch.
Returns:
the current value.
           (type=int)

getSubShElem()

Get the number of times the environment is tested to detect elements.
Returns:
the current value.
           (type=int)

getSubShPatch()

Get maximum number of times the environment is tested to detect patches.
Returns:
the current value.
           (type=int)

go()

Start the radiosity simulation. It is necessary to call collectMeshes first.

limitSubdivide()

Subdivide patches (optional, it may improve results).

removeDoubles()

Join elements (nodes) which differ less than the defined element limit. This method can be called only after the simulation has been calculated (go).

replaceMeshes()

Replace the original input meshes with the one calculated by the radiosity simulation. The radiosity results are stored in this mesh's vertex colors.

Note: see addMesh for a non-destructive alternative.

setConvergence(fval)

Set lower threshold of unshot energy. The range is [0.0, 1.0].
Parameters:
fval - the new value.
           (type=float)

setDrawType(dt)

Set the draw type.
Parameters:
dt - either 'Wire', 'Solid' or 'Gouraud' or the equivalent entry in the DrawTypes dictionary.
           (type=string or int)

setElemLimit(ival)

Set the range for removing doubles. The range is [0, 50].
Parameters:
ival - the new value.
           (type=int)

setElemMax(ival)

Set the maximum size of an element. The range is [1, 100].
Parameters:
ival - the new value.
           (type=int)

setElemMin(ival)

Set the minimum size of an element. The range is [1, 100].
Parameters:
ival - the new value.
           (type=int)

setGamma(fval)

Set change in the contrast of energy values. The range is [0.2, 10.0].
Parameters:
fval - the new value.
           (type=float)

setHemiRes(ival)

Set hemicube size. The range is [100, 1000].
Parameters:
ival - the new size.
           (type=int)

setMaxElems(ival)

Set the maximum number of elements. The range is [1, 250000].
Parameters:
ival - the new value.
           (type=int)

setMaxIter(ival)

Set maximum number of radiosity rounds. The range is [0, 10000].
Parameters:
ival - the maxiter new value.
           (type=int)

setMaxSubdivSh(ival)

Set the maximum number of initial shoot patches evaluated. The range is [1, 250].
Parameters:
ival - the new value.
           (type=int)

setMode(mode1=None, mode2=None)

Set mode flags as strings: 'ShowLimits' and 'Z'. To set one give it as only argument. Strings not passed in are unset, so setMode() unsets both.
Parameters:
mode1 - optional mode string.
           (type=string)
mode2 - optional mode string.
           (type=string)

setMult(fval)

Set the energy value multiplier. The range is [0.001, 250.0].
Parameters:
fval - the new value.
           (type=float)

setPatchMax(ival)

Set the maximum size of a patch. The range is [10, 1000].
Parameters:
ival - the new value.
           (type=int)

setPatchMin(ival)

Set the minimum size of a patch. The range is [10, 1000].
Parameters:
ival - the new value.
           (type=int)

setSubShElem(ival)

Set number of times the environment is tested to detect elements. The range is [0, 10].
Parameters:
ival - the new value.
           (type=int)

setSubShPatch(ival)

Set the maximum number of times the environment is tested to detect patches. The range is [0, 10].
Parameters:
ival - the new value.
           (type=int)

subdivideElems()

Pre-subdivision: detect high-energy elements (nodes) and subdivide them (optional, it may improve results).

subdividePatches()

Pre-subdivision: detect high-energy patches and subdivide them (optional, it may improve results).

Generated by Epydoc 2.1 on Sun Feb 11 13:30:19 2007 http://epydoc.sf.net