I thought it's time to test my python skills and decided to give the Dijkstra Pathfinding Algorythm a shot.
Some credits actually go to Sam Hancock who inspired me to do this project, I gladly took a peek at his approach before I tackled the problem,
also I have to thank my friend Michael Davis who always throws in some kickass workflow tips.
After a couple hours of work I was able to solve the (too me a big) mystery - as I never dealt with such stuff before it got quite interesting.
The biggest problem I ran into was calculating the distances between connected points (the "neighbours") in Python,
it gets really messy as there is no such thing as an edge in Houdini compared to other packages (I'm not complaining, only a little) -
so I decided to go back to VOPs and use the neighbourCount and neighbour nodes which provided a really fast and flexible workaround.
During my little ride I actually solved the travelling salesman problem (TSP) accidentally, see the attached image
Anyway, I'm attaching the scenefile for everyone who's interested,
cheers,
Manu
Attached Files
Edited by asnowcappedromance, 01 December 2011 - 11:32 PM.















