XaiJu
animatrix
animatrix

patreon


Group Find Path SOP (C++) vs edgeLoop() (Python) vs Select Edge Loop SOP (VEX)

I did a comparison of 3 methods of selecting edge loops from a given edge group. To my surprise my Select Edge Loop SOP I wrote back in 2014 is 35x faster than both the Group Find Path SOP which is a compiled C++ SOP node and the hou.Geometry.edgeLoop Python function which if I am not wrong, simply calls the same HDK function that's available as an interactive modeling operation. If so, that seems slow for a C++ function for selecting edge loops compared to a VEX code that does the same.

1. The speed differences are very dependent on the input geometry so there are some cases where the performance gap between my VEX SOP and the Group Find Path SOP and the hou.Geometry.edgeLoop function is not as large as the above example. Though it did show that my Select Edge Loop SOP scaled better in all the tests I performed compared to wildly different timings I got from the other 2 approaches when the resolution of the input geometry or the number of input edges were changing.

2. I am only comparing the ability to select edge loops. Group Find Path SOP is a incredibly versatile SOP that can do a lot more. Here I set the parameters to only select edge loops to make it as fast as possible for this very specialized operation.

3. Beyond algorithmic differences, this shows that half edges in VEX are indeed quite fast and powerful.

https://www.dropbox.com/s/utujun1sdlv56pj/SelectEdgeLoop_SOP_Animatrix.otl?dl=1

https://www.dropbox.com/s/1tka4840n23rpf2/selectedgeloop.hiplc?dl=1

Group Find Path SOP (C++) vs edgeLoop() (Python) vs Select Edge Loop SOP (VEX)

More Creators