Can't blur certain material in a scene

I created a cube, I selected a series of faces and then I seperated those faces (by selection). So I have two different objects with different materials.

What I'm trying to do is to apply Blur filter ONLY in the material of the second object (I'm trying to create a glowing cube), but I can't.

The whole scene is Blurred. Even with the Pass Index parameter I couldn't manage to apply Blur only on a certain material.

• – Rich Sedman May 14 '18 at 6:42

To do something to part of a render based on an ID mask, you need to first separate that part out. One way to do this is:

1. Use the ID mask node to get a boolean mask of the part you want from the ID pass. When given the same index as the one you set in your material (in this case 3), this node will give you mask where pixels on that material are 1, and everything else is 0.
2. Use this mask to set the alpha channel of your image, with a Set Alpha node.
3. Perform whatever operation you want (blur).
4. Composite the result back over your first image, with an Alpha Over node.

That said,

If you are trying to create a bloom effect you may be better off separating by brightness alone. This works best if you make your scene with a realistic dynamic range (tl;dr: make lights bright and adjust the camera exposure).

If you have your lights set up with appropriate brightness, you can get pretty nice results with just the Glare node:

Regarding this comment:

Why can't we blur a material without Pass index? I mean, it's already a seperated and unique object. Why blur isn't just a material's property? Why I can't see the actual render in Render mode view? Thank you in advance, you've already helped me so much.

The compositor does post processing, that is, manipulations to the image after the render engine has rendered it. The compositor doesn't deal with 3D objects anymore, but rather flat arrays of pixels the render engine has spit out. So, if we want to do something to a very specific set of pixels, we need to have the render engine spit out a flat array of pixels telling us which pixels represent our material (a mask). Then we can have the compositor use that information to change some pixels to our liking.

Blur isn't a material property because materials describe how light interacts with a surface. A surface can't really be "blurry" in the sense you're looking for. In the case of bloom, in the real world the object's surface isn't blurred, rather, our view of it is what is blurred. So, blurring our "view" of the scene — the render engine's output — seems a reasonable way of implementing a similar effect.
It should be noted that "blur" is perhaps too simple a term to describe what is actually going on with what we call "glare" and "lens flare"; the phenomena involved can get quite complex.

• It works but to be honest I haven't understood exactly how. If you please to clarificate: What does the Alpha over Node does? Why can't we blur a material without Pass index? I mean, it's already a seperated and unique object. Why blur isn't just a material's property? Why I can't see the actual render in Render mode view? Thank you in advance, you've already helped me so much. – BrainTrance May 15 '18 at 2:32
• @BrainTrance Happy to help :) I've updated my answer – gandalf3 May 15 '18 at 7:32
• Very informative, I learned a lot from the answers. Lastly, if I want to apply the same effect (Blur) in another material (in the same scene) but I want the other material to have, let's say, a different color, or illumination or whatever, what should I do? Duplicate the above connections and add a -let's say- color balance node? or pass index the other material and create a similar route for it (with the addition of color balance node in the route)? – BrainTrance May 15 '18 at 15:14