7
$\begingroup$

The Screw modifier allows one to revolve a profile curve around an axis to generate geometry. However, there is no such Geometry Node type. Instead, Curve to Mesh is supposed to be a more general solution, accepting generic profile and curve inputs.

A ticket on the blender dev-site even rejects the idea of a "screw node" as something that can be accomplished using existing geometry node types. However, it seems that neither curve-to-mesh, nor any existing geometry node type, can accomplish the axial extrusion that screw accomplishes. Am I missing something?

Specifically, the issue is that curve-to-mesh takes a curve as input, but to emulate the screw function, one would need that curve to be a zero-radius circle, or a zero-length line with non-zero twist. Obviously, this can be worked around by using an extremely small radius (1e-9 seems to work fine) or applying a negative offset to the profile equal to the radius of the curve, but these both feel like hacks and introduce edge cases for certain geometries.

When I try using an actual zero-radius curve, arc, or spiral node, the geometry disappears, with the output vertices having all zeros for one or more axes.

$\endgroup$
1
  • $\begingroup$ If your question has been solved, please be so kind and mark the answer that contributed to the solution as "Accepted answer". This will make it easier for others to see which path leads to the solution, and the question will no longer show as unsolved. Thank you! Here you can find more information: What should I do if someone answers my question?. If you still haven't gotten a solution to your question, please be kind enough to address it. $\endgroup$
    – quellenform
    Oct 8, 2022 at 11:51

4 Answers 4

6
$\begingroup$

Here is an (almost) complete replica of the Screw modifier as a node group:

enter image description here enter image description here

The instructions for this can actually be taken, by and large, from the Blender documentation.

The only differences to the original modifier are:

  • Only curves are processed and no meshes!
  • The axis can be chosen arbitrarily and is not exactly limited to X, Y or Z.
  • The option Stretch UVs has not been implemented (yet).
  • The option Merge works here along the whole axis, even if the value for Screw is greater than $0$ (Is this possibly a bug of the original modifier, because it doesn't work like that there?).
  • Additionally there is the option Fill Caps to close the ends of the extruded profile with a mesh as well (cyclic profile).

Otherwise the thing should work exactly like the original.

The basis of this technique is Curve to Mesh. However, I use this node only to get the mesh.

The individual points of the mesh are then manually rotated around a certain axis and center point and shifted in height (if Screw is greater than $0$).


Here is the test file where I transferred the settings of the one object with Drivers to the Geometry Nodes:

enter image description here


(Blender 3.2)

On a personal note:

The solution presented here is an excerpt from an even more elaborate solution that is available in the Blender Market and can also process UVs, just as the modifier does.

Open source may be all well and good, but development costs time and money. With your contribution you support new features and further updates. Thank you!

Get the full version here: Screw [Replica]

$\endgroup$
3
$\begingroup$

Is that are you looking for? I think it is easy to rotate points depending on curve factor:

enter image description here

$\endgroup$
3
$\begingroup$

One of the advantages of the Screw modifier is that, with adjustment, it can give nice clean topology on a helix, with parallel subdivisions along the twist-axis, and relatively clean quads.

Here's a GN version of Screw, aimed at that advantage:

enter image description here

In this state, it modifies a profile mesh, radius along X, height along Y. It will generate a screw up Z, around the profile's object origin. The orientations could be made more intuitive, but that would mean a few more nodes.

  • It extrudes the profile along a convenient length, tau (2*pi) per turn.
  • The extrusion is subdivided by 'Segments' per turn
  • The X and Y of the extrusion are converted to polar coordinates, to wrap it round a circle.
  • It sets the height per requested turn of the helix to that of the profile, so the whole lot welds cleanly.

enter image description here

It's an (ahem) 'exercise for the reader' to wrangle the interface to taste.

$\endgroup$
2
$\begingroup$

Making geometry with Curve to Mesh is a different thing than what screw modifier does. If you make a curve with a profile, the geometry is extruded along the curve, while screw extrudes geometry and then rotates and transforms the extruded bit. With screw modifier geometry can intersect itself in different way:

enter image description here

So, I am no expert in GN, but you probably need to extrude geometry. It might look something like this:

enter image description here

There is no way of looping in geometry nodes yet as far as I know and you need many iterations for screw modifier so the only way I can think of is making a group and duplicating it... Not elegant at all:

enter image description here

Let's hope they add some sort of looping functionality in the future.

My recommendation would be to use the screw modifier outside geometry nodes and use it's result.

$\endgroup$

You must log in to answer this question.

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