I have a scene that looks like this...

rendered view of my scene

The renderer is Cycles (probably obvious from the screenshot :) ). Blender 2.78.

I'd like to be able to highlight components, such as the gearbox, in a highlight color such as a slightly emissive orange. This would be for stills and for animation; and for animation it would be cool to be able to fade from current materials to highlighted material over a few frames.

The main question I have relates to materials strategy. Currently, I've got materials such as aluminum, shiny_steel, powder_coat, etc. So this means that if I want to highlight, say, the gearbox, I need all the objects in the gearbox (which are more than one material) to change color, without affecting everything else in the scene that also has the same materials.

At this point, I don't have a handy hierarchy as these meshes were imported more-or-less flat; but I'd be happy to parent all the gearbox parts to an empty called "EMPTY_gearbox", for example. Then maybe the ideal thing would be to add a custom property to the parent that allows me to fade from assigned materials to highlight material, perhaps through a driver (I'm kinda guessing here - I'm not an expert yet... :) )

What's the best strategy for achieving this? How do I get my head around material slots, mix shaders, etc.? I'd rather not have to have several different aluminums, such as aluminum_for_gearbox, aluminum_for_manifold, etc. But if this is what it takes, I can do it, but it seems like a clunky approach.



  • $\begingroup$ A small note that image from your question isn't shown (at least for me) because site won't be opened. I suggest adding images with built-in functionality, thanks. $\endgroup$ – Mr Zak Nov 28 '16 at 19:38
  • $\begingroup$ Huh. Well, for now, here's a direct link to the image: link $\endgroup$ – Dan Bennett Nov 28 '16 at 20:15

I'm answering my own question as none of the answers was quite what I was looking for, but there were gems in there that let me figure it out. Thanks to all those who answered!

My solution:

  • I forked local copies of materials, e.g. Aluminum is now Aluminum.Gearbox, Aluminum.Manifold, etc. Thankfully, no component has more than 4 materials, so this was much less painful than I was thinking it might be.

  • I created my orange highlight material (some glossy, some diffuse and some emissive), using a node group to make it easy to place in all the materials where I want it.

  • I added a mix shader node before the output of these forked materials, and hung the orange color on the other input.

  • I added an empty, such as "EMPTY_gearbox_highlighter" with a custom property of "Highlight_Strength", going from 0.000 to 1.000.

  • I added simple drivers on the Fac of the mix shaders for all the materials in the gearbox, to be directly controlled by the Highlight_Strength property on the empty.

I'll repeat this for each highlightable component, and then all I need to do is to animate the Highlight_Strength properties on my empties, and it'll fade all the materials in the gearbox (or other component) to orange, which is exactly what I want!

Thanks to all who gave me the stepping stones to get here!

Here's the gearbox unhighlighted:

Scene with highlighted gearbox

And here it is highlighted, just by taking that single custom parameter to 1.000: enter image description here


One way would be to use Object-ID masks in the compositor (see here: How to use an object as a mask?).

You could then (for example) use the RGB curves node and keyframe the fac-value as shown below.1 Unfortunately, this is not so easy to use. But I'm afraid there is no alternative at the moment...

  • $\begingroup$ Interesting, I might give it a shot. Thanks! However, I was hoping to override the materials as I think it would be cool to have nearby objects receiving light and colour from my highlighted component, rather than just an image-space overlay. $\endgroup$ – Dan Bennett Nov 28 '16 at 20:23

I would use duplication for this, as it can be keyframed.

Here's a picture run-down.

  1. enter image description here

  2. enter image description here

  3. enter image description here

  4. enter image description here

  5. enter image description here

  6. enter image description here

The three main keys to making this work are as follows:

  1. For duplication to work out properly, you have to parent the object created in step #2 above to the Larger (Correct Object). To accomplish this 1st select the smaller object hold Shift then select the larger object. once selection is accomplished, Ctrl+P >> Select Object in the following drop-down menu.

  2. There must be enough verts/faces on the main object for this effect to look reasonable. Sub-Divide as necessary.

  3. To keyframe the Duplication settings, make sure you are where you want to be in the timeline, select the duplication method that you want (if you want the effect off select None), Then hold your cursor over the selected option, and hit i on your keyboard.

The cons to this are the transition, it's pretty abrupt (If you want control over the abrupt feel of this, I would think about animating the material of the small Duplication object), however highly effective.

  • $\begingroup$ Thanks! But I think that since some of my highlightable components have lots of meshes (nuts and bolts, casing, etc.), I think my brain would come out of my ears trying to animate this way! :) $\endgroup$ – Dan Bennett Nov 29 '16 at 15:20

You could add another simple object encasing each object you want to highlight and use a mix of transparent and emission. By animating the mixture you can turn on/off the highlighting.

enter image description here

You could use the Is Camera Ray to calculate a weaker emission value towards the camera so that the emission on surrounding objects is more visible.

