Dynamic Per Face Material Assignment
Animate-able (key-able) material_index value for faces/polygons. Currently it appears the material assignment to faces is handled with a material index value at the polygon level of an object's mesh data block, and it doesn't appear to accept animation.
Personally, I would want to explicitly animate the material index values on faces instead of relying on a modifier for some procedural reassignment that can become unstable relatively easily by changing driving objects. Or perhaps implemented similar to vertex groups, where a modifier can use another object to drive vertex group weights (the Vertex Weight Proximity modifier).
The actual interface for it might be tricky, but just allowing for the property to accept animation would be a big help.
3 Comments
I have written a proposal to use vertex groups in shader nodes. It's already possible to do this with vertex color, and vertex color is a little bit better because (as far as I know) it is stored on face-corners, rather than vertices, so you can mask out faces with it.
It's not very difficult to do this with nodes, though. Create the materials you want, then create node groups for each one (select everything but the output node and ctrl-g). Now, in a new material, create one of each node group. You can use Mix Shader nodes to switch/mix them (better than a sudden switch, IMO, but you can do that, too). It's possible to bind the factor of the mix shader node to a driver.
* @Josephbburg * Thanks for the reply! I've upvoted your proposal, it's a good one! We've also found various ways we get around the limitation at the moment. However, this can quickly make a complex material node tree kind of "bloated" with internal duplicates of other node trees, depending on the material requirements. We also noticed that there are performance issues when carrying around a lot of drivers on already complex rigs. (those were primarily observations seen in Blender 2.78 during our last big production)
Personally, I come from a 3dsmax background and really miss some of the modifiers we could use there to drive material ID switching procedurally (using Volume Select and Material modifiers, for example).
Certainly not suggesting a duplication of the workflow in 3dsmax, but some kind of equivalent functionality would be awesome!
* @conrad.dueck * Thanks. I definitely understand performance concerns, but I don't see how the materials could get bloated if you do it the way I suggested. Node Groups aren't duplication, they're actually more like a reference to a central network that is re-used. And you can create inputs for them, so you don't have to make a completely separate node graph for small changes.
I don't know the C code, but I'm skeptical that creating a depsgraph trigger for the material index will result in good performance. Wouldn't it have to check every face, every frame? The depsgraph has been completely rebuilt for 2.8, so I don't think you'll see the same performance issues now. Drivers on materials now update in realtime in the viewport, and simple drivers no longer call Python for evaluation. You should only see performance hits from more complex drivers, after the changes.
Anyways, there used to be an addon that did this sort of thing, AnimAll. Not sure it could handle this particular task, though. You might take a look at its code if you need a better workaround.