Spline parameter from curve circle to shader attribute - 0 bleeds into the 1 value where it should be sharp

I'm trying to map coordinates for this curve circle turned into strand, similarly to how I've seen CG matter do it for his river generator.

However, as you can see on the image above the black values bleed into where the spline factor should be exactly 1

Here with the greater than node it should only move counter clock wise but the little bit of black in the bottom expands as well.

Thank you so much for trying to help guys, it's pretty cool

So yeah the comparison node is only there to better visualize what's actually going on, it'll need to be a soft gradient at the end. That means the faceted version doesn't quite work for me, but it looks pretty cool lol, I definitely learned something already.

Basically I'm trying to have a gradient that goes along the circle, and another one across the width. That would give me texture coordinates so I can use a noise texture for example and scale it to have lines go along the road, instead of being relative to world coord.

What I came up with however gives me a bit of an error at the start of the circle, which is exactly what I'm trying to fix with this post

And here's the blend file

Edit : I'm working on something else tonight but I'll be sure to tryout your different workarounds once I have time, splitting the first edge sounds like a pretty smart thing to do and work with

The problem here arises from the fact that the values for Factor are previously recorded on the curve points, and then transferred to the faces (or face corners) of the mesh and interpolated in the process.

To solve this solidly with Geometry Nodes, you would firstly need a higher resolution of the mesh, and secondly you would have to define a single value per face. As soon as the face corners of a face get different values, the problem with bleeding arises.

You can solve the task like this:

(Blender 3.3+)

• When I first saw the q I did the same, but the problem is when you turn off the comparison node, you end up with faceted faces. I think OP is only showing the constant-colored version for demonstration, and they'd like a solution for the gradient. I can't think of how to do it without splitting the circle at first edge. I tried using a flat spiral instead of a circle, but of course then the extrusion doesn't work. You could fix that but then it's getting embarrasingly complicated for a simple question so I gave up... Commented Nov 22, 2022 at 16:25
• @Kuboå Well, good, you're right. Let's see what OP actually wanted to achieve. It wasn't entirely clear to me either. But splitting a circle at the first extruded edge is easy: i.sstatic.net/bJdRo.png Commented Nov 22, 2022 at 16:57

Okay so last night I fiddled around with this project, and I tried going from the split edge solution. I actually found something that pretty much works for my situation.

So the issue with splitting the edge was that the extrusion would be messed up and the extruded origin vertices would be separated. I used a spiral to save a few nodes, and then the workaround I got to is by using 2 merge by distance nodes, the first one merging vertices 0 and (resolution input (= x )), then vertices x+1 and 2x+1, with boolean math nodes into the merge selection sockets.

Now I can have a properly mapped noise texture and stretching along the curve "circle".

The only issue I'm seeing, beside the nodes being probably not very optimized, idk, is the seam that I am getting, but that was to be expected, and I will be looking for ways to hide it in the future.

Thank you very much for helping, if you have additional informations that might help this setup I'm very much all ears, otherwise I'm marking this as an answer and that's pretty much it.

EDIT : Much more optimized fix below, from Kuboå's comment under this post, blend file attached here (3.3.1)

• I can't quite tell what do all those boolean operators do along with the Merge nodes, but seeing as you don't mind splitting the edge like I suggested, do you think something like this would be simpler: i.imgur.com/ygN5HNy.png Simply capture the positions of the first spiral (a perfect circle), then re-position the (messed-up) extrusion edge points to a scaled up version of those original positions—re-organize them into a bigger circle, basically. In my example Scale is 2, so the outer ring has twice the radius of the first, etc. Commented Nov 26, 2022 at 22:44
• As for the seam in the shader, well yeah, that's what you wanted :) I guess you could capture two different versions separately, and use the split one as a mask factor to manipulate the interpolated/seamless one. Would really depend on what you're trying to achieve though. Good luck. Commented Nov 26, 2022 at 22:46
• This is absolutely a better solution, much simpler to use, I wish I could've thought of that. I did kinda think about mixing two opposite factor values, that's my next step rn. Thank you
– May
Commented Nov 27, 2022 at 0:03