Wireframe render tutorial
Hi!
Since the last tutorial I made, in which I tried to explain the advantages of using subdivision surfaces was quite a success and attracted a lot of positive reactions, I was encouraged to try and share some more of my experience as a 3d artist with you. Again, I will try to address a relatively simple topic, which might add a little more quality into your renderings and 3d artwork.
My name is Ivan, and today, I will try to shed a little light on the subject of wire frame rendering. I think, I don’t need to explain what a wire frame is. Everyone knows them, everyone likes them, they can give your rendering the futuristic digital look you want, but it is not always easy to achieve this effect, like shown in the picture bellow:
Since some of the renderers out there have tools, which are specifically designed to create the wire frame effect, I won’t address them. You can always look them up in your renderer´s manual (for example the EdgeTex material in Vray).
But there is still a majority of software out there, which do not possess the tools to help you render a wire frame, like Luxology´s Modo for example, which I am going to use during this tutorial.
The first thing, that comes to mind, is to create a mesh, that will render as a wire frame. In 3ds Max, you can use the Lattice modifier, in Modo, there is a special script to do this. You might just be satisfied with this solution, but there are a lot of downsides to this technique.
Firstly, it is not possible to use this with a subdivision surface. Another downside is the increased polycount, which slows down your view port reaction times and consumes a great amount of resources at render time. Furthermore, since you have a whole bunch of extra geometry in your scene, which consists of subtle profiles and cuts into another surface, you need a whole lot more samples for ray tracing, and are still bound to have some artifacts in your rendering after an increased amount of time. I haven’t really experimented with this technique in Modo, so I can’t offer you a picture, but I’m sure you can imagine this. And if you are curious about this plug-in, you can easily look up the script or some examples.
The road I tend to take is an image texture (like the ones in the picture above). It is easily done, consumes an ignorable amount of resources and gives you quite a good control of the outcome. For this approach, you have to have basic knowledge about UV mapping and projection, which I am not going to explain thoroughly in this tutorial, there are a whole bunch of tutorials on this topic, and the steps can differ a bit depending on the software you use.
The first texture-based technique, I am going to show you (and yes, I am keeping the best for the grand finale), is based on the so-called Barycetric projection. What this basically does, is to take every single polygon and stretch it into the UV space (more specifically: the square between the 0,0 and the 1,1 coordinates). In the end, you get something like this:
As you can see, the projection is not perfect, as it only works correctly with quads, and triangles and n-gons can’t be properly stretched into the quadratic UV space. Now, all that needs to be done is to apply a framed square texture, as the one in the second picture, tagged as a barycentric wire frame texture . As you can see below, although this method has its drawbacks, the final render doesn’t look that bad (picture below).
You can probably see one thing though, the line width is not constant throughout the model (I intentionally made the wire frame thick, so you can get a better view of the differences in width). This is one of the drawbacks of barycentric projection. All the polygons get stretched to the same size in the UV-projection space, but their sizes in the XYZ space differ, which creates a size distortion…
And now, to the method you have all been probably waiting for, the one I consider to be the best workaround, if your software doesn’t have a generic Edge-based texture:
The first step would be to completely unwrap your model (to unwrap a model means to create UV mapping coordinates for every single polygon). This might sound scary at first, if you haven’t done much unwrapping up until now, but a good UV map is a vital part of every good 3d model. You should get used to creating UV coordinates for your models, not only because of the wire frame-workaround, but also because of later export (for example: the .obj file format doesn’t save partial UV-s, only those, which include every single polygon) or texture baking. This is how an unwrap can look like:
As you can see, there is a lot of unused space, which of course is not the optimal solution, but will have to do for the purposes of this tutorial. But be assured, this unused space is not the result of my laziness to scale up some of the parts to get the maximum out the pixels of the map we are going to create. If you draw textures, it is only natural, that the parts of your model, which need a higher detailed texture will take up more UV-space, than those, which aren’t as exposed in the final render. In that case, it would make sense to use as much texture-space for the detail-demanding parts as possible, but our purposes are a little different now. We need to make sure, the overall proportion-ratios of the polygons in UV space to those in the XYZ space are as constant possible (a great tool to help you do this is Modos new distortion view, that gives polygons colors, depending on their surface size ratio between the UV and XZY spaces) . This is to prevent the distortion of the line width, like we had in the barycentric-projection method.
If you feel, that this uneconomic UV layout might waste your resources, or just want to have a good looking texture, you can always add another UV map with a proper layout (as I mentioned in my earlier tutorial about subdivision surfaces, a mesh can have multiple UV maps applied to it at the same time) and bake the texture in it from the one we are going to make.
Once the unwrap is done, we have to export our wire frame from UV space into a 2d editor ( Adobe Photoshop in my case), to do a little tweaking. In modo, the process is fairly easy:
As shown on the picture above: texture export UVs to EPS (with the right UV map selected) and all that is left is to choose a location to save the file to. Now, we have to fire up Photoshop (or any other 2d editor you like to use) and import the EPS file.
If you choose a big enough resolution, your EPS file should look something like the picture above. Do not get scared, if you can’t see anything in the EPS file yet. Now we add a Stroke style to the layer, to make the wire frame visible, you can try a few different stroke widths and colors, to see which one you like the most.
After this, you just save the image as a raster file, a Jpg or a Png. The Png has the advantage of an integrated Alpha channel, so you don’t have to mask the wire frame texture afterwards, if you want to use a more complex material, or you can simply use the the wire frame texture as a layer mask inside your 3d software’s material editor and edit the wire frames color with the layer, that is masked by the wire frame texture.
This is what you get, if you use the image map we created with the UV coordinates it was originally created from:
So… that’s it! Hope you learned something new and enjoyed reading this tutorial.
This time, I won´t add the model I used for download, because it´s the famous Utah Teapot (the first 3d model ever created, that wasn’t a cube, sphere or cylinder). This 3d model is one of the basic primitive objects, that are part of most of today’s software’s object libraries.
Now it´s time to experiment yourself, have fun! If you liked this tutorial, don’t hesitate to leave a comment, that might help me improve my future tutorials or suggest topics, that interest you, but aren’t well covered anywhere.












3:11 pm
wow very long prosess; Or you can just used the wire render script.
3:11 pm
hi, it may seem a little complicated at first, but after the model was properly unwrapped, creating the wireframe texture and applying it to the model took me less than a minute…
3:12 pm
Hi, I want to apologize for one misleading information I offered in this tutorial, the wireframe script for modo actually does work with subdivision surfaces…
3:14 pm
Your process works; But I’m lazy. :)
3:15 pm
a stupid question, why is just one of the UV quadrants used for texturing, how come the other 3 are not used ?
3:16 pm
Hi Sznot, the question is not not stupid at all… to be honest, I can´t give you a 100% correct answer, the only thing, that comes to mind is , that it´s “nicer” to work in a 0 to 1 space, than to work in a -1 to 1 space. Not using the other quadrats is no loss for anyone though, since you can fit an image of any resolution you like in the 0-1 quadrant (just try to think of it as 0-100%)
And as to why the other quadrants are shown, although not really being used… well, you just gave a nice idea for a new tutorial, thanks ;-)
3:17 pm
thank you for the fast answer, looking forward to see your new tutorial :D