-
Notifications
You must be signed in to change notification settings - Fork 0
Setting Attribute Value in Edit Mode
In this example, you will learn how to create an attribute that can be used with Selection Input of the Instance On Points node in Geometry Nodes
This will allow you to select the vertices on which the instances will appear without use of vertex groups.
-
Create a subdivided plane
- Add a plane object and switch to the edit mode.
- Select all vertices and press Right Mouse Button and then select subdivide.
- Repeat the subdivision few times or use Number Of Cuts in the pop-up menu in lower left corner of the 3D View.
-
Add this Geometry Nodes Modifier
- You can use a custom mesh instead of a cube.
- Adjust the scale if the instances are too large
-
Create a new Boolean Vertex Attribute
- Locate the Attributes Menu located in Data tab of the Properties panel, and press the + button
- Set the name to "Selection" (or any other you like), with domain set to Vertex and data type set to Boolean
This attribute will store True/False values for each vertex of the mesh.
-
Add a Named Attribute node to the Geometry Nodes setup
- Add a new node and press the box next to Name input to select new attribute
- Connect the Attribute output to Selection input of Instance On Points Node
- The instances will disappear
-
Switch to edit mode and select the new Attribute
- Select the new Attribute on the list in Attributes Menu
- Under Assign button you will see a tickbox with the attribute value that will be set to selected vertices in edit mode.
-
Select few vertices in edit mode
-
Assign new value to the attribute
- In Attributes Menu make sure the Vertex Boolean Value checkbox is checked
- Press the Assign button to store the True value in selected vertices.
-
Preview the result
- Instances should appear on the vertices holding True value.
- You can also see the values in the spreadsheet tab.
-
Finish!
Select True button will allow you to select vertices holding the True value if those vertices are deselected. You can also deselect them with appropriate button.
To invert the values quickly, use the Invert Attribute operator in the dropdown menu.
You can use this method to
- limit your geometry nodes to specific faces, edges or vertices
- quickly select certain parts of the mesh generated by geometry node setup after the modifier was applied
- modify color attributes of specific face corners
- ...