how to make vertex ids the same over multiple meshes
See original GitHub issueHi,
is there a way to make sure that the vertex ids of multiple meshes are the same. I use trimesh to load multiple person into a tool, e.g.
After having marked every mesh with a new point (the black dot) I try to brute force find the closest point given the set of meshes and vertices.
So far I am trying following:
joints = np.concatenate(scenes['joints'])
search_candidate = True
i = 3
while search_candidate:
vert_ids = []
for mesh in scenes['meshes']:
distances, ids = mesh.kdtree.query(joints, i)
vert_ids.append(ids)
vert_ids = np.concatenate(vert_ids)
vert_id = self.search_common_vertex_id(vert_ids)
if vert_id is not None:
search_candidate = False
i += 1
for scene in self.scene_chache.values():
mesh = scene.geometry['geometry_0']
mesh.visual.vertex_colors[vert_id] = [0, 255, 255, 255]
But the resulting vertex id at the end sometimes marks the ear or the other knee. Is there a way to come around this?
Edit: Currently I’m storing multiple scenes per mesh and point in a dictionary. So I think the more precise question would be how can I make sure the different scene objects are in the same coordinate system?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Can vertex indices be transferred between identical meshes?
1 Answer 1 · In Object mode first select Red object then select the Green one. Object menu > Make Links > Object...
Read more >Solved: Transfer vertex order between combined objects - Maya
Solved: I'm working on a blendshape script, and for it to work, I need the two objects to have exactly the same vertex...
Read more >polygon vertex ID with same topology issue - CGTalk
The other option if the two meshes are identical is to use Modify > Snap Align Objects > 3 Points to 3 Points....
Read more >3DQuickTips 017 - Maya - Get Your Vertices In Order - YouTube
What if your vertex number have changed? ... In this video I'll show you how to fix a vertex order on meshes with...
Read more >Reordering vertex ids - Maya - Tech-Artists.Org
The only thing different is the vertex ids which I have displayed. The two meshes are placed side by side. In my transfer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh you may just need to disable vertex merging with
process=False
passed to either the loader or constructor:trimesh.Trimesh(**kwargs, process=False)
Awesome, that did the fix! Thank you @mikedh