Optimizing Shortest Path Networks

calendar_today

03.03.2025

label

Vegetation

mouse

Houdini 20.5

Description

Optimizing network efficiency by iteratively mapping shortest paths back into the weight of the base mesh.

1 Initializing the base mesh

After setting up a base mesh to travel onto, we add "start" and "end" groups to a point cloud. On the base mesh we initialize a weight attribute to prepare tracking on how often each point gets traversed.

C
        // INITIALIZE
f@weight = 1.0;
    

2 Weighting the network

In a for loop we update the weight of the mesh by counting how often each mesh point is traversed by the shortest path node.

C
        // UPDATE WEIGHTS
int count = findattribvalcount(1, 'point', 'origpt', i@ptnum);

f@weight = float(count);
    

3 Building a tree

In the final step another shortest path node runs over the weighted base mesh to build the curve network.

download

Downloads

smart_display

Videos

Optimizing Shortest Path Networks – Houdini Tutorial

link

Related articles

favorite

222

label

Vegetation

Desert plant with spider webs

favorite

251

label

Vegetation

Feathers using extrude node

favorite

128

label

Vegetation

Curvature-Driven Curve Growth

favorite

218

label

Vegetation

Growing 2D leafs

favorite

321

label

Vegetation

Growing a Mycelium

favorite

198

label

Vegetation

Growing a natural sculpture