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.

here is the link thefree3dmodels.

Thank you in advance

  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – aaaaaaaaaaaa Jun 16 '11 at 9:59
  • \$\begingroup\$ It is a Wavefront file, the groups of this file have numerical names 000 through 037. \$\endgroup\$ – aaaaaaaaaaaa Jun 16 '11 at 13:23
  • \$\begingroup\$ @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? \$\endgroup\$ – Niroshan Jun 16 '11 at 15:07
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – 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.

It might help to add link to obj file in your first post.


According to the model file, those wheels are groups with numbers 13, 14, 24, 25 Proof:


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..

I'm not using JMonkey so I don't precisely know how to rotate those parts, but you could cut the car mesh into two files (wheels and rest) and then it should be easy to animate..

| improve this answer | |
  • \$\begingroup\$ I added the link. how can I access the groups to apply some texture or to animate them? \$\endgroup\$ – Niroshan Jun 16 '11 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.