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

378

label

Vegetation

Desert Plant with Spider Webs

favorite

476

label

Vegetation

Feathers using Extrude Node

favorite

293

label

Vegetation

Curvature-Driven Curve Growth

favorite

367

label

Vegetation

Growing 2D leafs

favorite

484

label

Vegetation

Growing a Mycelium

favorite

293

label

Vegetation

Growing a natural sculpture