• The Blend
  • Posts
  • Generating webs: messy spiderwebs part 4

Generating webs: messy spiderwebs part 4

Combine the Branch To Target node with the Curve Gravity node to make a spiderweb generator.

The Blend

Today is the day!

You’re going to combine everything you learned in the last 3 Blends.

You’ll use your knowledge of curves, your Curve Gravity node, and your Branch To Target node to complete the full spiderweb generator.

I’ll even show you how to make a decent Eevee material for it all.

This is Part 4 (the last part) of the Messy Spiderwebs series, where you learn how to build a spiderweb generator (to make any scene look disgusting.)

If you haven’t been following along, and you want this part to make any sense at all, you’ll need to catch up:

Last week, you learned how to make any curve send out branch curves to a target object. Today, you’ll turn that into a spiderweb generator.

When you're done with this one, you'll have a complete and awesome spiderweb-painting tool. The techniques you’ll learn are valuable, though, and can be applied to lots of other things.

I’m breaking this into 3 sections:

  • How It Works

  • Building The Setup

  • Lazy Spiderweb Material

Not my idea: I learned almost all of these techniques from Joey Carlino’s excellent spiderweb tutorial. I’m just breaking things down for ease of learning—most of these techniques are based on what he does in that video.

How It Works

We’re going to chain our node groups together.

It’ll flow like this:

  1. Take an input curve (drawn in the viewport with the Curve Draw tool)

  2. Resample so there’s only 2 points: the start and the end

  3. Add gravity

  4. Resample to add more points

  5. Generate branches from curve

  6. Add gravity to branches

  7. Resample branches so there’s more points

  8. Generate branches from those branches

  9. Gravity for those

  10. Resample those

  11. Join all branches together with original curve

  12. Convert curve to mesh

  13. Set material

This is a repetitive system. You generate branches, then branches from those branches. You can keep adding more levels as far as you want.

The first step is to get it all set up. Open a Blender file and position some random obstacles around the scene for your spiderwebs to stick to. Put all of those in a collection named target.

Now add a curve object, a new BezierCurve. Name it Web and make sure it’s NOT in the target collection.

Press TAB to edit the curve. Press A then X to delete all the vertices, then select the Curve Draw tool from the toolbar. Set it to Surface ode, so your curves stick to the obstacles.

Now draw a line from one obstacle to another, then TAB back to object mode. This will be your base curve.

Building The Setup

Before you can start building the node setup, you need to bring in your Curve Gravity and Branch To Target nodes.

Do this by going to File > Append, choose the correct Blender file, find your node group, then press Append. Now you’ll have that node group here, in this file.

Now select the Web object and go to the Geometry Nodes tab. Press New for a new setup. Here’s what you need to build:

If it’s hard to see the nodes—right-click the image and open it in a new tab to see a little better.

This node setup follows the steps we listed above, exactly. 

The target collection is brought in with a Collection Info node. Make sure you set it to Relative and add a Realize Instances node so it’s an actual mesh.

The final Curve To Mesh node takes a profile curve as input—we’re using a basic Curve Circle with a radius of 0.01. Set it to a resolution of 3—as low as possible—because it’s so tiny that nobody will notice.

There is a lot that you can change here. You can change the Spread and the Probability and the Gravity Strength and how detailed the resampling is. You can copy my settings as a start, but customize it to look the way you want.

Resampling: Length vs. Count

When a Resample node is in Count mode, it makes your curve have exactly that many points. A Count of 100 gives you a curve with 100 points—a Count of 2 gives you a curve with just 2 (like we have.) The distance between each point will be different depending on the length of the curve. Bigger values = more points.

Length mode does not give the curve an exact number of points. It lets you adjust the distance, the length, between each point. So no matter how long the curve is, it will have enough points so that the distance between them is equal to the Length value. Smaller values = more points.

Lazy Spiderweb Material

One last thing: you need a material.

Here’s an easy one for Eevee that helps the spiderwebs look thin and flimsy.

All you need is a Principled BSDF node. In the Material Settings, set the Blend Mode to Alpha Blend, so you can use transparency.

Now just adjust the Alpha on the Principled node so that the webs are a little bit see-through.

(If it’s not working make sure you’ve set this material in the Set Material node.)

And now you’ve actually finished. Great work!

You really don’t want to lose this. It was hard work!

So SAVE THIS FILE. And hit the FAKE USER button (little shield next to the group name) so you don’t lose your node group.

This series is now officially over. Next week’s Blend will be about something totally random.

Hit subscribe so you don’t miss that.

Can't think what to blend?

Try something tall and thin. Anything from a skyscraper to a drink straw.

P.S. I write fiction on the side, if you like that kind of thing. I made the cover of this one in Blender ↓ [all my work is 100% free to read]

Enjoy this newsletter? Please forward to a friend, it'll make my day. And theirs. (unless they hate it when you forward random newsletters to them.)

New to the newsletter? Join here (no pressure. But I really, really think you should click the button. Click the button. Click...the...button...) ↓

Reply

or to participate.