3
$\begingroup$

I've a geometry nodes tree that creates pipes from mesh edges. To do this I convert the edges to curves and convert them to a pipe by using the curve to mesh node. Additionally I have a fillet function added.

My problem: The source mesh (edges) have already a material assigned. I would like to keep this material and set it to the gn result automatically. But in my example the result looses the existing material and keeps white. How to transfer the material information from the origin edges to the new pipe object without forcing the user to assign it manually?

My tree:

enter image description here

$\endgroup$
1

1 Answer 1

4
$\begingroup$

The first problem is materials can not be assigned to edges. They are per face property, not edges. Edges cannot store information about materials.

But even if you have faces instead of edges, conversion to curve removes material slots, so materials will be lost. But you can use a walkaround like this to get back material slots:

enter image description here

It basically merges geometry with one that have material slots and then delete geometry that we don't need. If you don't have faces, like in your example, you will be able to restore material slots, but not the exact slot that you want to apply (by default it will be the first)

$\endgroup$
1
  • $\begingroup$ Great. This is exactly what I was looking for. Thank you a lot! $\endgroup$ Commented Nov 24, 2023 at 13:45

You must log in to answer this question.

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