Arrow shader using curves

Hi. I am trying to achieve a shader for extruded curves that allows me to generate arrows while I extrude the curve.

I started with a Wave texture and plugged the UV node hoping this would help me to get the lines following the curve without deforming, but that is not happening.

I planned to mirror the strips with some math nodes and generate the arrows.

Is this possible?

Thank you

Hi,

Can you share your .blend file?

Well yes there are quite some ways to do it. Eg this one.

4 Likes

Thank you so much. Do you think there is a way to avoid the arrow from bending and wobble? It is for an infographic, and although this seems to be the right approach, it might look a bit psychedelic.

I appreciate any help you can provide.

Well to some degree by changing the splinetype to poly. Beside that its uv based and these compress and stretch along the surface.

1 Like

I will try out your proposal. It might work due to my lines are just straight with a radius when changing directions.

1 Like

No, I do not think this work well:

The shader its inconsistent, and the stripes break at some points. Also, depending on the handle properties, they stretch or shrink. I am unsure if there is a command to make all handle the same length.

I leave the file here in case someone knows
how to procedurally add arrows to an extruded curve.

arrow.blend (1.1 MB)

Thank you

You can use geometry nodes to improve the effect:

  1. deactivate extrude
  2. resample the curve in geometry nodes with equal length
  3. generate UV coordinates from the spline factor
  4. set material

In the shader, use the attribute which is output by the geometry nodes setup as coordinates

(Blender version 3.5.0
arrow_v02.blend (1.1 MB))

Edit: Alternatively, you could use the length instead of the factor as the x-coordinate. Then your arrows won’t stretch when you extrude the curve.

3 Likes

What about making a single arrow object and using an array modifier, fitting to the curve?

1 Like

Well its UV based. The streching and shrinking is due to that, so you have to accept on how blender places the uvs for curves if you want to use curves. But its just that the point offsets have to be even along the curve, not the biggest problem IMO. UV based approaches will always have distortion, even if the uv mapping is adapted to the segment length. You might choose instances along the curve as @Tedri_Mark suggested but then you get overlaps in curved regions instead.

Like this?

Will have the same deformation problems.

But you could use geometry nodes (again):


arrow_v04.blend (1.1 MB)

3 Likes

Nice, I did wonder it that might be the case :slight_smile:

1 Like

Thank you for your contribution. The whole point is to have it shader based. This is how we solved it last time when we could not do the shader option.

I would like to not deviate from the shader approach.

Are geometry nodes the problem? This version here still creates the arrows using a shader, not additional geometry: Arrow shader using curves - #8 by LordoftheFleas

You will have to somehow resample the curve to get rid of the distortions…

1 Like