Shape: Pointiness

From LuxCoreRender Wiki
Jump to navigation Jump to search

Shape: Pointiness

SDL properties

Contains surface curvature information in vertex alpha channel.
You can access this information in materials via a hitpointalpha texture.
The values range from -1 to 1 (float).
Values from -1 to 0 are concave, while values from 0 to 1 are convex.

Example: Convex

scene.textures.curvature_orig.type = hitpointalpha
##
# Work only on convex side
scene.textures.curvature.type = clamp
scene.textures.curvature.texture = curvature_orig
scene.textures.curvature.min = 0.0
scene.textures.curvature.max = 1.0

Pointiness convex.jpg

Example: Concave

scene.textures.curvature_orig.type = hitpointalpha
##
# Work only on concave side
scene.textures.flipped_curvature.type = scale
scene.textures.flipped_curvature.texture1 = curvature_orig
scene.textures.flipped_curvature.texture2 = -1.0
scene.textures.curvature.type = clamp
scene.textures.curvature.texture = flipped_curvature
scene.textures.curvature.min = 0.0
scene.textures.curvature.max = 1.0

Pointiness concave.jpg

Example: Both

scene.textures.curvature_orig.type = hitpointalpha
##
# Work on both
scene.textures.curvature.type = abs
scene.textures.curvature.texture = curvature_orig

Pointiness both.jpg