3
$\begingroup$

I am selecting edgeloops with Geometry Nodes based on index and the Preview node shows me the expected behavior, it marks the two loops I'm aiming for.

enter image description here

However, now I want to set those two edge loops as sharp, by inputting the selection into the Set Shade Smooth node. It does not behave how I would expect it to. Previewing the smoothness of the mesh gives me this result.

enter image description here

Is this because I am selecting vertex but the Set Shade Smooth node is expecting edges?

This is the look I am aiming for. enter image description here

$\endgroup$
1
  • $\begingroup$ it's best to share the blend file so it's easier for us to solve it for you rather trying to manually recreate the node setup ourselves. blend-exchange.com $\endgroup$
    – Harry McKenzie
    Commented May 15 at 6:52

2 Answers 2

6
$\begingroup$

I don't know if this is intended behaviour or a bug, but what I have noticed recently (never noticed it previously because I usually use the node to smooth faces, not edges) and so I don't even know if this is an answer to your problem without being able to test it on your object.

At least I hope this might help others who experience problems using the Set Shade Smooth node. The thing is, no matter if you have set the object to Shade Smooth or Shade Flat in Object Mode originally, you can overwrite this setting in Geometry Nodes with the Set Shade Smooth node by enabling or disabling Shade Smooth.

However, this only works if you have set the node to Faces. When (like in your case) it is set to Edges, the smoothing will not work if you have chosen Shade Flat in Object Mode (which is the default if you do not change it).

Which means you can only use the Set Shade Smooth node to create sharp edges by disabling smoothness for them if the faces are set to be shaded smooth.

Here is an example: I have an object where I want to sharpen all edges with an angle > 1.3, so like in your example I try to use a Set Shade Smooth node with the Shade Smooth option disabled. Since I want the angles with higher values sharpened, I use a Greater Than node to get all angles > 1.3 and plug the result in the Selection. The object itself is in the default state of being shaded flat in Object Mode.

Since nothing is shaded smooth originally, setting certain edges to "not smooth" does not change anything, since everything is already shaded flat:

shaded flat

And even when I unplug the selection and enable Shade Smooth, the object is still shaded flat, because the node is set to Edges, but smoothing the edges while the faces are flat does not give smooth shading:

no smooth faces

Switching the node to Faces however makes the object look smooth, because the Faces mode changes the setting given in Object Mode:

smooth face overwrite

So to get the sharp edges you can do one of the following things:

  1. Set the object to Shade Smmoth in Object Mode. If you then disable Shade Smooth for the selected edges, they will appear sharp:

    shaded smooth in object mode

  2. Or, if you do not want to change it in Object Mode, or make sure it is smooth no matter which setting in Object Mode or, most important, if you use it on a mesh generated within Geometry Nodes which you cannot shade smooth in Object Mode, then you can simply use a second Set Shade Smooth node set to Faces with Shade Smooth enabled and place it before the Edges node:

    doubled set shade smooth node

$\endgroup$
2
  • 1
    $\begingroup$ Thanks that is good to know I implemented it in that order. $\endgroup$
    – STRGnine
    Commented May 17 at 17:37
  • $\begingroup$ @STRnine You're welcome. Later after finishing my answer I realized that this behaviour is not really a bug, because it is actually consistent with the behaviour out of Geometry Nodes. There marking an edge sharp also has no real effect on the shading if you did not shade the object smooth before, so it is only logical that disabling Set Shade Smooth on edges does not really have a noticeable effect by itself. $\endgroup$ Commented May 18 at 7:49
1
$\begingroup$

So I have investigated more & it is because I am getting vertex indecies, while the set shade smooth is looking for edge indecies. In my case f.e. the edge between vertex 0 & 16 has an index of 0 and between 16 & 32 an index of 1. I was able to see this in the spreadshead window. enter image description here

However if I take this selection from index & plug it into the "Set Shade Smooth" Node and see which edges are being marked as sharp in the spreadsheet window. It will take every 16th edge. enter image description here

I mean it is logical and is probably on purpose, it was just not clear, that the viewnode shows the vertex indecies & there is no conversion/transfer from vertex indecies to edge indecies.

However knowing that I was able to select the loops. Here is an example for those interested. My topology is 16x72, 72 is the amount of edges of my circle and the order of the idexes is 0 to 71 for the first loop.

Take two compare nodes, one where you compare the index to bigger 0 and the other to less 71. That's your range. Build in a multiply that enables me to select any edge loops out of the 16 that go along the mesh. enter image description here

$\endgroup$
1
  • $\begingroup$ Yeah, maybe someone else could have provided an answer for you if you would have kindly uploaded your file as Harry suggested, because having us building some tyre of our own and hoping the geometry would have the same properties like yours to investigate the issue was not very likely. $\endgroup$ Commented May 18 at 7:52

You must log in to answer this question.

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