02_user_tutorials:20_light:01_first_steps:10_sensor
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| 02_user_tutorials:20_light:01_first_steps:10_sensor [2025/12/10 17:37] – removed - external edit (Unknown date) 127.0.0.1 | 02_user_tutorials:20_light:01_first_steps:10_sensor [2025/12/10 17:37] (current) – ↷ Page moved from 02_user_tutorials:20_light:10_sensor to 02_user_tutorials:20_light:01_first_steps:10_sensor gaetan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Sensors ===== | ||
| + | Sensors or sensor nodes are invisible objects that can be used to monitor light distributions with a scene without interfering with the rest of the scene or the light modelling. For this, GroIMP provides the // | ||
| + | |||
| + | Note: The size of the sensor node directly correlates with the probability of got hit by a light ray. For a very small sphere the probability to got hit by a light ray is relatively low, so the number of light rays simulated by the light model needs to be much larger to get repayable results. Therefore, better not to use very small sensor nodes. | ||
| + | |||
| + | Note: The colour of the sensor node determines which wavelengths should be monitored. The default value is white, what stands for ' | ||
| + | |||
| + | Note: The output of a sensor node is normalized to absorbed radiance per square meter, independent of the actual size of the sensor. | ||
| + | |||
| + | Note: Sensor nodes can be enabled and disabled for the light model using the // | ||
| + | |||
| + | Below an (incomplete) example for the spectral GPUFlux light model: | ||
| + | |||
| + | <code java> | ||
| + | import de.grogra.gpuflux.scene.experiment.Measurement; | ||
| + | |||
| + | // create a 5cm, white sensor node | ||
| + | Axiom ==> SensorNode().(setRadius(0.05), | ||
| + | |||
| + | const FluxLightModel GPU_LM = new FluxLightModel(RAYS, | ||
| + | // enable dispersion | ||
| + | GPU_LM.setEnableSensors(true); | ||
| + | |||
| + | //check what the sensor node has sensed | ||
| + | x: | ||
| + | Measurement spectrum = GPU_LM.getSensedIrradianceMeasurement(x); | ||
| + | float absorbedPower = spectrum.integrate(); | ||
| + | ... | ||
| + | } | ||
| + | </ | ||
