3
$\begingroup$

How do I use the "Attributes" that I can create in a mesh object?

I'm able to create an attribute that is associated with a mesh, and I can assign it to a domain (i.e. vertex, Face, etc). It shows up in the spreadsheet viewer. But how do I change the values for each vertex? I need to be able to assign the values, otherwise this is useless to me. It's just a bunch of zeroes.

enter image description here

enter image description here

$\endgroup$

3 Answers 3

3
$\begingroup$

Enable MeasureIt and vertex indices visibility:

Add a new object, name it attribute setter, and add a new geonodes setup to it. Drag the object of choice from outliner to the node tree:

And apply this geonodes modifier.

💡 If you want to edit attributes of vertices, you can skip the above step and just duplicate my object and rename it to attribute setter

Add shape keys, set the 2nd shape key to have full effect:

Now you can use the base shape key to easily find and select a vertex you want to modify, then move to the other shape key and assign the Vector values as vertex location:

Finally you can go back to your object my object, and add a geonodes setup transferring that data:

You can apply that geonodes modifier, or leave it dynamically linking the data.

$\endgroup$
6
  • $\begingroup$ 🤔 ...a little unwieldy, but an interesting approach $\endgroup$
    – quellenform
    Oct 30, 2022 at 0:44
  • $\begingroup$ @quellenform this seems like the most reasonable storage of data - obviously editing is unwieldy for multiple vertices and for that I'd use Python… You could avoid using shape keys and just store as 3 vertex groups, but problem is then it becomes incompatible with the workflow in the video… $\endgroup$ Oct 30, 2022 at 0:53
  • $\begingroup$ @quellenform also, You're from Europe, it's time to sleep 😴 $\endgroup$ Oct 30, 2022 at 0:56
  • $\begingroup$ a very hacky approach which I will almost certainly forget by the next time I need this - but very smart. It solved my immediate problem, thank you. In my case, I didn't need to re-generate the mesh using your first set of geo-nodes and the shape-key business, because my mesh was static. But for a mesh that may change, I can see the utility. In my case, I just duplicated the object and started moving vertices. Thank you! $\endgroup$
    – rothloup
    Nov 2, 2022 at 2:17
  • $\begingroup$ @rothloup I disagree about it being hacky [I'm not getting emotional, just arguing]: as I linked above this is not a new technique, in fact I also mentioned using separate geometry to store data in this thread – it's just a solution that comes naturally. Shape keys are added so you can easily find vertices, especially those very far from origin or those that overlap with other vertices. $\endgroup$ Nov 2, 2022 at 9:15
4
$\begingroup$

The official documentation says: "Vertex groups, UV maps and Color Attributes are available as attributes in geometry nodes."

This means: Currently you can only process custom color attributes in geometry nodes.


Just create a new attribute and select the data type Byte color.

You can then change these attributes in the Vertex Paint mode by coloring the vertices:

enter image description here

The advantage of a color, however, is that it also consists of four float values (RGBA), which can be handy depending on the application:

enter image description here

$\endgroup$
2
  • $\begingroup$ ok, so this gets me half of what I need. I can now influence the values. But two issues: 1) I can't set the values to what I want. If I set my brush to 100%, no falloff, Mix mode, and RGB = [0.5, 1, 0] the target vertex gets a value of [0.212, 1, 0]. I think this has to do with RGB encoding but I don't know. How do I just set the number to what I want? and 2) I really want to use a vector, not RGB, so I can use values >1. $\endgroup$
    – rothloup
    Oct 29, 2022 at 15:52
  • $\begingroup$ @rothloup Yes, this is actually related to the color processing mode. But unfortunately there is (currently) no other answer, because with individual attributes only color values in combination with Geometry Nodes are possible. The only way I know is to set attributes with Python: blender.stackexchange.com/questions/266991 $\endgroup$
    – quellenform
    Oct 29, 2022 at 16:02
2
$\begingroup$

New proper solution since Blender 3.5

This is the way now:

Edit Mode > Mesh > Set Attribute

https://docs.blender.org/manual/en/latest/modeling/meshes/editing/mesh/set_attribute.html

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .