![]() In general, AtlasTexture functionality is considered to be in maintenance mode, so don't expect massive changes occurring to it for 4.0. We hope this post explains what we are looking for, thanks : ) We also believe that good sprite atlas support should be a basic feature in godot, so developers don't need to rely on third party plugins. So it would definitely be easier if this is built-in instead of an add-on that has to be updated. We already have many games relying on this feature and in the future we are also going to use this feature extensively. Is there a reason why this should be core and not an add-on in the asset library?: Since we are using the native TextureAtlas import setting in godot it would not be a good solution to add a custom script to crop the position. We believe that this feature could potentially help a lot of artists when working with sprite sheets. ![]() If this enhancement will not be used often, can it be worked around with a few lines of script?: You cannot search for images in the file system, it involves many steps and furthermore if you update one of the sprites it will not update the new position in the auto slice automatically, so you have to go into each sprite and update them.Įdit: We are aware that you can also select "2D Mesh" in the TextureAtlas import settings but 2D Mesh does also not crop and it is not batched like the "Region" setting. This actually crops the image in the way we want and the orange pivot square is set perfectly.īut this is not an ideal solution. Now go to the Texture Region window and chose "Auto slice".Drag the entire atlas.png it into the scene. ![]() Create your sprite atlas using the region setting.Here is how it currently could work (see image below). It does actually seem like the "code" we are requesting is already in godot and you could use it as work around in some way but it's very cumbersome and definitely not an ideal solution. Chose import as TextureAtlas, set the location of the atlas file, import mode should be set to region and optionally you can set a check mark in the "Crop position". Select a number of sprites in a folder and go to the import tab. Setting the check mark "Crop Position" (not sure about the name) should result in the orange bounding box in Godot being set to the border of the pixels in the sprite (see image).ĭescribe how your proposal will work, with code, pseudocode, mockups, and/or diagrams: We should not remove any of the existing functionality since not having the position cropped could be preferred in many cases. We propose to add a check mark "Crop position" in the Texture Atlas importer window (see image below). This will result in a bounding box that's not centered and also bigger than the image (see image below).ĭescribe the feature / enhancement and how it helps to overcome the problem or limitation: If we use the blue circle as an example: The circle is not placed in the center of the image and it has many transparent pixels around it. ![]() The newly added feature "import as TextureAtlas, Region" in godot 3.2 is very close to what we are looking for but it does not crop the position. Therefore it would be great if this functionality was available native in godot so we could remove texture packer entirely from our pipeline.ĭescribe the problem or limitation you are having in your project: This actually works perfectly but we don't like being dependent on a third party plugin that often needs to be updated when a new version of godot is available. This basically just removes the transparent pixels and discards the old resolution of the image, resulting in a cropped image with the bounding box set to the border pixels. One of the functions we use a lot in Texture Packer is the trim mode: "Crop, flush position". We are currently working on several 2D games that should be able to run on very old hardware and therefore we rely on sprite atlases to optimize performance.Ĭurrently for all our projects we use Texture Packer by Code and Web.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |