0
$\begingroup$

I am working on a scene with a tube, inside the tube is a smoke animation. The tube is cut open on one side so that you can see what is happening inside. The smoke is of course set to collide with an (invisible) closed tube. The lower part of the tube is animated. Some objects that are part of the bottom of the tube are emitting light and the compositor is used to make them glow. This is done using the material pass index.

Unfortunately, the smoke domain does overlap sometimes with the glowing objects which blocks the material pass index. The objects themselves can be seen in the final render, but the compositor ignores them. Since the bottom is animated and is a smoke collider, the domain itself has to be big enough to include the lowest possible position of the bottom. The scene actually works in most cases, since the adaptive domain is above the glowing parts most of the time. Only a few frames the domain hides the glow - without any visible smoke being there.

Is there a way to set the domain to not emit its own material pass index, so that the material pass index of the glowing objects is recognized and used by the compositor?

$\endgroup$
0
$\begingroup$

The most not intrusive method (that will allow You achieve the effect without many changes) would be to duplicate the object, that material pass You're using, put it to another layer, create Render layer for it (only that layer would be rendered, (if it's in Cycles also with other layers selected as Excluded) Check only Material Pass for this layer and uncheck all others, and Use the material index rendered this way in the compositor.

$\endgroup$
  • $\begingroup$ I was afraid it would involve something like duplicating parts of the scene. Thanks for the walkthrough! $\endgroup$ – A. Tropics Oct 11 '16 at 12:42
  • $\begingroup$ I have not tested the proposed solution since I was able to adjust the smoke so that the adaptive domain was no longer obstructing the glowing things. $\endgroup$ – A. Tropics Oct 18 '16 at 19:33
  • $\begingroup$ However, I will mark the answer as I think it is valid and working. I would love to see a checkbox in blender to disable material index for an object though. $\endgroup$ – A. Tropics Oct 18 '16 at 19:35

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.