Retrieve a disconnected mesh from a geometry

can that be done…since it seems that mesh’s that share the same texture in a model is treated as one mesh even if they are separated components

dafuq did i just read



srsly, you should spend a little bit more time reading the tutorials.

I don’t think you can have more than one mesh per geometry. The geometry class has a getMesh() method, so it would seem you can retrieve the mesh from a geometry. I don’t think being attached to the rootnode is important in this case. Is that what you mean by disconnected?

@alfinete said:
I don't think you can have more than one mesh per geometry. The geometry class has a getMesh() method, so it would seem you can retrieve the mesh from a geometry. I don't think being attached to the rootnode is important in this case. Is that what you mean by disconnected?


I know all this the thing is, I have model character that in a real sense is three meshes a body and two eyes all merged into one model (i.e. the meshes were joined in blender into a single object) all sharing the same texture this shows as a single geom even in the JMP model viewer thing...... I have another model again joined where head, body and eyes are all disconnected meshes(not sharing any vertices with each other) the body will give u one "pickable" object the head and eye wont give me three objects as they share the same material at least that's what seems to be the case maybe I'm missing something

if you joined the objects in blender then it’s considered ONE mesh in JME no matter what material they have.



If you want them disconnected, disconnect them in blender.

“mesh” doesn’t imply that all vertices are connected hence the question is posed wrong.

@nehon said:
if you joined the objects in blender then it's considered ONE mesh in JME no matter what material they have.

If you want them disconnected, disconnect them in blender.


unless you changed that recently that's not true....... the male model I speak of, produced two individually choose-able meshes in jmp again that was up to about a month ago .......hell the ogre mesh file has two sub-meshes distinguished by their materials (I actually depend on this condition)....... I can even provide u with that model if u like.
@mcbeth said:
unless you changed that recently that's not true....... the male model I speak of, produced two individually choose-able meshes in jmp again that was up to about a month ago .......hell the ogre mesh file has two sub-meshes distinguished by their materials....... I can even provide u with that model if u like.

No that's in since day one. But your "splitting" may occur during the ogre export phase.
I think ogre split unconnected meshes according to the skeleton sometimes...Not sure about that though but you can check it in your ogre.xml file.
@normen said:
"mesh" doesn't imply that all vertices are connected hence the question is posed wrong.

then how do I pose the question then "duly constituted members perhaps"
@nehon said:
No that's in since day one. But your "splitting" may occur during the ogre export phase.
I think ogre split unconnected meshes according to the skeleton sometimes...Not sure about that though but you can check it in your ogre.xml file.


nah ogre wont export the mesh file "correctly" for single animated character unless u join them.......... after that, as I said component meshes are distinguished by there materials, as u suggest by the ogre export process............either way I get individually editable meshes in a single model per material....... so I guess the answer by default to my question is no...........unless ogre exports it that way.

oh ok…so you have your answer…don’t you? Ogre export split your meshes according to their material…same material = same mesh different material different meshes…

@nehon said:
oh ok...so you have your answer...don't you? Ogre export split your meshes according to their material...same material = same mesh different material different meshes...


yeah well I wondering if there was a way to distinguish separated meshes with the same material....so I guess there isn't....
@mcbeth said:
yeah well I wondering if there was a way to distinguish separated meshes with the same material....so I guess there isn't....

Dude, neither in your editor nor in jme the verices are separate so there is only one mesh! The separation of vertices that have different textures on import has to happen because jme materials can only have one texture. Either separate the vertices into two meshes and export it or find the correct vertices in the mesh (e.g. via the animation).
@normen said:
Dude, neither in your editor nor in jme the verices are separate so there is only one mesh! The separation of vertices that have different textures on import has to happen because jme materials can only have one texture. Either separate the vertices into two meshes and export it or find the correct vertices in the mesh (e.g. via the animation).


:? I never said anything about vertices beyond what my idea of two separated "mesh parts" of a model was ............all I was trying to find out, is it was possible to access "mesh data" in a model that "technically" had multiple meshes residing in the same geometry instance..... for example Oto's head is actually a sphere that is not connected by vertices to the body but the entire object is treated as a single mesh-geometry...whatever....... wanted to know if one could access just that sphere or just the body......................

the reason is I'm building Level and wanted to have a proper idea of how to build and export that level so that , if I want pillars in the buildings can be destructible...............any asked and answered
@mcbeth said:
all I was trying to find out, is it was possible to access "mesh data" in a model that "technically" had multiple meshes residing in the same geometry instance.....

So we're back to answer #1

A mesh is just a bunch of primitives (in this case triangles)… any separation of “geometry”, real or perceived, has long since been lost by the time the mesh is just a bunch of triangles.



So if something collapses the data into one mesh then now it is just “one thing”. Not many things… just “one thing”. You cannot get back the many things from the one thing… because now it’s just one thing.

I guess it would be possible to trace the triangles to find connected mesh segments.



Create a set of points. Add the first point in the list to it. Now recursively add all points at the same location and all points connected by triangles until you have every connected point into your set.



Now find the next non-processed point and repeat the process to create the next group.



Then repeat until you find no more groups.



At the end you have a list of sets with each set being discrete groups of points.

Why not simply export a scene with multiple meshes as you need it for your logic? … why doing it a utterly crazy way if the simpl one is waiting for you.

@EmpirePhoenix said:
Why not simply export a scene with multiple meshes as you need it for your logic? .... why doing it a utterly crazy way if the simpl one is waiting for you.

He said it already, animation. He'd have to divide the armatures too.
@normen said:
He said it already, animation. He'd have to divide the armatures too.

exactly............that having been said I know what to do now.............exporting and re exporting can be a pain in the ass just needed a clear idea to have a good plan of attack is all