• EditorBugs
  • Margins from Photoshop Artboard Affecting Spine Export to Godot

Hi everyone,

We're facing an issue with exporting files from Photoshop and animating them in Spine, which then impacts our workflow in development, in this case in Godot.

Let me explain:

We're working on a reskin of a slot game (animations with same scale, same size, same animations), using the same Photoshop canvas sizes (2000x2000px) as the original project. We export assets from Photoshop (with spine script), import them into Spine for animation, and then export them as .SKEL files to use in Godot. However, we noticed that when the assets are scaled or modified (e.g., adding larger shadows) in Spine, Godot still seems to enforce a margin identical to the original Photoshop artboard.

This margin issue has been problematic because it has significantly impacted our production time. The only workaround we found was to open the previous project's Spine file from another game, import our new assets into it, and export from there. Only then did Godot correctly interpret the dimensions without any unwanted margins.

So here are my questions:

Why does this margin issue occur in the first place? Even if we scale the assets, increase the artboard size in Photoshop, or add larger shadows in Spine, the margin persists in Godot.
Why does using the previous Spine file from another game worked when the export settings were the same for both projects?
Has anyone experienced something similar or knows why this happens? Any help would be greatly appreciated as it would save us a lot of time in future projects!

Thanks in advance!

Spine 2D Version: 4.2.38.

Related Discussions
...

The margin issue you're experiencing when exporting assets from Photoshop to Spine and then to Godot is likely related to how the images are being trimmed and packed. When using the PhotoshopToSpine script, ensure that the "Trim whitespace" option is correctly set. If this is enabled, it might be causing the margins to persist by not trimming the images as expected. Additionally, when exporting from Spine, make sure that the texture packer settings are configured to handle whitespace correctly, such as using the "Strip whitespace X/Y" option to remove any unnecessary padding around your images.

The reason why using a previous Spine file from another game works could be due to differences in the project settings or how the images were initially processed and packed. It's possible that the previous project had settings that better handled the trimming and packing of images, resulting in no unwanted margins. To resolve this, compare the settings between the two projects and ensure consistency in how images are processed and exported.

  • Erika вподобали це.

I agree with Spinebot based on the given information.
If you could also add some images that explain what you mean in godot/spine/photoshop, it would be very helpful to clarify further the issue you are experiencing.