Home Website Youtube GitHub

Simple rig is very slow

Hi, i have some bigger assets with up to 4000 objects, if i pick some objects under a transform group and make a controller it takes very long to create a controller. It looks like the script is checking all objects before making the connection.
Use Auto rig with a lot controller automatically, is close to impossible, cause it takes even longer with many controller. The memory went up to 30gb. Looks like there is something wrong.

can you try to put all the object under one group and use the group to connect with simple rig?

this should solve the issue. I never try to connect that many objects at the same time. But it does one matrix mult connection for each element selected. So using a top group will create 1 connection instead of 4000

let me know i this works for you :slight_smile:

Yes, that exactly what i do. I don’t connect all the 4000 objects. I create transforms groups with say 20 objects und create a control for these. But its very slow cause it looks like the script is going thru all objects in the scene before connecting the transform group.

I just tried making a hierarchy with 945 poly cubes under a transform. Then I duplicated those groups 4 times, to have 4725 objects in the scene.

The operation took about 2 seconds.

I tested the group bounding box code (_get_branch_bbox_data()), and that runs very fast, even on dense geometry. I tried subdividing to have 105000 verts and it still runs fast, at about 0.5 seconds, and seems to give correct boundingBox information.

But adding the control using the UI takes about 5 seconds. So there are some other things going on that are taking a longer time.

Adding a control to a group with 2835 cubes took about 6 seconds. So I suspect it might be related to polygon density, and not object count. But I just quickly read the code, so I’m not sure.

@StephanW: How dense is your geometry? How long is “very long”? Just approximately. Is it taking 5 seconds? 20 seconds? 4 minutes?

yes provably is related to the polycount since it calculates the bounding box for all child objects

But the bounding box calculations go really fast on their own.

Maybe the objects have construction history on them that would slow down the bbox calculations?
Would be nice to export a clean file without any history and retry. Unless the polycount goes into millions, it might hog your memory and becomes slow because of swap files or paging?

The complete asset is 4mio faces. Adding only one control to a group takes, 5-7sec, its looks fast, but if you want add 50 controls the task is very slow. The problem starts if you want to automate this with the auto rig feature.
For 300 controls it takes 10min and i have an asset with 1500 controls and i canceled it after it goes up to 30gb memory and half a hour. The assets are clean, no construction history or connections …