# “wire_mat_gui” add-on, how to render wireframe with visible edges only?

I'm trying to render a wireframe combined with solid using this addon, but for some reason it shows some edges that should be hidden. I made some research but couldn't find anything as I don't know what to look for exactly. I assume it has something to do with the clipping values, but experimenting with them doesn't seem to change anything, it even happens on a new scene. Any thoughts?

• That addon was introduced before FreeStyle was integrated with Blender. I suggest looking at the following link (and links linked in this link) blender.stackexchange.com/questions/3149/… – zeffii Jan 13 '16 at 18:19
• I wasn't able to reproduce this problem, addon provided almost good wire material. I saw kind of that issue if not using loopcuts but W > Subdivide, but couldn't repeat that (so reminds a bug). So it works but probably better to stick to some other way, like Freestyle and stuff (as addon isn't new). Be careful with Wireframe modifier as it adds actual geometry which may be undesired. – Mr Zak Jan 13 '16 at 18:46

I wasn't able to produce a satisfactory render using that addon. I'm not sure if it's a bug in how the script was written, or if it's a bug in Blender, but I noticed that the extra edges show up when you move around in the viewport. If you access the material settings, and modify some of the values of the material, the extra lines disppear until you move in the viewport again.

That being said, rendering a mesh with its wireframe can be accomplished using Blender's built-in modifiers. Start with the default scene, and subdivide the mesh a few times:

Next, tab back into object mode, and scroll to the "Modifiers" tab. Click "Add Modifier" and choose "Wireframe":

When you do this, the mesh will change to show only the wireframe. However, you want to have the original mesh and the wireframe, so uncheck "Replace Original" in the modifier panel:

Next, scroll to the "Materials" tab, and add a new material to your object. This material is going to be the material for the wireframe. So now, you should have two materials, the default material, and the material you just added. Change the new material to whatever you want, in this case, I've created a red material:

Finally, scroll back to the "Modifiers" panel, and increase the "Material Offset" to "1". An offset of 1 will mean that the wireframe uses the second material from the material tab. So, if you had a bunch of other materials applied to your object, and the material you wanted to use for the wireframe was the 10th material in your list of materials, you would set "Material Offset" to "9". Now if you render, the wireframe will be rendered using the new material you created, and the cube will be rendered using the default material:

Does that help at all?

• Mmm, it does help in some way. Is there a way to add a modifier to a lot of objects at once? I'm saying this because I have a scene with 90+ objects, and it is not ideal to be adding that modifier to every single one. Thats why I liked that addon, you press a button and it applies to every visible object in the scene. – L. Soler Jan 13 '16 at 18:25
• @L.Soler this is not a forum but a question and answer site. Please keep it to one question per post. For a new question please make another post. – cegaton Jan 13 '16 at 18:46

Sooo I solved it (kind of). In the "material properties" menu, then "Options" tab. There is a Z-offset value by default at 0.05, apparently that is too much for the scale of my scene, so I turned it down until 0.006 (until it looked decent). The issue still exists, but is not noticeable unless you go really really close to the mesh. I also tried setting it at 0, but most edges dissapear with that value.