vrdDisplacement¶
-
class
vrdDisplacement
¶
(Inherits vrdSceneObject
)
This class is used for displacement settings of MaterialX and MDL materials.
The vrdDisplacement object is stored as a dynamic property (see also vrdMDLProperties, vrdMaterialXProperties) and can be queried like this:
# Query an MDL material by name
mdlMat = vrMaterialService.findMaterial("MaterialName")
# Query the dynamic properties
properties = mdlMat.getProperties()
object = PySide6.QtCore.QObject()
properties.update(object)
# Get the displacement object
displacement = object.property("__vred_displacement")
print(displacement.getBuildPrecision())
Summary¶
Functions¶
-
vrdDisplacement.
getBuildPrecision
()¶ Gets the build precision in scene units.
Returns: Current used value for the build precision Return type: float
-
vrdDisplacement.
getIntersectionPrecision
()¶ Gets the intersection precision in scene units.
Returns: Current used value for the intersection precision Return type: float
-
vrdDisplacement.
getSilhouetteMode
()¶ Gets OpenGL silhouette mode.
Returns: Current used silhouette mode mode Return type: vrdDisplacement.SilhouetteMode
-
vrdDisplacement.
getValueLimit
()¶ Gets the set limit of displacement values in scene units.
Returns: Current used limit of displacement values Return type: QVector2D
-
vrdDisplacement.
setBuildPrecision
(value)¶ Sets the precision in scene units for evaluating the displacement function during acceleration structure build in raytracing modes. Smaller values evaluate the displacement functions more accurately but will slow down acceleration structure build. Higher values will result in faster acceleration structure builds but might cause missing peaks if the displacement map frequency is too high.
Parameters: value (float) – New value for the build precision
-
vrdDisplacement.
setIntersectionPrecision
(value)¶ Sets the precision in scene units for evaluating the displacement function during intersection calculations. Smaller values will take more samples during intersection and therefore result in slower tracing performance Higher values will increase tracing performance but may miss intersections if the displacement map frequency is too high.
Parameters: value (float) – New value for the intersection precision
-
vrdDisplacement.
setSilhouetteMode
(mode)¶ Sets OpenGL silhouette mode.
Parameters: mode (vrdDisplacement.SilhouetteMode) – New silhouette mode mode
-
vrdDisplacement.
setValueLimit
(range)¶ Sets the limit of values in the displacement function in scene units for OpenGL. The range must but large enough to cover all possible values in the displacement function.
Parameters: range (QVector2D) – New value for the value limit for displacement values