<p>A seam can be defined as a line along the mesh where the vertices are doubled each with different texture coordinates.</p>

<p>So that's what you should look for. The set of vertices where there is a twin in the same position with different texture coordinates.</p>

<p>Depending on how the obj file was built that will be simple if they didn't duplicate the position when a vertex became part of a seam. Or it's not as simple because you need to deduplicate positions again.</p>

CC BY-SA 3.0
2017-11-03T20:29:52.190Z
I unwrapped a cube in Blender into six islands to test out what you're using. I got 8 vertices but each was linked to 3 different textures, like so: f 1/1/1 2/2/1 3/3/1 4/4/1 f 5/5/2 8/6/2 7/7/2 6/8/2 f 1/9/3 5/5/3 6/10/3 2/11/3 f 2/12/4 6/13/4 7/14/4 3/15/4 f 3/16/5 7/17/5 8/18/5 4/19/5 f 5/5/6 1/9/6 4/20/6 8/6/6 Is this an example of the vertices having been deduplicated? (Because there is only one instance of each vertex but each is linked to several textures)
ganesha123
CC BY-SA 3.0
2017-11-03T20:40:54.587Z
@ganesha123 yeah, I dislike the obj format but this is the one thing it's decent for.
ratchet freak
CC BY-SA 3.0
2017-11-03T09:58:13.187Z
2017-11-03T09:58:13.187Z
ratchet freak
<p>I have a .obj file with accompanying .mtl file and texture files. I want to extract the coordinates of the seams on my mesh. I then want to plot these seams in a 3D matrix in Python. Is there a fast way to do that?</p>

<p>Further clarification: I have found a way recreate my mesh in my Python IDE using a library called Pymesh. I now want to plot the seams of my mesh (the ones that will give me the unwrap that I have in my texture files) in a 3D matrix as well. One way I could do this is to write a script that takes the edge points of all my UV islands, and then searches the .obj file for the 3D coordinates that they map to (and translate that into coordinates appropriate for my 3D matrix in Python). 
That will take a long time though - is there a faster way?
I also asked this in the Blender StackExchange as I wasn't sure which was more appropriate. </p>

<p>Thank you!</p>

CC BY-SA 3.0
2017-11-03T12:33:58.207Z
*"plot these seamns in a 3D matrix"*? Can you give a short explanation what you understand as a "3D matrix"?
Christian Rau
CC BY-SA 3.0
2017-11-03T17:47:29.923Z
Yup! Essentially as voxels. So I'm imagining a 100x100x100 3D space. I would plot the meshes in that space. Then I would plot the seams in that same space, on top of the meshes. Is that clearer?
ganesha123
<uv-mapping>
Extract 3D seam coordinates from
ganesha123
# Extract 3D seam coordinates from

(Asked by: username_0 on 2017-11-03)

I have a .obj file with accompanying .mtl file and texture files. I want to extract the coordinates of the seams on my mesh. I then want to plot these seams in a 3D matrix in Python. Is there a fast way to do that?

Further clarification: I have found a way recreate my mesh in my Python IDE using a library called Pymesh. I now want to plot the seams of my mesh (the ones that will give me the unwrap that I have in my texture files) in a 3D matrix as well. One way I could do this is to write a script that takes the edge points of all my UV islands, and then searches the .obj file for the 3D coordinates that they map to (and translate that into coordinates appropriate for my 3D matrix in Python).
That will take a long time though - is there a faster way?
I also asked this in the Blender StackExchange as I wasn't sure which was more appropriate.

Thank you!

**Tags:** uv-mapping

> **Comments:**
> **username_1**: *"plot these seamns in a 3D matrix"*? Can you give a short explanation what you understand as a "3D matrix"?  
> **username_0**: Yup! Essentially as voxels. So I'm imagining a 100x100x100 3D space. I would plot the meshes in that space. Then I would plot the seams in that same space, on top of the meshes. Is that clearer?  

---

## 1 answers

### Answer by username_2 on 2017-11-03. Score: 2

A seam can be defined as a line along the mesh where the vertices are doubled each with different texture coordinates.

So that's what you should look for. The set of vertices where there is a twin in the same position with different texture coordinates.

Depending on how the obj file was built that will be simple if they didn't duplicate the position when a vertex became part of a seam. Or it's not as simple because you need to deduplicate positions again.

> **Comments:**
> **username_0**: I unwrapped a cube in Blender into six islands to test out what you're using. I got 8 vertices but each was linked to 3 different textures, like so: f 1/1/1 2/2/1 3/3/1 4/4/1 f 5/5/2 8/6/2 7/7/2 6/8/2 f 1/9/3 5/5/3 6/10/3 2/11/3 f 2/12/4 6/13/4 7/14/4 3/15/4 f 3/16/5 7/17/5 8/18/5 4/19/5 f 5/5/6 1/9/6 4/20/6 8/6/6 Is this an example of the vertices having been deduplicated? (Because there is only one instance of each vertex but each is linked to several textures)  
> **username_2**: @username_0 yeah, I dislike the obj format but this is the one thing it's decent for.  

---

