# Blender wireframe material missing some edges

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:

Material and render view:

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?

• 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. – Jachym Michal Jan 27 at 19:54

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

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

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:

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.

• .. so it's better to use the Wireframe node as @Jachym has answered. – Robin Betts Jan 27 at 21:21