hello, I’m using the robots pack created by kenney, and I’m having trouble importing the sprites. i can use the PNGs fine, but i can’t get the sprite sheet to line up due to the irregularities. how would I import this?
They are pretty unique for that. There is a plugin on the AssetLib called Kenney Spritesheet Importer that helps, assuming the robots sprite sheet pack comes with an xml texture atlas.
I’m confused as to how the plugin is supposed to work, how do you use it? (I read the readme, I just don’t understand the instructions. when/where is the option supposed to appear?)
I think he want to tell you that to download the plugin from assets lib that is on the fourth tab, on the column of 2d, 3d, script and then asset lib section at the top bottom of the Godot editor. And if you already downloaded that add-on from external source, then you can just drag the addons folder and drop it in the file manager of Godot
Then you go to your filetree, and select the spritesheet you want. The Import tab shares the same space as the Scene tab by default, so toggle the Import tab on. By default PNGs are imported as Texture2D. Click the dropdown and it should offer you the Kenney Spritesheet option. Click it and hit Reimport at the bottom.
This will create a subfolder with the name of the spritesheet. And inside there are the images as .tres files. From what I can see they have the correct dimensions. You can arrange them into animation frames or something
is there any way to make these images into a spritesheet automatically, or do you have to do that manually? what’s the benefit of using the .tres files vs using the PNGs the provided?
I think by this you mean to join the standalone images into a bigger, spritesheet image? You can automate that with a python script pretty easily. Kenney is amazing enough that he gives you the XML to go along with the spritesheets. Parse that and merge those bad boys as you wish
Now that I’m looking at what this plugin does I’m not sure if it’s worth to use it. It encodes the entire PNG image as text into the .tres file, which means it takes a lot more space.
By that I mean the spritesheet_robotsSide.png has 92KB as a PNG and all the .tres files generated from it have 442M all together. That’s crazy town. Just for this reason I’d go for something different. Just write a one-time use python script I’d say.