The highlighting object could be a part of the same mesh as the main object, just with the highlight material assigned to it.

  • $\begingroup$ I personally like this approach, but the OP was trying to stay away from having to manipulate individual materials. The 'Is Camera Ray' helps, but as far as I can tell, only if your intended object to highlight is in the focal center of the camera. Does that sound right to you, or am I missing something with this approach? $\endgroup$ – Rick Riggs Nov 29 '16 at 15:04
  • $\begingroup$ Animating a mix shader's factor would be fine, and wouldn't even need an encasing object. I could simply set up, say, AluminumForGearbox and SteelForGearbox and have mix shaders right before the surface output, with emissive orange on the other branch of the mix. Since there's usually no more than three materials involved, animating three mix shaders wouldn't be too painful. The pain would be in having to make several different identical aluminums, and several different identical steels, etc. In my OP, I was imagining that it's possible to override materials orthogonally, by hierarchy. $\endgroup$ – Dan Bennett Nov 29 '16 at 15:16
  • $\begingroup$ I would still be interested to know if there's a way to control, say, three mix shaders by animating a custom property on a parent empty. Is that possible? $\endgroup$ – Dan Bennett Nov 29 '16 at 15:24
  • $\begingroup$ To give you a quick example of what I'm fearing in this approach... using your picture looking at the drive train, and the cross members of your chassis, those look like they may be the same material. If you were trying to isolate the drive train to highlight, and your camera passed over the cross members, then those would highlight as well, meaning that you would have to make a seperate material for those members that gets highlighted from a different approach. $\endgroup$ – Rick Riggs Nov 29 '16 at 15:30
  • 1
    $\begingroup$ I think that for your custom property idea to work, you need to be looking at drivers. I will experiment and let you know how it goes. $\endgroup$ – Rick Riggs Nov 29 '16 at 15:33

Adding another answer based on some of the comment threads.

This answer has to do with driving the material selection via an Empty object's location.

Here's the pictorial overview:

  1. enter image description here

  2. enter image description here

  3. enter image description here

  4. enter image description here

Picture 1 above shows the final node setup once everything is in place, so just use that as a final reference.

Here's the run-down:

  1. For each mesh object in your scene that you wish to have react to the empties location, I used a Vertex Color slot to just relate the object to the material. I did not use any other Trick, just add the Vertex Color Slot, and give it a unique name. In my example of Picture 2 above, I just use Col, Col.1, & Col.2, to respectively relate to Cube, Cube.001, & Cube.002

  2. Next I added these four nodes seen here: enter image description here Attribute, Math (Set to Greater Than), Emission, Mix Shader

  3. You will notice that at the First group of these nodes the first shader input on the Mix Shader is the intended material, the rest is there for a per object basis. The second thing that you will notice, is that the Attribute Node then gets a single name that relates to the Unique Vertex Color Entry that we added previously. The third step to this is to add a driver to the second value slot in the Math node as shown in Picture 3 above. For the Emission Shader Set that to what is desirable to you, and plug that into the second slot of the Mix Shader (The output of this first Mix Shader will be connected to the first input of the next group's Mix Shader).

  4. To manipulate the Driver settings, you need to go to the Graph Editor as shown on the right hand side of Picture 4 above., there is a selection menu at the bottom of that screen, which will most likely read F-curve, this needs to be set to Drivers. Next over in the Node Editor, on the Math Node, be sure to select only this node. Make sure the Right side menu is expanded (Hint: with your cursor on the Graph Editor Screen Hit N). Next proceed to to change the driver settings as follows (you will likely have to scroll down on the Right side screen of the Graph editor to see this).

4.a. Change var to have a type of Distance.

4.b. Set the first object to be whatever object corresponds to the Vertex Color Entry (in my case Cube).

4.c. Set the second object to be the Empty Object (in my case Empty).

4.d. In the Expression field set the formula text to:

0.2 if var <= 1.0 else 2.2

Repeat these steps until all of your objects are setup, and keyframe the position of yourt empty.

Here's the result:

enter image description here

  • $\begingroup$ Thanks Rick! I think this is more complex than I need, as I don't need to animate per the position of an empty, but rather the value of a custom property on an empty. But this certainly gives me some techniques to think about. $\endgroup$ – Dan Bennett Nov 29 '16 at 20:14

I would give all the aluminum for the gearbox a different material. Don't call it aluminum for gearbox. Call it, GearBoxAluminum or something. Eventually you may want to make subtle adjustments for each type of thing because the aluminium in a gear box is going to have different properties than the aluminum in a casing.

  • $\begingroup$ Thanks! However, I'm hoping there's a way of doing this without having to animate the materials themselves, as this seems like Major Pain whenever I want to animate a highlight on a component (which may consist of lots of meshes with several materials). I'm looking for a way to impose a different material (highlight orange) on groups of meshes, irrespective of their original material - and to be able to revert when I end the highlighted state. And to make it easy to control at, say, the parent level. $\endgroup$ – Dan Bennett Nov 28 '16 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.