6
$\begingroup$

All pre Blender 3.0 tutorials use Fill Attribute node for setting an attribute like sharp. Many attributes are now set in a different way, for example there's a dedicated node to set smooth shading. However, I couldn't find anything for edge sharpness.

Let's say I want to add a geometry nodes setup for the starting cube:

Which should mark 4 edges of the cube sharp and crease them

Which would allow me to add Subdivision Surface and Split Edges modifiers to get a bullet shape:

I'm actually after something more complex than a bullet shape but still I have no idea how to set named attributes in Blender 3.0...

So what should be inside Set Sharp and Set Crease custom nodes so the setup works?

$\endgroup$

2 Answers 2

9
$\begingroup$

Setting Edge sharpness

This post is a third in the series of:

How do I use an existing modifier to create a bridge between geometry nodes and a property the geonodes setups can't access?

  1. Assign vertex group in Geometry Nodes (v3.3)
  2. How to apply Geometry Nodes with UV maps?
  3. This technique.

This time rather than splitting edges, storing their positions, moving each near a sharp or normal edge, transferring data by positions, restoring positions and merging by distance (where information on split edges would be lost, as it is in the UV technique), I decided to transfer by topology:

  1. Take object named Main, duplicate it as Main.stage.2 (⎇ AltD is fine, Mesh data doesn't need to be duplicated) and disable Main visibility (at least for renders) as it's just a first stage that's not supposed to be visible anymore.

  2. Create a custom group Sharp Mapping, which checks runs through provided edges, and for each either creates a plain simple edge, or imports the sharp edge provided as an object wrapper:

  1. Obviously you need to create the abovementioned sharp edge wrapper: just create a new cube primitive, delete all edges but one, select the remaining edge, right click, Mark Sharp. Name the object Sharp Edge.

  2. Add a new geonodes modifier to Main object to store the edge sharpness information using the Sharp Mapping node. For example, if you want to set all "horizontal" edges sharp:

  1. Remember to link the Sharp Edge object in the geonodes modifier, as well as an attribute name (any available name will work):

  1. Finally, add Data Transfer modifier to the Main.stage.2 object; non-default settings marked yellow:

$\endgroup$
0
4
$\begingroup$

Crease (Blender 3+)

Defining the Crease output in the modifier stack to be a crease attribute sets the crease. However this doesn't work by defining Sharp as sharp or sharpness attribute…

Also, the crease attribute exists at the beginning, which can be seen in the spreadsheet. sharp doesn't…

The specific situation described in my question could be solved entirely by geonoodles:

Sharp - Blender 4

I'm leaving the old answer for old Blender versions and to present the technique for other properties like this recent question:

Is setting the freestyle edge parameter via geonodes possible?

However currently the "Set Shade Smooth" node supports both "Face" and "Edge" mode, allowing you to dynamically set edge sharpness:

$\endgroup$

You must log in to answer this question.

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