0
$\begingroup$

This question already has an answer here:

Not sure what I am missing, I am using a wireframe modifier with material offset to 1.

The render preview window is the correct way I want.

enter image description here

This is what renders:

enter image description here

enter image description here enter image description here

EEVEE seems to do it just fine.

enter image description here

EDIT: CEGATON comments below are correct.

enter image description here

$\endgroup$

marked as duplicate by cegaton, Community Jun 14 '18 at 17:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1
$\begingroup$

Try using Z depth in the compositor to calculate transparency, instead of the Film > Transparent checkbox. I think blender is trying to calculate transparency using the surface of each material, so your volumetric material gets treated as if it is totally transparent (because it has no surface).

You can use a node setup like this: The number in the less-than node makes it so that anything far enough away from the camera (at least 1000000 blender units in this case) gets drawn as transparent. For my test scene, the value 100 worked as well. Once you change this, you no longer need to use the "transparent" checkbox so you can uncheck it if you like.

This works because the world background has a Z depth of about 10000000000, as opposed to the Z depth of cube in my scene, which has Z depth ranging from about 5-9 (its faces are between 5 and 9 or so blender units away from the camera). Because the Z depth of the background and the stuff in the scene is so different, you can just pick a value in between and make everything transparent if the Z depth is higher than that value. Z Depth-based transparency node setup

$\endgroup$
  • $\begingroup$ Honestly this is a long winded and not very good explanation, but the node graph should work fine for what you are doing, for now. $\endgroup$ – Tavi Kohn Jun 14 '18 at 17:42
  • $\begingroup$ In the future, you can also use object index to filter out foreground from background. See docs.blender.org/manual/en/dev/compositing/types/converter/… for more. $\endgroup$ – Tavi Kohn Jun 14 '18 at 17:46

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