| status | stable |
| author | Florian Link |
| package | MeVisLab/Standard |
| dll | SoGVR |
| definition | soGVR.def |
| see also | SoGVRVolumeRenderer |
| keywords | GVR, shader, pipeline |
The SoGVRPointLight adds a point light to the SoGVRVolumeRenderer. The light has a diffuse and specular intensity and uses the material properties (specularity etc.) as specified in the volume renderer. It supports different attenuation modes to model how far the light reaches, which is turned off by default.
Any number of SoGVRPointLight modules can be placed in front of a SoGVRVolumeRenderer. Note that each light needs to have a unique Name in the same Inventor scene, so you should name the lights according to their role, e.g. headlight or highlight1.
The attenuation mode can be used to either highlight just a specific region, or to improve depth perception by adding attenuation to a headlight, e.g. for endoscopic rendering.
The light Position can be specified in world coordinates (to highlight special features of a dataset) or in eye/camera coordinates to attach the light to the camera (for a headlight).
Examples showing the same point light for the different attenuation modes, the light position is shown as a sphere.
a node that should be placed in front of a SoGVRVolumeRenderer.
| Attenuation Mode: Enum | Percentage: Float |
| Color: Color | Position: Vector3 |
| Coordinate System: Enum | Specular Intensity: Float |
| Diffuse Intensity: Float | useForFirstHit: Bool |
| Enabled: Bool | Zero Intensity Distance: Float |
| Full Intensity Distance: Float | |
| Half Intensity Distance: Float | |
| Name: String |
Specifies the name of the light, the name needs to be unique in the same Inventor scene.
Defines the coordinate system in which the light Position is specified.
Values:
| Title | Name |
|---|---|
| World Coordinates | WorldCoordinates |
| Eye Coordinates | EyeCoordinates |
Specifies the diffuse intensity of the light.
Specifies the specular intensity of the light.
Specifies how the light intensity is attenuated by the distance to the light position.
Values:
| Title | Name | Description |
|---|---|---|
| Off | ATTENUATION_OFF | No attenuation. |
| Linear Quadratic | ATTENUATION_LINEAR_QUADRATIC | A mix of linear and quadratic attenuation, specified by Percentage and Half Intensity Distance. linearFactor = (attenuationPercentage<50.f) ? attenuationPercentage/50 : (100-attenuationPercentage)/50; quadraticFactor = (attenuationPercentage<50.f) ? 0 : 1. - linearFactor linearAttenuation = attenuationHalfIntensityDistance / (attenuationHalfIntensityDistance + linearFactor * distanceToLight) quadraticAttenuation = attenuationHalfIntensityDistance2 / (attenuationHalfIntensityDistance2 + quadraticFactor * distanceToLight) attenuation = linearAttenuation * quadraticAttenuation |
| Spherical | ATTENUATION_SPHERICAL | A spherical attenuation, specified by Full Intensity Distance and Zero Intensity Distance: attenuation = 1. - smoothstep(attenuationFullIntensityDistance, attenuationZeroIntensityDistance, distanceToLight) |
Defines the percentage of attenuation in linear/quadratic mode.
| Percentage | Description |
|---|---|
| 0% | No attenuation |
| 0% - 50% | 0 to 100% linear attenuation |
| 50% | full linear attenuation |
| 50%-100% | mixes linear attenuation with quadratic attenuation |
| 100% | full quadratic attenuation |
Defines the approximate distance in mm at which the light has half its intensity. (Only if Attenuation Mode is set to "Linear Quadratic" attenuation.
Defines the distance in mm up to which the light keeps its full intensity. (Only if Attenuation Mode is set to "Spherical" attenuation.
Defines the distance in mm up to which the light falls off to zero, using hermite interpolation. (Only if Attenuation Mode is set to "Spherical" attenuation.