I alter the texture in photoshop change its size then in Spine click reset while editing exit edit mode and texture has weird rotation and translation, why wouldn't it stay close to its original pose?
Explain Resetting Mesh in edit mode shifting the mesh position
When you reset a mesh in edit mode in Spine, it removes all the vertices and replaces them with four new vertices at the corners of the image. This action also removes any weights and deform keys associated with the mesh. The reset operation aligns the vertices with the UVs (texture coordinates), which can result in the mesh shifting position and potentially rotating. This is because the new vertices are created without any knowledge of the previous mesh's orientation or deformation.
Here are the key points to understand why the mesh shifts position and rotates:
Vertex Reset: Resetting the mesh in edit mode clears all existing vertices and creates new ones at the image corners. This does not take into account the previous positions or orientations of the vertices.
UV Alignment: The new vertices are aligned with the UVs, which can cause the mesh to appear rotated or translated if the original mesh was deformed or had a different vertex arrangement.
Weight and Deform Key Removal: Resetting also removes all weights and deform keys, which can further alter the appearance of the mesh if it was previously influenced by bones or animations.
Deformed Mode: If you want to edit the mesh while preserving its deformation, you should enable the "Deformed" checkbox in edit mode. This allows you to see and adjust the mesh as it appears outside of edit mode, maintaining the relationship between the vertices and the texture.
For more detailed information, you can refer to the Spine User Guide on Mesh Attachments.
In summary, the reset operation is designed to start over with a clean slate, which inherently means losing the previous configuration and potentially causing shifts in position and rotation. To avoid this, consider using the "Deformed" mode when editing the mesh or manually adjusting the vertices without resetting.
Yes but why does it has any rotation after reset? Why not set it to 0 rotation and at 0,0 coordinate of its parent bone
warmanw I guess you pressed the Freeze
button. For example, you can reproduce it with Spineboy by following the steps shown in the video below:
- Select the
rear-foot
attachment and press theFreeze
button in the setup mode. - Switch to the animate mode and press the
Edit Mesh
button on the tree view. - Press the
Reset
button.
In the video above, I unchecked the Deformed
option, but actually, even if you don't uncheck it, the attachment should be rotating when you press Reset
.
If you don't do Step 1, the result will be like the image below:
So I think your skeleton's foot attachment may have been rotated when you reset the mesh, because the rotation in setup mode was recorded by the freeze button. Could you confirm if this is your case?
No I did not press freeze
but the mesh in setup pose was rotated so when I reset in animation it went back to that rotation, if I freeze
in setup everything makes sense, THANKS!
- Изменено
A mesh is made up of a bunch of vertices. You can move these around however you like. When you "rotate" a mesh, you are actually only moving the vertices. Therefore, the mesh "rotation" property is "fake". It just moves the vertices by rotating around the centroid of the mesh. Mesh rotation gives you a reference so you can return to a particular rotation, but it's not an actual property of the mesh. Freeze just resets the mesh rotation reference to zero.
Mesh reset could also freeze, but after the reset if the mesh hasn't been deformed and freeze hasn't been used, then the rotation will still match the orientation of the reset mesh. Eg spineboy's head with rotation -70.63152
:
After edit mesh reset it has the same apparent "rotation":