Partial rendering

How to render out only one part of the image like smoke, water, object.

If I would like the smoke to be rendered at 3000 and the rest of the image at 1000 samples, how can I make only smoke being rendered at 3000 samples? Same for objects and stuff…

Hi Vadrigar,

Put them on different layers and render separately (with transparent background). Then combine all in Compositor.

If I render the slot 1 at 500 samples and slot 2 at 1000, how do I put them together, I did the way you told me and watched some tutorials but the problem stays the same (both object are rendered at the same number of samples because they are within the same slot). I want to render them at different slots at different number of samples and then put those two images into one.

Oh yea, there is an option under render layers to choose how many samples I want for each render layer, nevermind thx.

Ok, now the problem is when I enable the background in the image I can see a small outlining between the object and the background (grey outlining).

Vadrigar, show the image where you get such a result.


You see around the cube and plane, the same thing would appear around the monkey head if I connected monkey render layer environment (the grey outlining would dissapear from the cube and plane and would appear around the monkey)


You see, now it’s around the monkey head.

Turn the Alpha Channel off:


Setting the alpha channel to unpremultiplied in viewer does not solve the initial problem. What you need to do is render the background without a hole in it. You don’t need a hole in BG to composite something on top of it. The hole gives you incorrect alpha in areas with semitransparent pixels, thats why you get this halo effect.

Or If you really need to puch a hole in bg, use an Add operator from MixRGB node instead of AlphaOver.

Merge/over op is based on an expression C = Aalpha + B (1-alpha), where A is foreground element, B is background and alpha is the alpha of A. In your example you already gave the B*(1-alpha) part done, but Blender does not expect that and you will get it doubled, thus the artifact. But if you simply add your cube to your bg, you get correct result.

EDIT: Just to add more confusion, you can also unpremultiply your current result with AlphaConvert node (set mode as Premult to Straight) and you will get something that looks more correct. AlphaConvert does the same thing that the button in viewer, but actually modifies your image, not just view.

EDIT 2: one more option: if you unpremultiply the bg (AlphaConvert with Premult to Straight) before merge, you will get correct result also with AlphaOver node.


Good I fixed it, I just had to add one more render layer which is a background.

  1. layer (cube and plane)
  2. layer (monkey)
  3. layer (background)
    And then connect them properly

Kesonmis, rendering with a hole will reduce the time of rendering… sometimes very drastically (of course if different layers use different number of samples).

Depends on what you are actually doing. A hole in bg forces you to always re-render the bg also if fg changes. Not always so with solid elements. And I personally find it much more clear and simple to handle comp wise if solid stuff does not have holes in it.

To clarify, the usual cause of “halos” in compositing is anti-aliasing. This technique is used to soften edges but it can create outlines.