# Resolving Z-Fighting and Unequal Instances Along Curves in Blender Geometry Nodes

I'm currently experimenting with Blender's geometry nodes and curves to create arrays of instances along a curve, specifically using cubes as instances. However, I've run into two issues that I'm struggling to solve: Z-fighting between cube instances and uneven distribution of objects along the curve.

Z-Fighting Issue: When I create an array of cube instances along the curve, I'm noticing Z-fighting between the cubes. This seems to occur because the instances are very close to each other. How can I address this Z-fighting problem and ensure that the cube instances align perfectly along the curve without overlapping?

Unequal Instance Distribution: I've also observed that there are unequal numbers of cube instances between two vertices of the curve. This is causing an uneven distribution of cubes along the curve, which is not the desired outcome. How can I ensure that the instances are distributed uniformly along the curve, with a consistent gap between them?

I'm keen on finding a solution that combines both precise alignment of instances and an even distribution along the curve. Any advice, tips, or step-by-step instructions using Blender's geometry nodes would be greatly appreciated. Thank you in advance for your help!

Node Setup:

• Overlaps can be solved easily, by simply spawning less instances, that is, by increasing the "Length" of the "Curve to Points". If you don't want to rotate the instances to align to curve normal, you can set the "Length" based on ratio of segment length to the biggest component ($x$ or $y$ or $z$) of its bounding box. Of course you have to ask yourself a question: what if the segment can't be subdivided based on that length, because the result of dividing the segment length by "Length" is not an integer number? Commented Aug 15, 2023 at 12:28
• As for distribution: split edges before converting them to curves and remove first instance on each spline. Commented Aug 15, 2023 at 12:28
• Hey @MarkusvonBroady I am already instancing the cubes on a point curve object, I am new to Geonodes, so my answers might be a bit naive, but does it mean I should subdivide the edges more to have uniform distribution, also, how do you take out the first instance on each spline? Commented Aug 15, 2023 at 12:31
• The problem of your non-uniform distribution is that when the curve is divided to subsegments (resampled), some segments go across corners (effectively 'filleting' those corners, but you don't see it, because you only see resulting points). If you split edges, after converting to curves you get separate splines, and so each resample is localized and separate. As for taking the first instance out, you can use "Endpoint selection", 1, 0 (1 starting point only), and inverse it using Boolean Math: NOT. Commented Aug 15, 2023 at 13:27