Ok, I know I might get a couple eye rolls from this one but how would I go about rendering wire frames? I have a pretty good system for faking them with textures, but you just can’t get that true vector look with textures.
The other catch is I’d like to have quads as well as tris. Any suggestions (no matter how oddball)?
I’d really be interested in seeing a wireframe renderer. Textures just don’t look right, and true wireframes should be cheap to render, shouldn’t they?
Agreed, textures just don’t look the same (unless you bump the texture resolution way up), but I haven’t seen “real” wireframes in any game engine recently.
That’s gonna be tricky, as every game engine I know of uses tris.
In case you haven’t tried it, here’s a couple methods that’ve worked for me:
If you just want wire frames with hidden lines removed: “bake” your UV map onto a texture, make the background transparent and apply to your model.
If you want the hidden lines to be a different color: do the same as above, except make a duplicate model (slightly smaller), make the second line texture a different color and flip the normals on the model. I used the same technique for “toon shading” in engines that didn’t support it.
Until you get the shader figured out, one thing you could do (for a work around); Export a UV map and use that as the texture with the particle shader to get an OK wireframe.
(See pics attached)
And yes, unfourtunately, it probably doesn’t look as good as a shader would.
EDIT: I didn’t see bigkahuna’s post. This is an example of what he said
Yeah, exporting a UV snapshot and then using that as the alpha is a good one step method except that each unique shape requires its own unique texture. What I’m doing right now is using a generic texture that can fit into every quad or tri on any shape… it looks pretty good, but the two problems are ugly disappearing lines at a distance and of course pixelation up close. Plus I’m not sure how efficient it is to generate that many UVs.
Thanks for the link Peter… they even offer an Xcode project for macs!
The Unity engine is obviously perfectly capable of rendering wireframes (nicely antialiased even), as anyone who’s used the scene view in wireframe mode knows. I bet the OTEE guys didn’t think anyone would want to use it in a game though. Maybe they’ll enable it sometime?
In the meantime, what about the line renderer? I’ve never used it for anything, so for all I know that’s a stupid suggestion.
Pretty sure. I have the editor set to a non-antialiased quality setting too (the game view isn’t antialiased), but the wireframes look a little different (even more antialiased?) if I turn on AA for the editor.
Neat! Mine aren’t. Only the background grid. Wonder why. If they’re using GL_LINE_SMOOTH, that’s notoriously bad on different graphics cards. In fact, it looks like it isn’t working worth crap on the Radeon 9600 card. http://homepage.mac.com/arekkusu/bugs/invariance/HWAA.html
Quite often that’s not true. Majority of consumer graphics cards are about 2-3 slower in rendering wireframe than rendering filled polygons. And when meshes use triangle strips with degenerate triangles, they look completely wrong when rendered in wireframe. We de-stripify meshes on the fly in Unity’s editor when wireframe is required, but would be a stupid thing to do in the final game.