Hi! I’m trying to do the following:
I have a file with a complex model in it, originally STEM format, which I’ve gotten into STL, and it still has a lot of polygons ( 40,000 I think ). While I can draw the object, frame rates are bad, so I look and find PShape that seems to have a lot of benefits.
Processing-latest, ie 3.3.7, running on OpenGL I think.
When I spend two frustrating hours failing with PShape, I ran into the following problems:
createShape in my environment requires getting a hold of the PApplet, which I don’t use anywhere else and would require some gymnastics to acquire. It’s not lying around, for sure.
createShape is documented to simply take a family. It doesn’t.
Thus, I am simply new-ing a PShape object, which seems to at least compile, but I haven’t seen anything on the screen yet.
draw(shape, x, y ) doesn’t seem to have a 3D version ( I was expecting draw(shape, x, y, z ) ), or is in viewport coordinates, which I haven’t had to use for anything before. I don’t know why I can’t simply draw, and let the coordinate system figure itself out.
The fill() primitives seem hinky in some way. I see there is a difference between what one is supposed to call before actually attaching the shape information, and after ( dynamically ). I am using integers everywhere else and I’m getting bad token errors.
The examples referred to in the documentation simply don’t exist in the Processing IDE.
The documentation says “This is a placeholder in Processing 1.0”, which doesn’t inspire confidence when the version is 3.0.
I get from the doc that I want to create a PShape per triangle ( instead of having a “bucket of triangles” PShape, which seems quite sad ), and set a parent GROUPS PShape. While that seems good, I’m starting to think I’m not going to get much performance out of using PShape, as I think it’s likely to be a heavier weight object compared to simply creating triangle-type objects.
Now… Maybe I want to try to convert my STEM into an OBJ which is internally supported, but I thought I’d give a list of my gripes in case someone would like to look into this.
Thanks