Open st0rmbtw opened 1 year ago
Multiple Bindings Solution:
TileTexture
would need to be updated to include a u16 handle to the correct texture atlas.Multiple Chunk Solution:
TileTexture
would need to be updated to include a u16 handle to the correct texture atlas.Multiple Chunk Solution:
Array packing Solution (Ideal? No performance loss):
TextureArrayCache
would be updated to pack multiple atlases into a single array texture.TileTexture
would need to be updated to include a u16 handle to the correct texture atlas.texture_atlas_index
and texture_index
into a single texture_index
.I would also really appreciate this enhancement; I am working with lots of tiles across multiple tilemaps, and having to add them all into one file and keep track of the index of each tile in this massive file has become a very big pain point.
In the meantime till this is implemented wouldn’t it be possible to dynamically build a texture atlas at run time? Could probably make a function then that assigns each texture pushed into that texture atlas mapped from name to id.
In the meantime till this is implemented wouldn’t it be possible to dynamically build a texture atlas at run time? Could probably make a function then that assigns each texture pushed into that texture atlas mapped from name to id.
An example of how to do that would be greatly appreciated.
In the meantime till this is implemented wouldn’t it be possible to dynamically build a texture atlas at run time? Could probably make a function then that assigns each texture pushed into that texture atlas mapped from name to id.
An example of how to do that would be greatly appreciated.
Check out bevy’s dynamic tileset builder or if you’re interested in a library to help with some tileset stuff check out the awesome bevy_tileset library. It generates a texture atlas and lets you define animated, autotiling, and standard tiles through Ron files
Add possibility to use one or more texture atlases as a tilemap texture.
A possible solution is to add an option in
TilemapTexture
with the name like TextureAtlases that will take a vector of texture atlas handles.Something like this:
Also, I think it would be nice to have a convenient way to select textures. Currently, we can select textures by global index that is not very convenient with many texture atlases in the future. I think it would be nice to select a texture atlas by index, and then select a texture by relative index to this atlas.
Like this: