B3.2: user attributes on edges

Hi all :smiley:

I come here with a question on a blender feature that i didn’t manage to use:
The user attributes.
In the mesh tab, there’s an ATTRIBUTES panel where you can create a named list about parts ( verts, edges, faces, etc… ) of the mesh.

Lemme show you a screen:

I’m using an absolutely wonderfull geonode from @sozap ( :wink: ) you can get here: B3.2: Broken arches modeling
This lil jewel is able to create an arch over every segment ( edge ) of a mesh.

What i want is to ponderate every edge with a value that will be used in the geonodes.
I created a attribute list ( in the middle of the pic ) in wich i should be able to setup a float value on each edge.

My problem is: where should i set those per edge values ?

Could anyone help me on this please ? I’m pretty sure it is damn straightforward but i cannot find any clue on it :confused:

Thanks for your help and happy blending !

I have some bad news for you… Those Attributes are only for export conversion. I think there are plans to make them exposed in Edit Mode in the future, but for now they are only useful when converting an applied Geometry Node modifier for export.

The only Edge Attribute that I know of which is exposed to GN in 3.2 (and latest nightly build even) is Edge Crease:


… here I’m using edge crease to write to a custom attribute called “Test”. Its currently the only way I know of to get edge data into a GN network (and I hope someone can correct me, cos it’s been bugging me too).

Sorry for unsatisfactory answer.

2 Likes

I think I have good news !

in edit mode do F3 and look for Set Attribute !
TBH I didn’t test it so it might not work but in theory that should allows you to do what you’re looking for.

BTW it uses the active attribute !

2 Likes

Yay! Glad to be corrected… That’s definitely a function that’s getting a shortcut!

Would be nice if they had their own section/tab in the N menu.

2 Likes

I just checked it works :

I’m using 3.6 but I think it’s available in 3.5

3 Likes

So edge crease would still be a work-around for 3.2 :crossed_fingers:

2 Likes

Sure !
From what I saw in the commit log is that’s a first temporary working solution to allow basic work with attribute.

But I’m pretty sure this is going to be improved eventually with a better design.

2 Likes

Good catch ! I didn’t even noticed it ! It’s probably not going to work in 3.2
@pitibonom why not upgrade blender to a new version ?

2 Likes

hi @sozap and @zeroskilz :smiley:

And thanks for your answers.

Btw you are both right. Hopefully i found a B3.5 version able to run on win7 and gave the set attribute ( that don’t exist in B3.2 :open_mouth: ) a try.

It works like a charm but i have so many things to test and validate before i move to B3.5 that i’ll delay it a bit.

Isn’t there a way to do what you say @sozap with a small python func ? I believe it is doable and since i already have a big piece of code for my carcassonne project helpers, i could easily add a couple of props for setting a per edge attribute value^^

Do you know the way of doing this in 3.2 ?
I’ll search for this on my side and be back soon :wink:
As if i find a solution it could be usefull for all 3.2 users not ready to migrate to 3.5…

Happy blending !

1 Like

Hello !

Well, I’m pretty sure it’s doable but I didn’t look into that myself, so unless I start to write the code I can’t tell you much more …
Since UV are attributes now (already in 3.2 ?) , maybe looking into how addons write them could be a first step ?

Personally I’ll invest that time into upgrading, which you’ll probably want to do at some point anyway.

Good luck !

1 Like

I gave a try with B3.5 but it appears it don’t work for grabbing attribute value in GN :frowning:

Here’s the blend ( the one you posted, plus my attemps to use attributes.

test_voutes_dontwork.blend (3.7 MB)

Also, routing the attribute value to sweep angle generates an error :frowning:

Also-also, creating attributes with 2DVector type seems not to be readable in nodes…

What am i doing wrong ?

Thanks and happy blending ! :smiley:

try this :

Okay :smiley:

I’m obviously not comfortable enough in geonodes to understand why this works with scale but not with the arch generator group… :confused:

But indeed, it also works in 3.2 !

The only missing thing is a lil script to set the CV value for edges. The strange thing is that in RNA viewer, the CV for each edge is visible ONLY in object mode. As soon as i go in edit mode, the list disappears ! :open_mouth:
Probably one blender behaviour i did not understand yet :confused:

At last but not least @sozap, would you have an idea for parameterizing ( also through attributes ) the sweep angle of the arch generator for each edge ? :smiley:

Thanks and happy blending !

1 Like

Yeah it’s a bit confusing ! But basically the group is acting like a add mesh node.
If you add a icosphere node, we agree that it’s radius can’t be 2 and 1 at the same time, it’s a fixed value. Or something like the resolution need to be a fixed value too.

That’s why it doesn’t work : we create one arch and that arch is then instanced multiple times.
And at this stage it’s possible to give each instance of the arch a different scale.

But the original one can’t be of size 1 and 2 at the same time, obviously :slight_smile:

For the same reasons, changing the angle won’t work with this setup.
You need to add several node for each angle you want, or create the arches differently in a way that allows different angles.
Probably possible but likely to be much more difficult.

Hope that helps !

2 Likes

I understand how much i’m dumb when it’s about geonodes :rofl:

I gonna try to explain what i think i’ve understood:
In your nodes, to separate every edge and convert edges to points at their center. This point is the origin of an instance ( here an arc ). If instances are created only once and not on a ‘per-point’ basis, i can understand that arcs cannot be different for each point.
But…
if i create 2 arcs; 1 with sweep angle of 90° and the second one with sweep angle of 45°, both are created once and then i should be able to switch between them, according to a boolean defined by ( for example ) edge crease ( crease <= 0,5 gives true else false )

This simply don’t work :confused: I’m obviously missing something but i don’t see what. This selection switch still don’t work when you replace both groups by a cube and a sphere primitive…

Nope.
image
Note that in Geometry mode the input is a Constant (the circular plug), and not a Field (prism plug)… like in some other modes:
image

So that’s not gonna work.

The solution is to use the Instance Index instead.

2 Likes

:scream:

I didn’t know about this input shape characteristic Thanks a lot @zeroskilz :smiley:

Now i have a stupid question :confused: :smiley:
what is the use of a boolean input ( here the switch input ) if its change is forbidden ?

Top-level shenanigans:

2 Likes

well that depends, but the use is indeed much more limited !

I use it a lot to switch between a preview version and a final,

Final :

Preview:

Internally the Preview boollean is plugged into different Switch / Geometry.

but it would be impossible to make like half the house preview, and the other final with this setup.

3 Likes

Yeah, and for use with things like this node:
image

So like in Sozap’s example you can pick a low-poly for viewport but hight poly for render.

2 Likes