Multiple object decimation

I’m trying to come up with a good way of automating object decimation with little luck so far.

I need to make renders of characters, lots of geometry pieces for each scene. The polycount varies a lot, some angular hard surface pieces are super lowres, some organic parts are ultra highres:

Decimating all objects based on ratio doesn’t work, some parts need a way smaller ratio, others are good as they are. Decimating based on polycount doesn’t work either, for some objects 1M polys isn’t enough, for others 10k is too much.

Basically I’d want to preserve detail for closeup renders so ideally I’d want to decimate anything where the distance (average or smallest, not sure) between vertices is smaller than x. I didn’t come up with anything better, and not sure if this is something that can be done.

Anyone any ideas?

In advanced graphical programs like Photoshop, resizing an image keeps the details. For example, downsizing a picture with a 1 pixel thick square will not remove the square in the final image. I assume you want something similar.

I guess the best you can do is to assess what you need to keep from a model and what can be discarded. Maybe compute a ratio between polycount and camera distance so that near objects remain intact where faraway objects get decimated. If you look into projection matrices you’ll probably find a good formula.

You could also make use of vertex groups to influence the decimate modifier, but that might be too complicated.

Maybe the easiest way would be to use multiple collections and group objects by their decimate level. So then you run a script to decimate an entire collection with the same amount.

Thanks for your response. Sorting of some sorts would be a good idea, but it’s hard to figure out a good formula. One based on polycount wouldn’t work since I have organic models with high frequency details as well as optimized cad models in the same scene.

It might just be one of those things that are best done manually.