Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to change mesh color of instance/duplicate object

How to change mesh color of instance/duplicate object

Anonymous
Not applicable
1,679 Views
2 Replies
Message 1 of 3

How to change mesh color of instance/duplicate object

Anonymous
Not applicable

How can I change the color of an instanced object? I tried using the polyColorPerVertex command, but I keep getting a Maya Command error. I read online that an instanced object isn't a geometrical object, so is that why polyColorPerVertex isn't working for me? I also tried using duplicate instead of instance, but I get the same error. I tried implementing a for loop to create new objects (instead of creating an object and then using the for loop to create new instances, as I did before), and that worked to randomize the color as I wanted, but the runtime is way too long. Does anyone know of a way to change the mesh color of an instanced/duplicated object?

0 Likes
1,680 Views
2 Replies
Replies (2)
Message 2 of 3

Roland.Reyer
Autodesk
Autodesk

Hi,

 

can you please tell us what the error is that you get?

 

Instances share the same shape node and the color per vertex is stored in the shape. That's why all instances show the same vertex color.

When you *duplicate* the objects then each object (shape node) can have its own colors.

 

front row: duplicated objects = individual colors

back row: instanced objects = shared colors

 

grafik.png

0 Likes
Message 3 of 3

Anonymous
Not applicable

I probably should’ve posted a reply last night saying that my problem was resolved. I changed from the instance command to duplicate, and I had to select the object before I could change its color using polyColorPerVertex. However, for some reason, the color wouldn’t change if I selected right after duplicating the object. I had to put the object in a parent group anyways, so what worked for me was duplicate —> parent —> select —> polyColorPerVertex.

0 Likes