So i’m loading an .OBJ mesh (using the loader that comes with java) each time i need it but i’m sure there’s a more efficient way of doing things, especially since i’ll be needing a lot of the same mesh.
What’s the more efficient way of doing this? Btw, i’m using Java3D. And to put into context, i’m building a 3D strategy game, the mesh in question being a “forest”. So the only thing that would need to be different is the X,Y and Z position, (and maybe the texture and the animation, but im not there yet).
I thought of using the same solution i found with my textures, ie load them once at the first creation of the object as a static variable and re-using them over and over, but it doesn’t seem to work with 3D mesh, it gives me errors when i try to attach it to the scene node. I don’t have the code right now but if it can help, i’ll post something tomorrow.
Thanks!