
Hi, the vertex normal in the wavefront obj format are not Vertex properties. The relation between normals and vertex is done when adding faces ("f v/vt/vn ..."). In such a case, the vertex normal is not unique per vertex, but per vertex and per face. I guess, OpenMesh encodes the normals as halfedge properties, since they are, like the normals in obj, unique per vertex and face. Greets, Matthias Möller On 08.11.18 03:38, Nicholas Yue wrote:
Hi,
After loading a file (e.g. an OBJ file)
v 0 1 0 v -0.942810297 -0.333329707 0 v 0.471405149 -0.333329707 0.816497624 v 0.471405149 -0.333329707 -0.816497624 vn 1.19208849e-07 1 0 vn -0.942809761 -0.333331376 0 vn 0.47140494 -0.333331257 0.816497147 vn 0.47140494 -0.333331257 -0.816497147 vt .... vt .... vt ....
I queried the properties via _vprop()
size_t n_vprops = mesh.n_vprops(); for (size_t prop_index=0;prop_index<n_vprops;prop_index++) { std::cout << boost::format("prop[%1%] is %2% ") % prop_index % mesh._vprop(prop_index).name() << std::endl; }
I get the following which I am trying to understand.
prop[0] is v:points prop[1] is <vprop>
I was expecting a string containing "n" or "normals" for prop[1]
My quest is to find out the different type of attributes are found in the file I read in.
In my case, the normals are "shared" i.e. number of points is same as number of normals whereas for texture coordinates, they are not shared at all i.e. each face texcoord are "island"
Cheers -- Nicholas Yue Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5 Custom Dev - C++ porting, OSX, Linux, Windows http://au.linkedin.com/in/nicholasyue https://vimeo.com/channels/naiadtools
_______________________________________________ OpenMesh mailing list -- openmesh@lists.rwth-aachen.de To unsubscribe send an email to openmesh-leave@lists.rwth-aachen.de https://lists.rwth-aachen.de/postorius/lists/openmesh.lists.rwth-aachen.de