SOP Size, Center, and Bounds?

Is there a way to get the info of a SOP, specifically the size, center and bounds? the Info CHOP doesn’t appear to have that information?

Found the answer… I guess I have to make a python expression from the SOP Class



erp well I spoke too soon… I don’t actually think the min and max expressions are properly calculating the bounding box in Python?

When I compare the same geometry in Houdini I get very different math values for the center and min and max points. Could this be a bug?

zip archive attached if anyone can tell me what is wrong with this setup? (23.8 KB)

Can confirm the difference in Houdini 19 vs TouchDesigner. It seems to be related to how the two programs are handling Alembic importing.

If you need a Houdini->TouchDesigner simple geometry transfer in the meantime, .hclassic/.bhclassic work very well and I confirmed your example comes into TouchDesigner with the same size as in Houdini.
We’ll see what we can find, thanks for the report.

Thanks for checking that out Ben. It seems to be isolated to the Alembic file format. here is a pretty clear gif that shows something interesting, when you run the alembic through a merge SOP you DO get the correct coordinates and size. This must be related to the geometry needing to cook fully on the CPU in order for the python expressions to work?


My guess is that the geometry is partially on the GPU even though I do have the direct to GPU option checked OFF within the alembic… it should be on the CPU, but for some reason its not accessing the full geometry unless it goes through an “empty merge” which probably fully forces touch to recook/recalculate all the geo on the CPU, which then makes the python work correctly.

I have tested OBJ and Bhclassic and those file formats are not an issue… its really just alembics… but I really like using alembics and they provide those point attributes which we use a lot in our productions.

you should have the test file above but let me know if you need anything else from me to diagnose / demonstrate this issue clean.

Thanks for this additional info, this should help narrow it down!

Thank you very much for this. Saved me very quickly. I tried things like op(‘mySOP’).Size orop(‘mySOP’).sizex
I was close but still too far