GSoC project: Sprite engine overhaul - Weekly A&O report #6/7
Hi everyone!Time for some updates. Implementing the actual atlas took quite a little longer than a week, which however, was to be expected. After all it was a rather complex change. During the last two weeks the atlas code has gone through quite some changes. As you may recall in an earlier A&O I described, how I seperated texture internals to sprites and textures.
Atlas after adding 13 sprites
Atlas after adding 6 sprites
The next logical step was to pack several sprites into a shared texture like you can see in the following images:
The whole process works adaptive, meaning one sprite can be added after another. The packer will try to insert the requested sprite as good as it can into the free region(s).
However at some point new sprites wont fit in anymore. As you can see the atlas is already quite full after having added 13 sprites to it.What happens now is that the packer trys to repack all existing sprites plus the new to be added sprite tighter to the atlas. You can see this process in the following image:
What happens now is that the packer trys to repack all existing sprites plus the new to be added sprite tighter to the atlas. You can see this process in the following image:
The following video shows the process during level load time:For next week lots of clean up needs to be done. Currently the atlas routines run side by side with the old routines. I've as well to fix some minor bugs left and work around some design limited issues as the water rendering.