4
$\begingroup$

Can Freestyle draw lines when an object is behind a transparent plane (or any other transparent object)? The render below shows the issue, the freestyle lines that should be drawn on lower arm and hand don't get drawn.

the lower arm and hand are missing some lines

$\endgroup$
6
$\begingroup$

Visibility is computate without considering textures alpha.

From the a Blender reference manual's page on the topic, one of the known limitation is:

Transparent faces are treated as opaque faces

Blender is currently (2.76b) not able to distinguish transparent surfaces from opaque surfaces, I would guess it will unlikely be able to use the alpha channel of a texture the way you planned.


A possible workaround for your particular situation may be to separate the freestyle render layer, move all the object that could occlude the freestyle lines on a separate layer and exclude it from the freestyle render layer.

Masking the layer would be the perfect option, but sadly is currently another of the known limitations:

Layer masks do not work with Freestyle.

enter image description here

'Suzanne in Hell'

In the image above you can see how the selected plane is on the layer 10 (the yellow dot in the layer selector), which is the same layer not highlighted in the freestyle render pass (just behind the cursor).

Next step is to hide the lines behind the "solid" texture of the plane. In this example I used the Z channel of the first render layer:

enter image description here

With a "Greater Than" Math node filled with an appropriate value (must be animated if the camera is moving fowanrd and backward) I isolated the part of the scene far away from the camera and used this mask as a factor form alpha mixing the layers.

enter image description here

Note: Z-pass is not anti-aliased; in a the previus scene this doesn't reperesent a big a problem, but, if needed, you can use in the same way the Mist pass (which is anti-aliased, but take a few more steps to be set up)

|improve this answer|||||
$\endgroup$
  • $\begingroup$ awesome answer carlo, I'll see if I can set up a composter solution, thanks! $\endgroup$ – slowpulseboy Nov 11 '15 at 10:01
1
$\begingroup$

It cannot. You can set freestyle to ignore occlusion completely, but then it will draw lots of lines that you don't want as well. You could have the transparent object be on a separate layer that freestyle ignores, but this may cause other layering issues.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thanks for the reply. I can't get it to work using multiple layers either, so I'll try composing instead.... $\endgroup$ – slowpulseboy Nov 11 '15 at 9:50
1
$\begingroup$

An alternative solution was to add a 2nd scene and copy and paste the transparent plane from the original scene into it, then deleting the plane in scene 1. I also made a linked copy of the camera in scene 1 and added it to scene 2 in scene 1: 3d-view, select the camera and then click Object/Make links/enter image description here

Composting nodes setup as shown below (node setup in scene 1):

enter image description here

Make sure not to render the sky in scene 2! (ö)

|improve this answer|||||
$\endgroup$

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.