Russ

Hi,

I'm still fairly new to Spine. I have a working walking animation. To test out clothing for my naked character, I had it drawn over the pieces of the body and exported from Photoshop to Spine using the provided script. I then duplicate my Walking East skeleton and have the images folder point to the new clothing pieces. But then I get this message (it appears skinnier than intended here):
mesh%20message.png


I click Yes sometimes and No other times and see that the clothing images either stretch or shrink. It appears that the more times I change the image path on 1 skeleton and click Yes/No on the mesh message popup, the stretching/shrinking are compounded.

Given that I use pixel art, what should I select? with this message?

(For sake of searching for future troubleshooters, I'll type out the full message here:
Spine has detected 10 mesh image files have changed size. Do you want to scale the texture coordinates to keep the image contents the same size? This can be useful is whitespace was added or removed. )
添付ファイルを見るにはパーミッションが必要です
Russ
  • 記事: 8

warmanw

Honestly, up until today this dialog seems confusing to me.
アバター
warmanw

Kickstarter Backer
  • 記事: 160

Nate

warmanw さんが書きました:Honestly, up until today this dialog seems confusing to me.
Does that mean that today you worked out what the dialog is asking? :grinteeth:

The dialog is documented here:
Meshes - Spine User Guide: Image resize
Does that explain it well? If not please let us know where any confusion lies, as we'd like to improve on the documentation, if needed.

I'll explain again here. Texture coordinates are where the vertices are placed on the image. You can see them by clicking Edit Mesh and then unchecking Deformed.

Say you later resize the image by making it twice the size. Since you have scaled up the image contents, you would choose No on the dialog. The texture coordinates will be scaled up and will still match your image.

Rewind and this time we'll say you resized the image by keeping the contents the same size, but you added whitespace to make the image larger. In this case you'd choose Yes on the dialog. The texture coordinates will stay the same size. Had you answered No, they would have been scaled up and would be too large for the image content. Note after choosing Yes, even though the texture coordinates are the right size, you may need to translate them to the correct place:
アバター
Nate

Nate
  • 記事: 9861

Russ

Nate さんが書きました:I'll explain again here. Texture coordinates are where the vertices are placed on the image. You can see them by clicking Edit Mesh and then unchecking Deformed.

Say you later resize the image by making it twice the size. Since you have scaled up the image contents, you would choose No on the dialog. The texture coordinates will be scaled up and will still match your image.
Ah I understand now, thank you Nate. Since my project is a pixel art game, my goal is to have spacesuits, gear, and various clothes drawn and move the exact way the naked character model moves when it animates. But they aren't perfectly covering the character model during the animation (even though they perfectly cover the static standing position in photoshop). I thought the source of this issue was the mesh pop up message I received.

Is the method I explained in the original post (duplicating the skeleton/animation, point the image folder of the duplicated animation to the directory with clothing) not the best way?
Russ
  • 記事: 8

Nate

It's hard to visualize the problem you are having. Maybe a GIF would help show it?

Changing the images folder is not the typical way to change the images a skeleton uses. Usually you'd rig the skeleton with both sets of images, for example using skins. However, if you are planning to swap out images at runtime, it could be OK to change the images folder to simulate that, just as a way to see how a different set of images will look. Depending on the complexity of your project, you might want to build a tool to load and test your combinations, similar to (or even based on) the Skeleton Viewer we provide.

Swapping images at runtime means you don't have to bring them all into Spine, which can save a lot of time when you have hundreds or thousands of images. It's described here:
Runtime Skins - Spine Runtimes Guide: Creating attachments
Funny enough, part of that workflow is having enough whitespace around your images to accommodate every attachment within the same bounds. That is one reason you might add whitespace to your images and see the beautiful Images Resized dialog pictured above. 8)
アバター
Nate

Nate
  • 記事: 9861

Russ

Nate さんが書きました:It's hard to visualize the problem you are having. Maybe a GIF would help show it?
Here's how I produce the odd looking placement of a suit:

https://streamable.com/xyu57t (Apologies, I couldn't figure out how to embed a streamable vid).
Nate さんが書きました:Changing the images folder is not the typical way to change the images a skeleton uses. Usually you'd rig the skeleton with both sets of images, for example using skins.
Seems I'm using the wrong method. I couldn't find any examples on Youtube where someone was doing what I hoped to accomplish for pixel art--yet I'm sure I'm not the first one to want to reach this goal.
Russ
  • 記事: 8

Nate

Thanks. I see the video, but I don't see anything that looks wrong? :)

I'm not sure there is a difference between what you want to do with pixel art and doing the same with larger images. There are some considerations for pixel art, but it's more for positioning of the bones and attachments.

FWIW, this is a cool thread:
Using Spine with Pixelart in Dan The Man
Also I believe the next Axiom Verge will use Spine!
アバター
Nate

Nate
  • 記事: 9861

Russ

Nate さんが書きました:Thanks. I see the video, but I don't see anything that looks wrong? :)
I can do a poor job explaining things properly -- sorry for that. I understand Spine is best for non-pixel art, but I'd like to know if it were possible to align or fit clothing as perfectly as we can in photoshop. Reference the short videos below.

The spacesuit perfectly aligns with the body in photoshop here: https://streamable.com/zw4shx

Both the body and suit are both exported via script, and opened in Spine. As previously mentioned, the bones/meshes/animation were originally made for the the body. I duplicate it and image folder for the duplicated animation is then pointed to the exported spacesuit images: https://streamable.com/watjcn

There's a misalignment and is particularly visible along the back side of the character. That's the issue I'm attempting to address. I apologize if I didn't clearly illustrate that initially.
Nate さんが書きました:FWIW, this is a cool thread:
Using Spine with Pixelart in Dan The Man
Thanks for this, I came across and read it while searching for pixel art tips/fixes with Spine.
Russ
  • 記事: 8

Nate

That comparison helps. The first link's legs:

And the second link's legs:

Those aren't the same at all (2px vs 3px wide), so the first question is why? Are both positioned solely from JSON data from the Photoshop script? If so, can you email us the PSD(s) so we can do the exports using the script and see the same results? contact@esotericsoftware.com
アバター
Nate

Nate
  • 記事: 9861

Russ

I'm completely unsure why, that's why I'm here! :P Yes I'll shoot an email shortly.
Russ
  • 記事: 8


Return to Editor