Simple Geometry instancing

I have already looked at the GeometryInstancing classes in jme, but was wondering if the following simple alternative is possible to make loading and saving the scene simpler:



For all instances that want to share geometry, call Geometry.getBatch(0) on the first node.  For every subsequent geometry spatial you create, call Geometry.addBatch with the instanced batch.  I don't mind sharing all the buffer info: vertices,indices,normals,texture coords, and render states among the instances.  I think that this method should work since GeomBatch transcends the scene graph since it is not a subclass of Spatial.  Other than having to share render states, does anyone see a problem using this method?  If I do need different render states I will probably have to use the GeometryInstancing classes or make my own since those classes do not implement Savable, complicating writing out the data to jme format.



Thanks.

First problem I see:  what about Spatials with multiple meshes??



Also, I think this is all the sharedNode class is doing; creating new nodes by copying all the buffer info.  Also, I think that sharedNode can have some different render states (I believe different texture states is not one of them though).

Thanks basis, I completely missed the SharedMesh,SharedNode, and SharedBatch classes.  I will have to test them out but it looks like what I need.

no problemo