I’ve been thinking about one of the stated objectives on the POPs notion site (that POPs should eliminate a lot of the need for coding). I wanted to explore the process of adapting a workflow that leans heavily on GLSL to non-GLSL POPs.
The attached file is a simple 2D physics solver where attraction vectors are computed from a mono input texture. I was able to get most of it to work without GLSL, though I’m not sure if there might have been other ways to do some of this. The file has the non-GLSL versions with the original GLSL implementations beside them.
Some thoughts:
Lookup Texture POP:
In order to extrapolate direction vectors from my input texture I’m using a multi-sampling approach and deriving the variance based on distribution. Adapting this to use Lookup Texture POPs requires putting one down for each sample point (unless there’s a smarter way). I really like how the TOP to CHOP can be supplied with an input channel that the OP uses for sampling multiple positions. I wonder if there may be a way of adding a similar feature to the Lookup Texture POP.
Math Combine POP:
This OP is really the rockstar of my whole process here. A lot of things done in code were able to be done here, though it required taking some operations and splitting them into smaller chunks with intermediary stages. This kind of warped my own sense of approachability a bit. I know that some people feel overwhelmed when confronted with code
and the prevailing implicit bias is that by keeping people out of the code and in the network editor, things are made friendlier and more approachable. However, math stuff done in GLSL can be laid out in fairly intuitive ways and annotated with comments. These operations pulled out of the GLSL POPs DAT and expanded into a dozen or so operation in the Math Combine POP suddenly become far more inscrutable (to me at least).
Collision and Neighbor POP:
I really like the neighbor POP, but I have a hard time understanding how someone could operate on information like the neighbor’s point Index without GLSL. The collision calculation I’m doing in my project is a variant of the one used in the neighboring spheres example in the Alpha package. The basic structure of the collideSpheres() function included in the example seems like something that maybe could be rolled into a ‘Simple Collision POP’ which has inputs for neighbor attributes and radius.
texAttractFlock.toe (12.3 KB)