1
$\begingroup$

I am trying to create a material to draw a mesh in wireframe mode. Thhe result will the be applied on top of another render, so I want the edges to be painted as black and the rest of the surface to be transparent.

I have tried to create this material, but I'm missing some edges as shown in the images.

Mesh: enter image description here

Material and render view: enter image description here

I have also tried with R channel for the parametric. That renders other edges, but still not all when combining both modes.

How should I configure the material to produce the desired output?

$\endgroup$
1
  • $\begingroup$ Hello :). Just to be clear - do you want to render ALL of the edges? Because it seems you're avoiding the border around your plane. $\endgroup$ Commented Jan 27, 2020 at 19:54

3 Answers 3

2
$\begingroup$

Since your mesh is altready triangulated, you can use the Wireframe Node.

enter image description here

$\endgroup$
0
$\begingroup$

It looks like you forgot to set the wireframe parameter to 1, in the viewport overlay options.

Set wireframe to 1.000

$\endgroup$
0
$\begingroup$

The Parametric output returns the U and V of the Barycentric Coordinates of the shading point in the mesh, triangulated for rendering. For some reason, it doesn't give you W for free, but it can be derived from the other two: W=1-(U+V).

U=0 (your R channel) gives one side of the triangle. V=0 and W=0 the other two.

So you could use something like this to pick out all the edges:

enter image description here

but as you can see, distances are UVW normalized lengths.. without knowing the dimensions of the containing triangle, I don't think you can get absolute, rather than relative, thicknesses for the lines.

$\endgroup$
1
  • $\begingroup$ .. so it's better to use the Wireframe node as @Jachym has answered. $\endgroup$
    – Robin Betts
    Commented Jan 27, 2020 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .