1
$\begingroup$

I'm trying to render a cube with 2 additional vertical edges on a one of the faces. I use the wireframe modifier for making faces transparent and freestyle for making the dashed edges. The issue is the fact that these 2 dashed edges become non-dashed in render. Can I somehow make the edges to be dashed while the wireframe modifier is applied?

The cube

$\endgroup$
2
$\begingroup$

Using the Wireframe modifier and Freestyle seems to me to be using two conflicting tools to do the same job, The modifier doubles up existing edges, which overlap in the Freestyle output.

At first sight, unless you have special reasons, an option would be to remove the wireframe modifier, and leave the transparency to Freestyle.

enter image description here

Here, the cube's material is set to be transparent so no faces are shown, and the 'Visibility' selection criterion is removed for the solid Freestyle Line Set, so it can be seen through the cube.

enter image description here

For the face transparency to be effective in EEVEE, the Alpha has to be set away from 'Opaque' in the material's Settings panel.

As @Gorgious has commented, for EEVEE, it's probably better to set Alpha than Transmission on the material.

If you need to see one object inside another, and have it occlude the Freestyle lines (while they are not occluded by the containing object), this is one possible logic:

  • In order not to have the internal object display Freestyle, separate the Freestyle objects into a different Collection, and add a 'Collection' constraint to the Line Set selection criteria.
  • To have the outer object's Freestyle occluded by the inner object, you can use a QI range, which makes the display of a Freestyle stroke contingent on the number of surfaces between the edge and the eye point.

enter image description here

enter image description here

$\endgroup$
  • $\begingroup$ Can you tell me, please, how can I set up the transparency of the material? I changed the transmission from 0 to 1, but for some reason any object placed inside the cube is not visible. $\endgroup$ – Mikhail Nono Feb 12 at 8:10
  • $\begingroup$ Have you changed the blend mode of the material in the settings foldout ? $\endgroup$ – Gorgious Feb 12 at 8:41
  • 2
    $\begingroup$ Try changing the "alpha" value to 0 instead of the transmission value $\endgroup$ – Gorgious Feb 12 at 8:57
  • 1
    $\begingroup$ @Gorgious Now it works fine, but the issue is the visibility of some edges. The back edges of the cube are overlapping an inner figure. $\endgroup$ – Mikhail Nono Feb 12 at 9:26
  • 1
    $\begingroup$ @MikhailNono .. see edit.. $\endgroup$ – Robin Betts Feb 12 at 11:17

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.