Curve to Chain-link Fence (Geometry Nodes)

Now free due to lack of sales.
… documented journey below.

Thumbnail update:

3rd attempt at node-group that generates a chain-link fence from a curve, and close to something releasable:


Currently can set height, chain-grid-width/height, pole-spacing, wire-thickness/curvature and wire “sag”.

Todo:

  • swappable custom wire/pole materials
  • swappable custom poles and pole offset
  • tie-offs (the bit needed to connect the “grid” wires to the top of the supporting wire)
  • noise/damage
  • LOD

Is there a obvious arch-vis feature I’m not thinking about?

Thanks.

39 Likes

That’s pretty good ! Well done @zeroskilz !
I don’t have any clues on how to achieve this !

2 Likes

Thanks!

Very glad to have that kind of feed-back, because it was really, really hard to do. :sweat_smile:

hahaha, in a sense that’s relieving !

When I look at all these non-intersecting knots… Even by hand I’d probably faint a few times before getting something good, I can’t imagine how that would do procedurally.

But now that the hard part is figured out, having some kind of damage slider, or taking advantage of the procedural nature of the setup will just add one more layer of awesomeness on top of it !

Very nice work.

Yes, need those “tie-off” supports at the top IMO.

Single Bezier free-handle curve modulo-2 zig-zagged and setting handles using relative position, scale, vector rotate. Mirror that on x and y and shift by half-x-grid-size you have the “braid” pair that you can instance on the curve. The sweeping curve is trimmed to match the resampled dimensions (and disconnected if cyclic) to ensure instances line up exactly.

So, this is the basis it is all built from:

Once you can generate one pair of non-intersecting curves, the challenge then becomes supporting sloping curves and the “sag”: Have to keep track of the normalized coordinates for the (realized) instanced pair of curves and add that and the vertical slope of the sweeping curve to all set-position calculations.

Without slope correction:
image

With slope correction:
image

With “sag”:
image

9 Likes

Brilliant ! thanks for the explanations ! But that doesn’t make it less scary :smiley:

2 Likes

Progress on LOD

2D procedural shader WIP:


…doesn’t need to look too good as it is meant for far-away-from-camera sections of the fence.

Simply awesome ! I can see this evolving into a procedural chain-mail armor !!
image

Thanks!

haha, yeah, I did stumble upon a “half-ring” pattern while trying to generate the links and had the same idea - true that the underlying methodology can be extended to do a chain-mail pattern also. (although matching that to arbitrary geometry will still be a challenge as this method generates a “sweep” from a single curve)

By boosting the wire-radius can get some cool woven patterns already for free (this is the GN not the shader):
image

2 Likes

Super duper cool. Initially I thought you had gone with the tesselate node patch… but you took the long way around… impressive.

Thanks!

Yeah, no, this is all vanilla Blender 3.1. :sweat_smile:

To tesselate it would be a general solution to matching the “tile” pattern to any underlying geometry - unfortunately, the biggest challenge (and 80% of my effort) is still generating the “basis” - generating from a curve just means I get to be in control of the regular “tiling” that happens, so in essence I’m actually doing a simplified version of tessellation ( curve-directed-tiling in this case), and I’m hoping the tesselate node would allow me to extend my learnings to easily do things like chain-mail amour (I hope).

Keeping the end-goal specific (chain-link-fence) allows me to focus on a specific use-case and not get bogged down in the generalities… and even with a tesselate node, I would still be left with the challenge of dealing with LOD :cold_sweat:

Edit: Google has decided that I’m obsessed with fences, and that all my adds should be about fences now. :roll_eyes:

2 Likes

Progress on LOD (and WIP on v4 of wire-tiling):

Managed to get the generated curve-geometry to line up with the generated UV-texture:

Still lots of work left to get wire-thickness settings to match and to actually generate the planes and normalized UVs in GN.

Also got “sag” working in UV-space (this is the generated 2D texture):
image
… so more work left to match up the curve-geometry with this.

So far, doing LOD has been the hardest part of this project. The goal is to have a lots of control on levels of detail: from high-poly curves to low-poly curves to UV-strips and, finally, to UV-banners (what I’m showing off above).

1 Like

More progress:
image
… supports horizontal tiling of texture and wires…
Almost done with v4.

2 Likes

I featured you on BlenderNation, have a great weekend!

1 Like

Erm, thanks!

But… I’m not even done yet… guess I’ll have to hurry up :sweat:

1 Like

If you could kindly share the nodes, I would like to test this out in a scene that has a similar fence.

Hi

I still have lots of work left to do.
Here is some more progress on LOD (showing that things are still a bit broken):


… the LOD system probably needs another day or two to finish (and I’m terrible at estimating time). Then there will be significant clean-up to do to prep it for release.

So, hopefully, it will be available in the coming week. :crossed_fingers:

3 Likes

LOD is basically working:


…some final polish required and bugs need fixing with cyclic curve math (again). Only the extremes in LOD are shown above, some work still required to have some reasonable presets to go between these extremes in LOD.

The “Banner” version has to match the “sag” without affecting the vertices… separating those out was a challenge and have lots of messy math nodes that can be simplified.

Almost there :sweat:

3 Likes

So coool !

You’re doing impressive sorcery here !!
Like if that wasn’t enough to pull that pattern in geometry, you’ve made the shader version and managed to align them !
And you want me to stop calling you a node jedi !!!

Good luck on your progress it’s super cool !

1 Like