Change material id


#1

Hi,

Is there is a rhinoCommon function to change material id ?


(Dale Fugier) #2

Hi Tom,

Why do you need to change a material’s id? What problem are you trying to solve?

– Dale


#3

For instance I have a series of objects let say boxes.

I would like to randomly assign two materials for them, so that some of them would have one material and other second material.

Now I am doing differently, just grouping objects into separate groups and assigning material for each group.

Instead of this I would like to change their ID and use vray to create multi-map.

In grasshopper I was able to map texture , change mapping and I see that by default in rhinocommon material id for all objects is 1. I wondering if it is possible to change?

Rhino.RhinoDoc.ActiveDoc.Objects.ModifyTextureMapping(guid[i], 1, textureMapping);


(Dale Fugier) #4

@matt_newberg, is this V-Ray question something you can help with?


#5

The multi material that you are using only work with proxy object and the ID is not a material ID it is Object IDs.
In V3 We do have the ability to setup object IDs and we also have a multisub texture. This two features allows you to do what you are looking for.