just use a model programm, texture it with 6 texures and let the tool create a atlas for you.
Also it saves you from 6 texturestate changes for rendering one object, (in a large scene this can/will reduce the overall performance) not to mention that it works on older graficcards that does not support 6 texture layers
I forgot to mention that applying the texture must be done dynamically in my case. When the application loads it is given a set of 6 (arbitrary, not pre-defined) images and should map them to a cube.
So if I get your suggestion right, it is not good for me.
However you might be able to optimize a bit, by making sure that same textureed quads are mostly at same distance (zbufferwise) then a few texture calls are not needed.
But if you don't know the texutres the only other solution I see is to create a textureatlas java native on start of application
What I'm trying to make is a card game (collector's, like Magic The Gathering).
There can be around 500 cards on the table at the same time.
Potentially, each card will have a different texture on the front face (although some sharing may occur).
All cards will have the same texture on their back face.
All other faces of the cards (sides) will be simple colored, no texture.
So basically I'm going to have 500 boxes, 501 different textures.
At any given time, most of the cards will be arranged in decks, so there may be a place for optimization here (like having one box representing the whole deck, with only the top card's texture shown, and each time you pick a card from the top, create a new box for that card.)
The cards must be created dynamically from jpg files on disk since there are thousands of possible cards and it is close to impossible to create an object in an external modeling software for each card. I would also like to support easy adding of new cards without having to mess with external modelers each time.
So, would you use a texture atlas for that? Is it possible to create atlas of 500 images? Each image's resolution should be about 300x450. If you think it is possible to use an atlas at run time, could you please hint me as to how to do it? I'm new to jME.
you could create just one model, and several textures, and set the texture directly.(while using the old texture coordinates,
then you could reduce the amount by using only one texture, continaing all sides, and with correct set texture coords there will be no visible difference, however you would only need one texturestate change and one draw call that way.
(in jme3 you could even share the mesh then without a problem, and just use a different material)