java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.gpuflux.tracer.FluxLightModelTracer
- All Implemented Interfaces:
Manageable,Shareable,ProgressMonitor
- Since:
- 2011.0722 FluxLightModel is a light transport model. For a given list of light sources, it performs experiments on a scene in order to compute the total absorbed power and sensed irradiance by objects and sensors in a scene.
- Version:
- 1.5
- Author:
- Dietger van Antwerpen invalid input: '<'dietger@xs4all.nl>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FluxLightModelTracer.Typestatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.FieldFields inherited from interface de.grogra.util.ProgressMonitor
ALL, DONE_PROGRESS, I18N, INDETERMINATE_PROGRESS, INTERMEDIATE, LEVEL, NONE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a default light model with 30.000 rays per computation and a ray depth of 10.FluxLightModelTracer(int rayCount, int depth, double cutoffPower, boolean enableSensors) Creates a light model -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()(Re-)builds a scene from the current graph.voidcompute()voidcompute(boolean forceCompute, boolean forceRebuild) (Re-)computes the light distribution in the current graph.Returns the experiment data on absorbed power, computed during the last call tocompute()getAbsorbedPower(Node node) Deprecated.Returns the power absorbed by a node during the last call tocompute()doubleintgetDepth()floatintintdoubleintintReturns the experiment data on sensed irradiance, computed during the last call tocompute()getSensedIrradiance(Node node) Deprecated.Returns the irradiance sensed by a node during the last call tocompute()intdoubleboolean[]booleanbooleandoublesampleCountToVariance(AbstractList<Light> lights, double minPower, int sampleCount) Returns the variance for a given sample count for one computationvoidsetCutoffPower(double minPower) voidsetDepth(int depth) voidsetDispersion(boolean dispersion) voidsetEnableSensors(boolean enableSensors) voidsetFlatness(float flatness) voidsetImportanceCurve(SpectralCurve importanceCurve) voidsetLayerVisible(int layer, boolean visible) voidsetMeasureMode(FluxLightModelTracer.MeasureMode measureMode) voidsetMeasureObjectFilter(ObjectFilter measureObjectFilter) voidsetProgress(String text, float progress) This method is invoked by the renderer to monitor its progress.voidsetRandomseed(int seed) voidsetRayCount(int rayCount) voidsetSensitivityCurves(SpectralCurve[] sensitivityCurves) voidsetSpectralBuckets(int spectralBuckets) voidsetSpectralRange(int minLambda, int maxLambda) voidsetTargetVariance(double minPower, double targetVariance) voidshowMessage(String message) This method is invoked by the renderer to show a message, e.g., the statistics after rendering has completed.intvarianceToSampleCount(AbstractList<Light> lights, double minPower, double targetVariance) Returns the estimated sample count, required to achieve a given target variance for one computationMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
$TYPE
-
measureObjectFilter$FIELD
-
visibleLayers$FIELD
-
flatness$FIELD
-
minPower$FIELD
-
targetVariance$FIELD
-
cutoffPower$FIELD
-
depth$FIELD
-
randomseed$FIELD
-
rayCount$FIELD
-
enableSensors$FIELD
-
measureMode$FIELD
-
minLambda$FIELD
-
spectralBuckets$FIELD
-
importanceCurve$FIELD
-
sensitivityCurves$FIELD
-
dispersion$FIELD
-
-
Constructor Details
-
FluxLightModelTracer
public FluxLightModelTracer()Creates a default light model with 30.000 rays per computation and a ray depth of 10. -
FluxLightModelTracer
public FluxLightModelTracer(int rayCount, int depth, double cutoffPower, boolean enableSensors) Creates a light model- Parameters:
rayCount- the number of samples per computationdepth- the maximum ray depthcutoffPower- the maximum neglectable power quantumenableSensors- sensors are simulated if true
-
-
Method Details
-
getManageableType
- Specified by:
getManageableTypein interfaceManageable
-
isEnableSensors
public boolean isEnableSensors() -
isDispersion
public boolean isDispersion() -
getDepth
public int getDepth() -
getRandomseed
public int getRandomseed() -
getRayCount
public int getRayCount() -
getMinLambda
public int getMinLambda() -
getSpectralBuckets
public int getSpectralBuckets() -
getFlatness
public float getFlatness() -
getMinPower
public double getMinPower() -
getTargetVariance
public double getTargetVariance() -
getCutoffPower
public double getCutoffPower() -
getMeasureObjectFilter
-
getVisibleLayers
public boolean[] getVisibleLayers() -
getMeasureMode
-
getImportanceCurve
-
getSensitivityCurves
-
setEnableSensors
public void setEnableSensors(boolean enableSensors) -
setCutoffPower
public void setCutoffPower(double minPower) -
setDepth
public void setDepth(int depth) -
setRandomseed
public void setRandomseed(int seed) -
setRayCount
public void setRayCount(int rayCount) -
setSensitivityCurves
-
setImportanceCurve
-
setSpectralBuckets
public void setSpectralBuckets(int spectralBuckets) -
setMeasureMode
-
setSpectralRange
public void setSpectralRange(int minLambda, int maxLambda) -
build
public void build()(Re-)builds a scene from the current graph. This scene is than used ininvalid reference
#conpute -
compute
public void compute() -
compute
public void compute(boolean forceCompute, boolean forceRebuild) (Re-)computes the light distribution in the current graph. This method has to be invoked at first in order forgetSensedIrradiance(de.grogra.graph.impl.Node)andgetAbsorbedPower(de.grogra.graph.impl.Node)to return correct values.- Parameters:
forceRebuild- true forces rebuilding of the scene, otherwise the last build is reusedforceRebuild2-lights- list of lights for which the light distribution is computed. If null, the light distribution is computed for all lights in the scene.
-
getSensedIrradiance
Deprecated. -
getAbsorbedPower
Deprecated. -
getSensedIrradiance
Returns the experiment data on sensed irradiance, computed during the last call tocompute()- Returns:
- sensed irradiance data
-
getAbsorbedPower
Returns the experiment data on absorbed power, computed during the last call tocompute()- Returns:
- absorbed power data
-
getSensedIrradianceMeasurement
Returns the irradiance sensed by a node during the last call tocompute()- Parameters:
node- node for which the absorbed power is returned- Returns:
- sensed irradiance
-
getAbsorbedPowerMeasurement
Returns the power absorbed by a node during the last call tocompute()- Parameters:
node- node for which the absorbed power is returned- Returns:
- absorbed power
-
setProgress
Description copied from interface:ProgressMonitorThis method is invoked by the renderer to monitor its progress.- Specified by:
setProgressin interfaceProgressMonitor- Parameters:
text- short text to displayprogress- state of progress from 0 to 1, or one of the constantsProgressMonitor.INDETERMINATE_PROGRESS,ProgressMonitor.DONE_PROGRESS
-
showMessage
Description copied from interface:ProgressMonitorThis method is invoked by the renderer to show a message, e.g., the statistics after rendering has completed.- Specified by:
showMessagein interfaceProgressMonitor- Parameters:
message- message to display
-
setMeasureObjectFilter
-
varianceToSampleCount
public int varianceToSampleCount(AbstractList<Light> lights, double minPower, double targetVariance) Returns the estimated sample count, required to achieve a given target variance for one computation- Parameters:
lights- the list of light sourcesminPower- the smallest measurable power quantumtargetVariance- the target variance on the smallest measurable power quantum- Returns:
- the estimated number of required samples
-
sampleCountToVariance
Returns the variance for a given sample count for one computation- Parameters:
lights- the list of light sourcesminPower- the smallest measurable power quantumsampleCount- the number of samples- Returns:
- the variance on the smallest measurable power quantum
-
setTargetVariance
public void setTargetVariance(double minPower, double targetVariance) -
setDispersion
public void setDispersion(boolean dispersion) -
setFlatness
public void setFlatness(float flatness) -
getMaxLambda
public int getMaxLambda() -
setLayerVisible
public void setLayerVisible(int layer, boolean visible)
-