Jump to content
Sign in to follow this  
Michael Goldshteyn

Parameterizing aspects of a material to vary it per object

Recommended Posts

To make the question I am going to ask clear, consider the following scenario:


Before carefully phrasing my question, let me describe what you see in detail in the image above.

We have two primitive cube objects, respectively called Red Cube and Blue Cube (left side of above picture with the Object Manager representation shown top of center) The two cubes share the same shiny white material called Generic Material. The settings of the Color layer portion of the material's definition are shown in the Material Editor (center of above picture).

A bright yellow arrow points to the Texture slot, showing that a Mograph Color Shader was inserted there. This shader allowed me to parameterize and vary the color portion of the material for each of the two cubes, based on their respective Color setting under the Basic tab of their attributes as shown in the Attribute Managers for each of them (right side of picture) and pointed to by the dark yellow arrows.

The result of all of this is that the same shiny white material was used for both objects, but by using the Mograph Color Shader in a texture slot, I was able to customize the material on a per object basis, using each object's Color setting from its Basic properties.

Unfortunately, this allowed me to use one aspect of the object, its color, to effect a shader inside the material associated with it via a Texture Tag. What I would like to do is to use various aspects of an object, for example coming from its User Data, to affect different settings of a (generic template) material associated with the object (and other objects) in order to customize this generic material on a per object basis.

The alternative to the above approach, which is commonly used, is to have a separate material per object and customize each based on the object's needs. I am trying to avoid this and use a single common material or set of materials across many objects, but still be able to customize various aspects of the materials in an object specific way using object specific properties.

From my research, the only way I have found to do this is to use the Mograph Color Shader which pulls in color data from an object's Color property, a property that is object specific. I don't see any other attributes of an object, especially custom ones that I can use via User Data, which would enable me to do something similar - to customize a common material or set of materials on a per object basis, with those customizations only applying to the individual objects and causing no permanent changes to the material template(s) that would affect other objects sharing the material.

I am hopeful that I have been clear in describing my question: How do I customize a common shared (template) material on a per object basis without having to resort to making a custom copy of the entire template material for each object and customizing these newly created per object materials independently?

In the example I provided, instead of creating two materials, Red Material and Blue Material with completely independent settings, I used one Generic Material that pulls in, and therefore is customized on a per object basis, the Color layer's color using the Color property of each object to which it is attached.

I would like to generalize this concept to other Material properties (layers and attributes) and potentially use custom object specific User Data or data somehow attached with each object to drive the customization of a material that is shared among those objects, in a per object specific way and without the customizations cascading to other objects sharing the material.


Thank you ahead of time for any ideas and advice.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...


Dear members, we are aware of few more bugs that are still present withing the theme.We just wanted to let you know that we are working to fix them as soon as possible.


Please be aware that we are manually approving all new registrations, due to spam prevention. Please be patient in case you cannot login right away, we will approve you within 12h or less if we decide you are not potential spammer. 


Thanks for understanding! :cowboypistol: