0

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

icYou520
  • 5,479
  • 4
  • 27
  • 55
  • It is likely the old bug on the render viewer and nothing wrong with your object or render, just that the viewer cannot display associated alpha correctly. Read: https://blender.stackexchange.com/questions/32900/how-to-properly-render-smoke-on-a-transparent-background and https://blender.stackexchange.com/questions/41574/render-semi-transparent-volume-with-cycles try viewing your image as RGB (not as RGBA) https://i.stack.imgur.com/rAoxU.png and report back. –  Jun 14 '18 at 17:28
  • Also related: https://blender.stackexchange.com/questions/57816/how-do-i-get-the-glare-node-to-output-transparent-instead-of-black-background/57824#57824 –  Jun 14 '18 at 17:31
  • You're absolutely correct. I tried in 2.79b and the latest FM build with the same problem. This is good to know. Actually I might just try EEVEE for this project now that I think about it. Thanks. – icYou520 Jun 14 '18 at 17:39

1 Answers1

1

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

Tavi Kohn
  • 767
  • 4
  • 8
  • 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. – Tavi Kohn Jun 14 '18 at 17:42
  • In the future, you can also use object index to filter out foreground from background. See https://docs.blender.org/manual/en/dev/compositing/types/converter/id_mask.html for more. – Tavi Kohn Jun 14 '18 at 17:46