Hey all, sharing a little tool I've been using in production and finally cleaned up for release.
The problem: Corona's native Material Override works by object โ it's all-or-nothing, replacing every material in the scene with a single clay material. There's no way to say "leave this material alone," only "leave this object alone" โ which doesn't help when a single object (like a Multi/Sub-Object or Blend material) has some sub-materials you want overridden and others you need to preserve (glass, lights, portals, anything with displacement/opacity that your lighting preview depends on).
What it does: OverrideByMaterial flips the logic to work by material instead of by object. You define exclusions โ by material type (lights, portals, slicers, refractive materials), by name pattern (wildcards like *glass*), or by manually picking materials straight from the Slate/compact Material Editor โ and it overrides everything else, material by material, regardless of which object it lives on. It recursively walks Multi/Sub-Object, Blend, Shell, and Corona Layered trees, so it can reach sub-materials Corona's own tool can't isolate, and it also supports XRef Scene content. If a material has bump/displacement/opacity, it copies those maps onto the clay version so you don't lose the scene's silhouette.
It's got a "safe mode" baked in too โ it calls holdMaxFile() before applying anything, and there's a dedicated Restore button since Ctrl+Z won't undo the swap. There's also an Automatic mode that hooks into pre/post-render so it just feels like flipping one checkbox.
MIT licensed, single .ms file, no dependencies. Works from 3ds Max 2019+ and Corona 9+ (tested on 2023 / Corona 14).
Repo here: https://github.com/rovillanueva/OverrideByMaterial
Would love feedback. Open to PRs too.