There are a few kinds of "pivots" in Spine, though it is more accurate to call them "origins" because it's not just used for rotation but also scale (and shear for bones).
The obvious one is bones: when a bone is rotated, scaled, or sheared all descendants are affected and the bone's position is the origin.
Another kind of origin is for region attachments. When a region attachment is positioned or scaled, the origin is the center of the rectangular image. Spine doesn't require or allow a different origin to be specified because this would be tedious to set manually. Using the center of the image defines the origin without requiring needing to set it manually. Note the region attachment position is relative to the parent bone.
For mesh attachments, they don't have a single position, instead they are made up of a list of vertices (also relative to the parent bone). The values shown in the editor for the attachment's position are for convenience and are the mesh hull's centroid. Since the hull vertices can be manipulated via deform keys, vertex weights, or scale of ancestor bones, the centroid can vary as the mesh is manipulated. The origin for rotation and scale defaults to the centroid but can be anywhere: in Spine, hover over the little +
until a circle appears around it, then you can drag the origin elsewhere.
If you want to attach an image of a different size in the same place, you'll need to define how you want to calculate the "same place".
If you have another image, possible of a different size, how will you know where to place it? You need to know some reference point on that image that matches up to something on your skeleton, such as a bone position or the origin (center) of an existing region attachment. If you want to define that position manually, then in Spine you can just create an attachment from the image and then position it where you like. However, that is a manual solution and unreasonable to attach hundreds or thousands of images. For that you want an automated solution, you do not want to manually define the reference point.
As you found mentioned elsewhere on this forum, one easy solution is to use images with extra whitespace. That way the center of the images is the same, giving you a reference point, and so you can use just replace the old image with the new one without any calculations. Note that the extra whitespace does not bloat the atlas at all when using whitespace stripping. That is a feature Spine's texture packing supports, so other tools are not required.
If you are exporting data from Photoshop, the JSON data contains the positions of the region attachments. Since each position is the image center, that data tells you exactly where to place the images. These positions in the JSON from Photoshop are in world coordinates (unless you use [bone]
tags in Photoshop layer tags). You can convert them to bone local positions using Bone worldToLocal
.
It's uncommon to need to position a mesh of a different size at the same position. This is because you likely create the new mesh in Spine, so you have already positioned it where you want. For meshes it is much more common to use the same mesh but replace the image it uses. Linked meshes are used to do that.