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

Class Radio

source code

The Radiosity object

This object wraps the current Scene's radiosity context in Blender.

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

go()

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

collectMeshes()

source code 
Convert selected visible meshes to patches for radiosity calculation.

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

addMesh()

source code 
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.

replaceMeshes()

source code 
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.

filterFaces()

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

filterElems()

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

removeDoubles()

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

getHemiRes()

source code 
Get hemicube size.
Returns: int
the current hemicube size.

setHemiRes(ival)

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

getMaxIter()

source code 
Get maximum number of radiosity rounds.
Returns: int
the current maxiter value.

setMaxIter(ival)

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

getSubShPatch()

source code 
Get maximum number of times the environment is tested to detect patches.
Returns: int
the current value.

setSubShPatch(ival)

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

getSubShElem()

source code 
Get the number of times the environment is tested to detect elements.
Returns: int
the current value.

setSubShElem(ival)

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

getElemLimit()

source code 
Get the range for removing doubles.
Returns: int
the current value.

setElemLimit(ival)

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

getMaxSubdivSh()

source code 
Get the maximum number of initial shoot patches evaluated.
Returns: int
the current value.

setMaxSubdivSh(ival)

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

getPatchMax()

source code 
Get the maximum size of a patch.
Returns: int
the current value.

setPatchMax(ival)

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

getPatchMin()

source code 
Get the minimum size of a patch.
Returns: int
the current value.

setPatchMin(ival)

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

getElemMax()

source code 
Get the maximum size of an element.
Returns: int
the current value.

setElemMax(ival)

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

getElemMin()

source code 
Get the minimum size of an element. The range is [1, 100].
Returns: int
the current value.

setElemMin(ival)

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

getMaxElems()

source code 
Get the maximum number of elements.
Returns: int
the current value.

setMaxElems(ival)

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

getConvergence()

source code 
Get lower thresholdo of unshot energy.
Returns: float
the current value.

setConvergence(fval)

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

getMult()

source code 
Get the energy value multiplier.
Returns: float
the current value.

setMult(fval)

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

getGamma()

source code 
Get change in the contrast of energy values.
Returns: float
the current value.

setGamma(fval)

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

getDrawType()

source code 
Get the draw type: Wire, Solid or Gouraud as an int value, see DrawTypes.
Returns: int
the current draw type.

setDrawType(dt)

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

getMode()

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

setMode(mode1=None, mode2=None)

source code 
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 (string) - optional mode string.
  • mode2 (string) - optional mode string.