GVRAmbientOcclusion¶
-
MacroModule
¶ author MeVis Medical Solutions AG
package MeVisLab/Standard
definition GVRAmbientOcclusion.def keywords shadow
Purpose¶
The GVRAmbientOcclusion
module adds support for local ambient occlusion to the SoGVRVolumeRenderer
.
It generates a 3D ambient occlusion volume and requires the SoGVRRayCastSettings
module to be used,
since the ambient occlusion generation requires access to the entire volume.
The ambient occlusion volume is regenerated whenever the LUTs of the GVR change, but you can trigger a manual update using the Regenerate
field.
Usage¶
See the example network for a typical usage.
Parameter Fields¶
Field Index¶
Blend Factor : Float |
Clip Plane Fade : Float |
Directions : Enum |
Gradient Weight : Float |
Offset : Float |
Regenerate : Trigger |
Steps : Integer |
Use Half Resolution : Bool |
Visible Fields¶
Use Half Resolution¶
-
name:
useHalfResolution
, type:
Bool
, default:
FALSE
¶ If checked, the module uses half the resolution for the ambient occlusion volume, which is a trade-off between quality and memory consumption/update speed.
Offset¶
-
name:
offset
, type:
Float
, default:
2
, minimum:
1
¶ Sets the initial offset of each ambient occlusion ray from the center of each voxel.
Steps¶
-
name:
steps
, type:
Integer
, default:
16
, minimum:
1
¶ Sets the number of sample steps for each ray. A larger value generates occlusion from voxels that are farther away.
Directions¶
-
name:
directions
, type:
Enum
, default:
18
¶ Defines the number of ray directions to sample for each voxel.
Values:
Title | Name |
---|---|
6 | 6 |
18 | 18 |
Gradient Weight¶
-
name:
gradientWeight
, type:
Float
, default:
0.5
, minimum:
0
, maximum:
1
¶ Sets a factor that weights the occlusion contribution of each ray by the dot product of the gradient and the direction.
A value of 1.0 means full dependence on the gradient, and a value of 0.0 means no gradient influence.
- Implementation::
- float weight = mix(1., max(0, dot(-gradient, ray_direction)), ambientOcclusionGradientWeight);
Clip Plane Fade¶
-
name:
clipPlaneFade
, type:
Float
, default:
10
, minimum:
0
¶ Sets a factor that fades the ambient occlusion up to the given distance (in millimeters) to all clip planes.