2
$\begingroup$

I don't even know how to ask this question and I a noob to blender.

I wanted to create a plasma canon

I created 3 render layers and Added them on top of each other...

For now this looks pretty good

Gun Front Front

Compositing tree tree

But then I tried to look at the gun from the back.... the bullet gets put in top of the gun. Is there any (easy) way to have the layers retain Z order?

Gun view back (bad) back

$\endgroup$
2
  • 2
    $\begingroup$ Great question! Compositing is an oft-overlooked feature, especially using Cycles. $\endgroup$ – Matt Oct 2 '15 at 15:55
  • $\begingroup$ When I discovered it. a whole new world opened... (It took me 3 days to find out this feature even existed) I only joined after cycles got implemented, I am still feel like a noob. Maybe you know of a way to get this effect without compositing? I tried but with nodes and materials alone I could not do it. $\endgroup$ – user2888973 Oct 3 '15 at 22:29
4
$\begingroup$

Yeah no problem,

On the flame render layers layer settings, under the Layer: blocks, there's a Mask Layer: set of blocks. Just select the corresponding layer for the cannon (so you're applying the cannon as a mask to the flame)

layer setup

Below is an example using a cube and a sphere, the sphere occluding and masking the cube.

mask setup

The Cubes' render layer output

cube masked

$\endgroup$
2
  • $\begingroup$ I thank you so much... it works great... I am still in the progress of making the gun and can't post new pictures right now (Read: I screwed it up a bit) I will post them in the next week so, so everyone can see. $\endgroup$ – user2888973 Oct 3 '15 at 22:58
  • $\begingroup$ hey great, I'm glad it worked out. Good luck with the project, look forward to seeing the finished product. $\endgroup$ – Tim Bahrij Oct 4 '15 at 3:16

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.