Automatic Random Materials by RenderID

Hi,
what is the method to apply automatically and randomly (based on the RenderID) a precise list of materials. I mean complete materials (with bump, reflection, opacity…)
I know the MultiSub which works only with textures, I know the Mapping Source/UVW Placement inside the material itself and the MultiMaterial (I don’t know what it is used for).

Is this possible?

A handmade example with 2 materials of what I would like to do automatically.

Hello DCHA34,
Thank you for your post. I apologize for the late reply.

Regarding the MutliMaterial question: V-Ray for SketchUp assigns IDs only when exporting a Proxy Mesh to a file. Currently, face ID cannot be manually set in SketchUp.

In case you need to randomize only two materials you can do so by using Blend Material with MultiSub texture used in Blend texture slot.

  • Set get ID from to Random by Render ID.
  • Add two textures and change their color to black and white.
  • Change Seed to change randomization pattern.

I am adding a simple test scene to this post with the material example:

MultiSub.zip (442 KB)

Hello Natalia,
thank you for this explanation.
But I made a mistake in my request by choosing only 2 materials in my example.
My request was mostly about a multi-material principle, no matter how many (2, 3, 5 or 10).
So, for a higher number of materials, just stack the “Coat” layers.
Here is my multi-material. Can you tell me if the principle is correct or if there is something simpler?
Thank you very much.​
MultiSub_DCHA34.zip (9.03 MB)

Random by Render ID only works if each of the tiles is its own group. I was asking in another posting if we could get random by face. it might be useful in some instances and I believe Max has this as an option.

Hi again @DCHA34 ,

So, for a higher number of materials, just stack the “Coat” layers.
Here is my multi-material. Can you tell me if the principle is correct or if there is something simpler?​

With MultiSub material you are correct - this is the way.
Alternatively, with more materials you may consider using Eneroth Randomize Material extension. If you decide to use it make sure to apply materials to Components or Groups (preferably from V-Ray Asset Editor by right-clicking on material > Apply to Selection).
Apply each material you want to randomize to at least one object, then select all objects and run the extension.

Here is an example:
Randomize_materials.gif