1
$\begingroup$

I’ve been trying to render a grease pencil drawing on top of a Freestyle rendered object. But, when I do it the Freestyle lines can be seen behind the Grease Pencil object. Is there a way to solve this?

I made an example with a blue circle made with Grease Pencil, in front of a cube rendered with Freestyle.

I’ve tried using Eevee, Cycles and Benchmark.

Thanks in advance.

Viewport:

enter image description here

Render:

enter image description here

$\endgroup$
1
$\begingroup$

This isn't a perfect solution (I don't know that there is one, at least as of 2.82) but when faced with the same problem, I added a utility mesh to put behind the grease pencil object, just so that the freestyle pass knew to obscure whatever was behind the mesh. In order to stop the utility mesh from itself creating freestyle lines, I added to a collection that I then excluded under Freestyle Line Set. I'm animating my grease pencil object using an armature, so I parented the utility object appropriately to the same armature, so it moved in sync with the grease pencil drawing.

Another cleaner possible solution, depending on what your scene required, would be to render the grease pencil object and the 3d environment separately and composite them together afterwards, but that only works if you never want any of the rendered objects in front of the grease pencil drawing (though, of course, you could also composite more than two renders together, but this could get more complicated than the first solution).

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you jwrush! I'll try this method. $\endgroup$ – nestorantonio Apr 29 at 20:46

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.