1
$\begingroup$

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.

screenshot

Thanks in advance.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

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.

enter image description here

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:

enter image description here


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.

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$ Commented May 15, 2018 at 2:32
  • $\begingroup$ @BrainTrance Happy to help :) I've updated my answer $\endgroup$
    – gandalf3
    Commented May 15, 2018 at 7:32
  • $\begingroup$ 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)? $\endgroup$ Commented May 15, 2018 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .