Handling submesh in a scene

Hi,
I want to distinguish some horizontal parts(aisles) in my scene from rest of the horizontal parts(All of this is part of scene and not separate objects). These horizontal parts will do things selectively when clicked, One way to do this is to take coordinates of these parts and do stuff selectively for these parts. Other way is to name these separately as submeshes and handle these while ray casting.

Although submesh will work in theory, how exactly should I approach it in the best possible way. How should I make separate submeshes in bender, what exactly is a submesh and how well I would be able to handle submeshes in blender?? Will I be able to get bounds? rotate them etc?? Can I tweak some code in sources to make all this happen??

To have a mesh split on import the easiest way is to apply a different material to it. That would be fine for small numbers of splits, could get tedious for large numbers though.

You may just find the best way is to use co-ordinates though…or maybe apply some metadata to the vertices so you can look at the triangle hit and then query the vertices.

@zarch said: To have a mesh split on import the easiest way is to apply a different material to it. That would be fine for small numbers of splits, could get tedious for large numbers though.

You may just find the best way is to use co-ordinates though…or maybe apply some metadata to the vertices so you can look at the triangle hit and then query the vertices.

Your vertices idea is worthful if I can identily them in code. But how exactly should I attach metadata to verticles??

You would need to look at the vertex fields that map from blender to jme and what ones blender lets you modify… or write a utility inside jme to add them to the mesh after the import.

There are a whole bunch of things you can attach to the mesh like vertex colour, various sets of tex coordinates, etc. You could re-purpose any of those to store other information instead.