Then you could keep the workflow that you know for asset creation.In the next release of libGDX we are switching our default desktop backend from LWJGL 2 to LWJGL 3. It sounds very simple to me, at least for the. atlas files and write some import logic or convert logic for that. → That’s all just my very basic ideas, others might explain the details… (If you need really many clones - like in bullet hell games - you need some tricks).ĭuring your running 2d / 2.5d game you will make your clones visible/invisible. You probably will need to create lots of clones too (best have a pool for each type). j3o file) in prestep.Īnd then you will need to deserialize (load from. You will need to serialize the resulting texture and quads (write to. The geometry that you use will be your quads (what’s the name for that in libgdx?). Look for “Usage examples” in this javadoc:
This seems straight forward, does JMonkey has built-in functions such as loadBufferedImage() and bufferedImageToTexture()?Ĭan TextureAtlas be used to avoid all these mess? If so, can you give me a hint how to do it. I am thinking the second possibilities is to load the sprite image as one BufferedImage and draw the individual tiles on smaller BufferedImage and convert them to Texture. Do I have to cut the tiles and save them as individual images on my hard drive before loading them back to JMonkey as different textures? It is much easier for me to edit the sprites if they are all on one single sheet thus I don’t want to cut them up. I will add 3D feature after I port the game. I am less familiar with JMonkey it seems JMonkey’s TextureAtlas is a different concept, am I right? I decided to convert my games to JMonkey. Unfortunately the scene graph support of Libgdx is weak. For nice tile maps, it is straight forward to manually create the ‘atlas’ by using a notepad (that is actually how I create). In Libgdx, I can have a ‘sprite sheet’ and use TextureRegion to designate the different tiles as separate textures. I actually tried to use TextureAtlas before I post my question. Not sure what you are trying to do - so I just said everything that came to my mind regarding that thanks for the reply. Another possi might be to use a “3D texture” (sampler3d) which is quite an old feature (I think) and then you would simply put your tiles as slices in the w-coordinate (u and v are sampler2d, w is the third axis).But it’s definitely going to solve the problems of a texture atlas.I don’t know what kinds of graphics cards support that feature (driver version, GL version).I don’t know if jME 3.0 or 3.1 support that feature (but I would like to know).In more recent versions of OpenGL you have “texture arrays” or “array textures”.Texture atlases are often used for game characters and objects and to avoid the problems above, special care must be taken - example: configure a margin of 8 or 16 pixels when you bake your textures in Blender - which then minimizes “color bleeding” (parts in such an atlas are not power two tiles but random sized n-gons) and it also fixes “wrap around artifacts” (when using a special tile-based shader).Note: this is not a problem if you use the tiles on e.g. I observed this behavior when writing a special shader with tiled textures. This comes from having different pixels next to your quad. when trying to use a large polygon with one of your tiles repeating multiple times, then strange lines will appear between the repetitions. You will get problems with “wrap around” - i.e.Which will then work for the first 6 mipmap levels and break at the 7th mipmap level, because the tiles “bleed” into each other (“color bleeding” is actually the term for that phenomenon). If you use texture min/mag filters with mipmaps, your tiles must be a power of two size - e.g.