Geometry Modifier (RealityKit)
A function that manipulates the location of a model’s vertices, run once per vertex.
Parameter Types
Parameter descriptions
Model Position OffsetThe offset to each vertices model position.
ColorThe color of each vertex.
NormalThe normal vector for each vertex.
BitangentThe bitangent vector for each vertex.
Uv0A set of texture coordinates for each vertex.
Uv1A set of texture coordinates for each vertex.
User AttributeA user-defined attribute to apply to each vertex of the object.
User Attribute Half4 0A user-defined attribute the node attaches to each vertex of the object.
User Attribute Half4 1A user-defined attribute the node attaches to each vertex of the object.
User Attribute Half4 2A user-defined attribute the node attaches to each vertex of the object.
User Attribute Half4 3A user-defined attribute the node attaches to each vertex of the object.
User Attribute Half2 0A user-defined attribute the node attaches to each vertex of the object.
User Attribute Half2 1A user-defined attribute the node attaches to each vertex of the object.
Discussion
The Geometry Modifier node can be used to cause a material to affect the geometry of any object to which it’s applied, in addition to the objects texture. Connect the output of the Geometry modifier node to the Custom Geometry Modifier output of your material. Below is an example of a simple node graph that uses the Geometry Modifier node to alter the Y model positions of vertices.
[Image]
Use the Noise 2D node to procedurally generate an amount to offset the Y position of each vertex. You can also use the noise to add shadows to the texture in order to show the change in model position more clearly. Below, the resulting material applies to a plane.
See Also
Nodes
Unlit Surface (RealityKit)PBR Surface (RealityKit)Occlusion Surface (RealityKit)Shadow Receiving Occlusion Surface (RealityKit)View Direction (RealityKit)Camera Position (RealityKit)Geometry Modifier Model To World (RealityKit)Geometry Modifier World To Model (RealityKit)Geometry Modifier Normal To World (RealityKit)Geometry Modifier Model To View (RealityKit)Geometry Modifier View To Projection (RealityKit)Geometry Modifier Projection To View (RealityKit)Geometry Modifier Vertex ID (RealityKit)Surface Model To World (RealityKit)Surface Model To View (RealityKit)