Automatically converts V-Ray and Enscape materials to Iray+, in one pass

v1.3, a few versions back. Source on the left, Iray+ on the right. RGB and % columns show the color value and light reflectance values for each material type.
The problem: Architects' models arrive with V-Ray or Enscape materials that Iray+ can't read. We used to rebuild them by hand.
The tool: One script converts them in a single pass and shows every change before it makes it.
The result: About 15 designers use it every week. It saves just over 1,000 hours a year.
The problem
Our lighting team mostly receives architectural models from Revit, SketchUp, or Rhino, with materials assigned in V-Ray or Enscape. We render in Iray+, the Siemens Lightworks plugin that runs NVIDIA's Iray renderer inside 3ds Max. Iray+ can't read those material types. So for years we rebuilt them by hand. Sometimes hundreds of materials per model.
How it works
Iray Mapper converts as many of those materials as possible in a single pass. It scans the scene, picks an Iray+ type for each material (glass, metal, wood, cloth, or a generic fallback), carries the color and texture maps across, and shows you the whole table before it changes anything. The lighting designer on the project can review every conversion and override whatever they want.
The percentages are the part I care about. That's light reflectance, how much light a surface sends back. Pure black reads 0%. Pure white reads 100%. In the real world, it takes special scientific materials to produce anything close to 0% or 100%.
For lighting calculations we usually clamp reflectance between 1% and 80%. That comes down to conservation of energy: a surface can't send back more light than lands on it. Keep every material in a physical range and light bounces around the model the way it would in the building. The calculations come out accurate, and so do the visuals. Values at or past those limits get highlighted in the table, and the script pulls them into range.
Big models repeat the same material dozens of times. The script catches that and offers to collapse each group into one shared material.

21 groups, 63 rows. Simplify.
Results
About 15 designers across multiple offices use Iray Mapper every week. It saves us about 2 hours on a small model and 8 to 16 on a large one. Not every model needs a full conversion. The team runs a little over 100 a year, most of them on large models. At about 10 hours each, that's just over 1,000 hours saved a year.
How it's built
I came up with Iray Mapper and built it on my own. I keep asking the team for feedback and feature ideas. Some of our other scripts did start with a teammate's request, like helper2layer.

An earlier build from May, with the release notes I pasted on top for the team.
The tool is a single script, about 8,000 lines of Python, running on 3ds Max's Python API. I built it by directing coding agents. I write the spec, the agent writes the code, and I test every build on real project models before the team gets it.
Working with the Iray+ developers
I also work with the Siemens Lightworks team, the developers of Iray+ for 3ds Max. We spent a lot of time going back and forth on how lighting designers work. The luminance analysis (measuring how bright surfaces look) and point-by-point calculation (light levels computed across a grid of points) features that shipped in Iray+ 3.1 came out of that. I'll write that up in its own post. I want to keep helping them shape the software around how my team works.