cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Per-object driven material paremeters

Per-object driven material paremeters

I find myself in situations where I have several objects that all share the same material, but should behave differently in some way.

Some renderers have approaches to tackle such situations, but never manages to provide a complete solution.

 

For example, Vray has the VrayUserColor and VrayUserScalar maps, where you can feed individual object's User Properties into the shader to control aspects of the material from respective object rather than in the material. No complex linking is needed, but the problem is that User Properties are not animateable.

 

The only solution I currently know is to do it the hard way, make duplicates of the same material and try and instance maps as much as possible between them so that you don't have to spend precious time adjusting parameters in many places. But it's often a tedious procedure to set up.

 

What we need to simplify this procedure is a new map that can, just like the VrayUser maps, take a given controller with a particular name and read the value that comes out of it on a per-object basis.

 

The following schematic shows how I imagine this to work.

 

userProperties.jpg

• So here we have two separate objects. Both have custom attributes controllers with the same name.

• The map is looking at these custom attributes for controllers with the name specified in the map (diffuse_param and selfIllum_param).

• The map picks up the current value from these custom attributes controllers and feeds it into the material which at render time (and preferably in the viewport as well) will produce two variations using the single material.

 

The best thing is that custom attribute controllers can be any arbitrary type of controller depending on need.

6 Comments
michael_spaw
Autodesk

Great Idea +1

 

-Michael

Kelly_Michels
Alumni
Status changed to: Future Consideration
 
Anonymous
Not applicable

It would also be handy to to control texture files and sequences the same way, essentially have custom attribute (a string) on respective object with a valid path to a texture or a sequence, which is then picked up by the material. That way one only need one material and the maps/parameters that need to be unique are controlled by the objects.

electrotoast_old
Community Manager
Status changed to: Under Review
 
masterzap
Enthusiast

As of yesterday, you can do all these things with OSL, although it is using the User Properties, not custom attributes. But you can also randomize anything on a per-object basis.

 

/Z

electrotoast_old
Community Manager
Status changed to: Implemented

Thanks for the Idea. This is Implemented in 3ds Max 2019!

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea