We are working on some very large assemblies (no worry blokes, there are are no blocks there, just layers!) of car stuff and we are trying to decide how much we retopo (it’s all mesh data from car companies) to bring the entire file size down to a manage polycount in VR.
In our experience we can run Unreal VR scenes working great with about 6 million polygons on good hardware (RTX cards) but things get less than ideal with our polycount goes up in the 10 million polygons. And they suck at 15-20 million.
The mathematically correct thing to do would be retopo everything to endup with a total poly count at/bellow our threshold. The reality is that it takes a lot of time/money/labor to do that so we trying to see how in some cars of we only retopo the marts/objects with the largest polycount we can get to what we need.
The scripted solution:
Can we have a scrip that shows the X number of largest poly count objects in a file. and it tells us the cumulative poly count of those objects?
For example…
Script: “how many meshes do you want to shame?”
me: “10”
Script: “Here I have selected the 10 heaviest meshes in this file and their total polycount is 2,537,455 polygons”
The script should only with with visible/pickable objects. It should omit locked objects/locked layers and hidden objects/hidden layers.
Any takers?
Thanks!
Gustavo
PS: you will be rewarded with cookies, coffee, booze, etc if you are a McNeel contributor, or with money as a form of appreciation (Paypal/Apple Cash/etc) if you are not.
I guess you want the offspring of these two scripts. They’re in the same folder. I haven’t looked in there for a long time. It’s not like they did not have the opportunity.
Actually the second one may be it - it offers to label with the polygon count, for shaming.
The first one is too accusatory. No one want’s to shame a big-boned mesh all by itself. Imagine if an elevator’s alarm said: “The person with the blue shirt and the bucket of Frapuccino needs to get out!”
Largest object (by physical size?) also not good, we need to know largest polycount objects.
Now that I think more about this… if we want to shame 40 objects it should say should say: all visible picable ojects are 12,xxx,xxx polygons. The 40 selected objects are 2,5xx,xxx polygons" …So we know no matter how much we retopo/optimize those 40 objects we still need will be over 9.5M total polygons so we need to shame more of them. Makes sense?
The visible not locked meshes are listed high facecount first (I think quads count for 1 and not 2)
Right number is the facecount.
Left number is the total added starting at the bottom.
Select the meshes you want to see selected in Rhino and hit OK.
@pascal,
You are right, the 2-step program might be a better approach. We first select all the heavy meshes. Then we focus-shame only among those. I’ll test it when I’m back in the office.
…but then I see @Willem’s approach and oh man. That’s so revealing and shaming it’s down right poly-abusing!
Since this is trophy-generation I declare you both winners. I need to figure out how to ship something to Willem now that I’m back in the states
the code is a twisted pile of what’s-it but I I think it does what I think you asked - selects the X number of heaviest meshes, reports the poly count and the poly count of all the rest. Note it will select the top X number of polygon counts - if more than one mesh has the same count then the total selected will be more than you asked for.