Hello,
I was testing the Material ID render element (V-Ray for 3ds Max)
But it renders nothing but black.
My object has 6 Material IDs.
I have also tried setting the Output Type on “COLOR”.
2.)
I have also set up a Multi/sub-material with colors: Is it possible to render the color assignments as only a VrayExtraTex?
(while keeping the original material of course)
That would be helpful
You need to set the material ID per material.
It’s not the face ID specified in a multi-sub, it’s the little square (defaults to 0) in each material’s top toolbar (in the compact material editor).
Actually it is possible without scripting. Max keeps track of mat IDs for each level of material hierarchy. You can set up ID on Diffuse map level and it will show up in RE. Unfortunately you can have only on ID per material
Of course it’s doable manually, but there are a number of blocking, and/or time consuming caveats.
For example, material IDs only go as far as 15 via UI, while face IDs are essentially unbounded.
Scripting allows instead to assign any material ID value to a material, which will be tracked identically in the mtlID RE.
so, for example,
meditmaterials[1] = multimaterial numsubs:100 --multisub filled with 100 gray vrayMtl in material editor slot 1
for m=1 to meditmaterials[1].materiallist.count do --iterate through the 100 materials
(
meditmaterials[1].materiallist[m].effectsChannel = meditmaterials[1].materialIDList[m] --set the material ID to the same as the face ID
)
This is simply unachievable via UI, and if it was, it’d still be exceptionally time-consuming and prone to error.