Mapping Image Texture to extruded curve. Possible?

I created a new file, made a simple curve, appended my file with your GN and then used my test image as the input. This is what I’m getting. There must be some basic thing I’m missing. Since 3.5 I’m not sure if it’s relevant anymore or not, but for what it’s worth I am in Cycles.


image

Looks like you are missing a node image info, check yr version of Blender.

3.5 and higher I believe.

Yeah I was on 3.4. I’ve updated to 3.5 now and I’m not missing the Image Info node anymore, however I’m still not getting an image mapped onto the curve. But, I do see your curve, and I see how the extrusion is lengthening based on the UV…and that is DOPE! So what bone headed thing am I doing that’s keeping all this from applying?
CurveToUVDims-test.blend (1.7 MB)

You are missing a couple of things.

You need to add the UVs to your material with and attribute node. (and type PhotoUVs into the “name” box)

You have to make the geometry node “single user” by clicking the on number of users.

You also have to select your material in the material input of the geometry node.

I just get pink because I do not have your test image (it is not Packed in the file.)

Sorry I forgot the Image info node was a new one.

It will work in both cycles and Eevee.

EDIT

Very important DO NOT extrude your curve. The GN node will do that for you.
Your curve is also rotated 90º that will mess things up.
Apply the rotation of your curve and get rid of the extrusion you set.

For this to work you need to use a normal curve with no extrusion or bevel, rotate the curve in edit mode not in object mode.

Note there is a warning in the length node if you hover over it with your mouse it says “unsupported type mesh” , this is because you extruded the curve. set the extrusion to 0 and the warning will go away.

You will see that your curve becomes invisible, this is because until you set the GN inputs and shader properly the GN node has no output.


DNorman, you are a wizard. Thank you for this magic. I’m gonna call this one hell of a solution.

One thing I noticed that may have jammed me up as well was that I had pre-applied an extrusion to the curve, and that seemed to overide auto-extruding that was being done by the Geometry Node. I don’t know if there is a cascading order to this stuff as it get’s compiled, but just something for others who may come across this post in the future. As soon as “zerod out” extrusion in the curves object data properties/geometry that allowed the geometry node to do the work instead and the extrusion snapped right to the size of the image.

This is so dope. Thank you again for the help. It works!

1 Like

Yes I just noticed that. :slightly_smiling_face:
All this does take a bit of time to get used to, there are many trivial things that can go wrong.

The reason why the extrusion messes things up is that when you extrude a curve it is no longer a curve, it turns into a “surface” which blender considers a mesh.