# Getting separate body parts from a Makehuman object file

I have the object file for Makehuman, which is basically an open source human body mesh.
For my project, I need its individual body parts. Now, I can do this by manually selecting the corresponding mesh vertices in blender (which I have managed to do).

An obj file would typically look like:

v -0.3110 7.3315 1.4107
v -0.3481 7.3465 1.4062
v -0.3095 7.3456 1.4117
v -0.3487 7.3574 1.4039
v -0.3080 7.3566 1.4103
....


Now, I want to segregate this obj file so that I can get the vertices and edges corresponding to the selections. How can I do so?
PS: I also need to preserve the global indices in the segregated mesh files, so simply deleting off the unselected parts and exporting to a new obj file isn't an option.

• I did not understand what do you need! May this answer help you blender.stackexchange.com/questions/40072/… – BetterEnglish Oct 15 '15 at 22:06
• I have imported the makehuman mesh as an obj file in blender. Now, I selected an arm for example. What I need is, through blender can I get the coordinates of the arm vertices present in the obj? – Ranveer Oct 15 '15 at 22:15
• Have I answered your question? – BetterEnglish Oct 16 '15 at 3:36
• This is a very specific request but lacks much context as to what the end goal is. You state that you wish to be able to identify the vertices in each area of the mesh in the original obj file. If we knew why you wanted to do this it would make it easier to understand exactly what you need (and potentially people can suggest alternative methods. – Sazerac Jul 12 '16 at 5:56

You can use this script on blender to show vertices for each item in the mesh:

import bpy
for object in bpy.data.objects:

print(object.name)
if object.type == 'MESH':
for vertex in object.data.vertices:
print(vertex.co)


if you need to show just one part called part_name: you can do like this

import bpy
for object in bpy.data.objects:
print(object.name)
if object.name=='name_part':
for vertex in object.data.vertices:
print(vertex.co)

• Let me clarify. I have one unified mesh, of which I selected some part, for example, I have the mesh of a car, and I selected only the wheels. Now, what I need is I need a csv, such that the indices in the csv map to the coordinates of the wheel in the original wavefront file. – Ranveer Oct 16 '15 at 6:05

I think you're saying that you want your actual .obj file to be grouped by body part?

Edit mode, numpad 1 for front view.
Turn off occlusion so you can select through your mesh.
B for box select, or C for circle-select. Right-click when finished.

Select a body part, assign a color.
Select another body part, assign a new color.

Example: Left arm red, right arm blue, left leg green.
You know, like you're playing Twister. So on and so forth.

The Twister part was a joke. The colors don't have to be so dissimilar.
You can just do very subtle changes in color and get the same effect.

Every part gets a new color, then export it as an .obj file.

.obj files group vertices by color, so this should get you what you want.

If you downloaded the make human file with a rigging, it will have vertex groups for each bone, (body part) Perhaps that data is all you need and you can do what you want through the vertex groups.