- Home /
Unity 5 - Import mesh vertices / edges only
Hi,
is there a way to import meshes that have only vertices or edges (a line between two vertices), but NO faces (face between three vertices)?
When I import such a file (OBJ, exported from blender), Unity 5 just does not create a Mesh.
Thanks!
The Wavefront OBJ file format contains a vertex list, followed by a list of faces. The OBJ wouldn't contain any information about edges.
Is there some reason that you can't have faces already defined in blender and exported? Finding the faces of a mesh given only vertices and edges is a hard problem.
Take a look at this example:
Let the vertices of this mesh be the black dots, and the edges be the red and green lines. Given this information, what are the faces of this mesh? It's quite obvious that the triangle formed by the green edges shouldn't be a face, but there's not an easy way to deter$$anonymous$$e this, especially for more complicated meshes. (There are ways to do it if your mesh is manifold, but that's generally not the case.)
An edge doesn't really exist for a mesh inside Unity. A basic mesh in Unity consists of vertices and triangles. However, you can use a wireframe shader (or image effect) if you want to show the edges without opaque triangles.