# Understanding .obj file

I downloaded a 3d model of a car. By judging by the skins and images available model treats wheels and car body as separate nodes. I want to access its child nodes (wheels) to specify animation.

But I don't know the names of its child nodes. Is it possible to figure out names of its child nodes by looking at the file content. I have a obj file of the 3D model. I am using JMonkey 2.

EDIT

• For the record, .obj is a pretty common file extension, you should first of all find out which of the different formats you are dealing with. – aaaaaaaaaaaa Jun 16 '11 at 9:59
• It is a Wavefront file, the groups of this file have numerical names 000 through 037. – aaaaaaaaaaaa Jun 16 '11 at 13:23
• @eBusiness Can you tell me how to access them.(I prefer JMonkey). That model is a Trimesh. Is there a way to identify which number refers which mesh. In this case group id of a wheel? – Niroshan Jun 16 '11 at 15:07
• I can't tell, and I don't know JMonkey. Though I'm not certain that there is an easy way of doing what you want, it's only the triangles that are grouped, not the vertices, and you'd animate a model by moving the vertices. But then again, I'm not an expert 3D programmer, I can't say for sure that there isn't some trick. – aaaaaaaaaaaa Jun 16 '11 at 16:18

According to the obj file specification it should be a string after the 'g' command, but from my experiences each obj exporter handles those things specifically.

So those faces (and according vertexes, normals and textures) after line g part 013 to the next line with g command is the mesh of the wheel and so on..