Geometry Nodes: Convert curve to mesh to work with skin modifier

Hello,

I have a mesh made of edges to work with the skin modifier.
Before the skin modifier, I first would to “run” it through a Geometry Nodes modifier.

So inside the Geometry Nodes setup it should:

  1. convert it to a curve
  2. do some math to generate an attribute, which I can use in the shader
  3. convert it back to a mesh, so it can be used with the skin modifier

Step 2 is not in the screenshot and is not important for now.

The problem is step 3, that I don’t know how to convert it back to a mesh that works with the skin modifier. ( A “curve to mesh” node wont work for this. )

This is what I have now. Please help.

Why not skip step 1 and set the attribute directly on the mesh instead of converting back and forth?

Unfortunately it appears that the skin modifier does not work with Geometry Nodes. It has come up on the internet elsewhere.

Therefore attributes don’t propagate when adding the skin modifier, and if you do any mesh conversion operations (mesh to curve, curve to mesh etc.) the skin modifier won’t work at all.

Your best bet might be to add attributes to the mesh after the skin modifier, or use some sort of transfer attribute setup to get attributes from the original mesh to the skinned one.

What are you trying to achieve exactly?

Just to be sure, the skin modifier comes after the geometry nodes modifier.
So I am not trying re-create the skin modifier with geometry nodes.

The problem is that the GN for now outputs the mesh as vertecies.
So I need a way to add edges between these vertecies. Then the skin modifier might work.

The first screenshot was in edit mode, so there the edges where visible.
But they “disappear” in object mode offcourse as seen in the screenshot below.

I added the generate attribute label. But please ignore that for now because I first need the skin modifier to work before I can check if it actually works and gives the result I want.

As I understand, it’ll only work if you don’t regenerate mesh.
In other words, you need to output the same mesh, that you input. But between that you can store attributes on it, for example, by sampling them from another node tree branch.

However, it looks like it won’t help either way, because Skin modifier won’t inherit any attributes. Perhaps it’s because it generates a completely new clean mesh…

I can understand needing to convert to curve to get the length, Why are you converting to points? and then to vertices?

Also, you aren’t feeding anything into your attribute statistic node, so that’s all outputting bad data.

I haven’t read through everything so forgive me if this misses the point, but if the goal is to work on top of the skin modifier, maybe you can have both (geonodes mesh & skin mesh), and set the first one to sample the attributes you need from the second one

The problem is that the skin modifier depends on an implicit attribute, inaccessible to other tools except the Python API. This would require a script to copy the Skin radius to a named attribute, subsequently modifying it within Geo nodes, and then writing the change back to the Skin modifier radius. This will be a convoluted process.

Also instead of converting the curve to points, simply convert it to a mesh without a profile, that should provide the edges required for the skin modifier. However, converting the original mesh to a curve and then back to an edge mesh will eliminate the original Skin modifier radius attribute.

I would suggest trying Sverchok or Animation Nodes because you can access the API attributes directly in those tools.

Ah, riiiiiight…

Why do I get an error in the screenshot below?
The problem is with the Index node.
In the top Sample Index node it’s plugged in and I get the error.
The bottom one use just and integer and works.

I also tried it without the Capture Attribute node and plug the Index node directly into Sample Index but that also wont work.

I am not sure if this will work, and that I actually need this but I also just like to learn things as I’m new to geometry nodes

So… You didn’t read any of the responses? Any particular reason?

Hello. Start here.

Tut here.

You are unlucky that you picked such a troublesome topic to start your GN journey.

Due to issues outlined by others, this is pretty much what ppl are resorting to…


… and why I wish for 2D profile scale and more generic Skin-modifier style keyboard-mouse shortcuts to affect x and y “radius”… maybe one day :cry:

Good luck.