3
$\begingroup$

I am working on a project that requires the freestyle lines render set. I am creating a 3D floor plan and would like to overlay dotted lines as the "walls" of the building. How can I render the outline of a certain object, but neglect the faces?

i.e. : Example of effect I would like to achieve

Note I am using Blender 2.82

Any and all info would be much appreciated!

$\endgroup$
4
$\begingroup$

In order see the freestyle lines of an object through or behind another object one needs to combine the rendered images of separate collections in the Compositor.

But if you want to simply make a single object invisible so only the freestyle lines would be visible (or in other words: neglect the faces), then in most cases you can just uncheck a box, depending on what Blender version and/or render engine you are using.

2.82a Cycles (and likely other 2.8x versions)

Properties > View Layer properties > Filter, and uncheck the box next to Surfaces enter image description here

2.82a EEVEE

With EEVEE the above option seems not to be available, but you could make an invisible material instead enter image description here

And if you wanted to see the freestyle lines on the edges on the back of an object, the back relative to your current camera view, (to neglect faces even more) then you'd have to use a second Freestyle Line Set. First one that will render lines with Visibility: Visible, and also one with Visibility: Hidden.

enter image description here

2.79b Cycles

If you are using older versions of Blender or render engine, uncheck the following boxes to not render your objects (and only see freestyle lines).

Properties > Render Layers > Layer

enter image description here

2.79b Blender render

Properties > Render Layers > Layer

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Good to point this out... avoids multiple passes in many cases. $\endgroup$ May 22 '20 at 6:40
5
$\begingroup$

It looks as though you want to make the walls transparent to the floor, but not to themselves. (They're occluding their own back edges)

For maximum flexibility, you can set Cycles to render a separate Freestyle-only pass on transparent film ..

enter image description here

EDIT: 2.91 .. I think the filter selection is now negative: what's required is to uncheck all filter options, with Freestyle switched on.

enter image description here

.. link your walls and floors to separate Collections ... here, named 'Solid' and 'Transparent'.

enter image description here

Create a View Layer for each Collection. Deactivate unwanted collections in the corresponding layers as shown above. Each layer gets its own Freestyle Line Sets, which can be set to pick up Visible, Freestyle-Marked edges. Then you don't have to worry about transparency in the Line Sets themselves, because you're using the Compositor to overlay them:

enter image description here

This will increase rendering time a little (is this for still images?) but you can set the samples down in Cycles quite a way, 32 seems to give adequate anti-aliasing on the lines.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Oh, you can do a Freestyle-only pass? How did I miss that? :) Thanks, I'll be using this a lot. $\endgroup$ Mar 20 '20 at 16:46
  • 2
    $\begingroup$ @JachymMichal I think that will be coming to EEVEE, too.. it's all post-process, I can't see why not, when the devs have had time. What's a mystery to me, is why I can't sample at 1. I can't work out what the Cycles sampling rate has to do with Freestyle lines. $\endgroup$ Mar 20 '20 at 16:57
  • 1
    $\begingroup$ Hi @RobinBetts, thanks so much for this! Really appreciate your input. This solution will fit my model perfectly. $\endgroup$
    – Daynedk23
    Mar 25 '20 at 9:04
3
$\begingroup$

You can blend objects with world background using the same color.
Then just uncheck Visibility in Freestyle settings. enter image description here

  1. Toggle Visibility in Freestyle Line Set to ignore faces
  2. Use pure Emission shader to blend objects with world background. Match the color.
  3. Enable Dashed Line in Freestyle line style

To combine different Freestyle lines, use collections.

$\endgroup$
3
  • $\begingroup$ Hi Jachym,Thanks for this. This works in most setups, but still seem to struggle in some situations. A work around for this is to add a wireframe modifier to the object with an insanely thin width, then freestyle over it. $\endgroup$
    – Daynedk23
    Mar 20 '20 at 13:43
  • $\begingroup$ Hello :). In which situations does it not work for you? Perhaps others can help if you add more details. $\endgroup$ Mar 20 '20 at 13:45
  • $\begingroup$ Thank you Jachym, I am not sure yet how to add the detail so will work on this and post asap! $\endgroup$
    – Daynedk23
    Mar 20 '20 at 14:26
1
$\begingroup$

As of Blender 3.0, it is now possible to have Freestyle render to its own render pass--though it isn't immediately obvious how.

Go to your view layer (not render) properties, and select the "Freestyle" tab. It is, for me, the third one down. In it, you will have a drop down for control mode, "View Map Cache", and after that, "As Render Pass". Check "As Render Pass".

View Layer Freestyle Properties

If you go to your compositor (and enable it by clicking "Use Nodes" at the top), you'll note that you now have not just Image and Alpha, but Image, Alpha, and Freestyle. Lead Freestyle to your composite out, instead of Image, and you'll have nothing but the Freestyle sketch!

enter image description here

$\endgroup$
0
$\begingroup$

Another way around this is to add a wireframe modifier to the object you want to "see through", set the width as low as possible and then add freestyle over it. Seems to work fine for my simple box approach, might not work with intricate shapes though.

$\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.