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

Class Radio

The Radiosity object

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

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

go()

 

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

collectMeshes()

 

Convert selected visible meshes to patches for radiosity calculation.

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

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.

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.

filterFaces()

 

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

filterElems()

 

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

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).

getHemiRes()

 

Get hemicube size.

Returns: int
the current hemicube size.

setHemiRes(ival)

 

Set hemicube size. The range is [100, 1000].

Parameters:
  • ival (int) - the new size.

getMaxIter()

 

Get maximum number of radiosity rounds.

Returns: int
the current maxiter value.

setMaxIter(ival)

 

Set maximum number of radiosity rounds. The range is [0, 10000].

Parameters:
  • ival (int) - the maxiter new value.

getSubShPatch()

 

Get maximum number of times the environment is tested to detect patches.

Returns: int
the current value.

setSubShPatch(ival)

 

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()

 

Get the number of times the environment is tested to detect elements.

Returns: int
the current value.

setSubShElem(ival)

 

Set number of times the environment is tested to detect elements. The range is [0, 10].

Parameters:
  • ival (int) - the new value.

getElemLimit()

 

Get the range for removing doubles.

Returns: int
the current value.

setElemLimit(ival)

 

Set the range for removing doubles. The range is [0, 50].

Parameters:
  • ival (int) - the new value.

getMaxSubdivSh()

 

Get the maximum number of initial shoot patches evaluated.

Returns: int
the current value.

setMaxSubdivSh(ival)

 

Set the maximum number of initial shoot patches evaluated. The range is [1, 250].

Parameters:
  • ival (int) - the new value.

getPatchMax()

 

Get the maximum size of a patch.

Returns: int
the current value.

setPatchMax(ival)

 

Set the maximum size of a patch. The range is [10, 1000].

Parameters:
  • ival (int) - the new value.

getPatchMin()

 

Get the minimum size of a patch.

Returns: int
the current value.

setPatchMin(ival)

 

Set the minimum size of a patch. The range is [10, 1000].

Parameters:
  • ival (int) - the new value.

getElemMax()

 

Get the maximum size of an element.

Returns: int
the current value.

setElemMax(ival)

 

Set the maximum size of an element. The range is [1, 100].

Parameters:
  • ival (int) - the new value.

getElemMin()

 

Get the minimum size of an element. The range is [1, 100].

Returns: int
the current value.

setElemMin(ival)

 

Set the minimum size of an element. The range is [1, 100].

Parameters:
  • ival (int) - the new value.

getMaxElems()

 

Get the maximum number of elements.

Returns: int
the current value.

setMaxElems(ival)

 

Set the maximum number of elements. The range is [1, 250000].

Parameters:
  • ival (int) - the new value.

getConvergence()

 

Get lower thresholdo of unshot energy.

Returns: float
the current value.

setConvergence(fval)

 

Set lower threshold of unshot energy. The range is [0.0, 1.0].

Parameters:
  • fval (float) - the new value.

getMult()

 

Get the energy value multiplier.

Returns: float
the current value.

setMult(fval)

 

Set the energy value multiplier. The range is [0.001, 250.0].

Parameters:
  • fval (float) - the new value.

getGamma()

 

Get change in the contrast of energy values.

Returns: float
the current value.

setGamma(fval)

 

Set change in the contrast of energy values. The range is [0.2, 10.0].

Parameters:
  • fval (float) - the new value.

getDrawType()

 

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

Returns: int
the current draw type.

setDrawType(dt)

 

Set the draw type.

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

getMode()

 

Get mode as an int (or'ed bitflags), see Modes dictionary.

Returns: int
the current value.

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