obock

Hi,

I love the new tool "Shear" but for now i can't import in Unity any JSON file with an animation with this tool. I also see "Updating spine-unity to v3.2 is in progress.", so i guess it will works in few days. :clap:
But i need to know something: since Shear looks rotate a bone around his own axe and an other perpendicular one (i call them X and Y, in difference with the Rotate tool axe wich is Z for me), will the animation move in the unity 3D space ? or is it just a nice flat deform effect ?

Thank you for your answer and sorry about my english :whew:
obock
  • Сообщения: 7

Pharan

Nah, shear is just shear. Spine is still 2D.
Аватара пользователя
Pharan
  • Сообщения: 5366

obock

Ok ty for the answer
obock
  • Сообщения: 7

isaacburns

The shear described in the link is closer to the skewX and skewY used in CSS transforms.
| cos(cssRotate) -sin(cssRotate) | * | cssScaleX 0 | * | 1 tan(cssSkewX) |
| sin(cssRotate) cos(cssRotate) | | 0 cssScaleY | | tan(cssSkewY) 1 |
In Spine, ShearX and ShearY modifies the X and Y axis rotations independently, which modifies both a scale and a shear in the transform matrix.
| cos(spineRotate) -sin(spineRotate) | * | cos(spineShearX) -sin(spineShearY) | * | spineScaleX 0 |
| sin(spineRotate) cos(spineRotate) | | sin(spineShearX) cos(spineShearY) | | 0 spineScaleY |
I was expecting the ShearX and ShearY modifiers to control only the shear components of a transform matrix, so I needed to update my runtime when the feature was implemented in Spine 3.2.

http://jsbin.com/vifuyuvezu/edit?js,output

I agree that the independent axis rotation is a more useful effect.
isaacburns
  • Сообщения: 15

Nate

Here's unsheared spineboy:


Here's Spine's shear:


Here's what normal shear/skew (described above) looks like:


To better see what happens, here is Spine's shear at the top, then unsheared, then normal shear at the bottom.

The red lines make it easy to see how normal shear doesn't affect the width of spineboy's head, while Spine's shear makes it less wide. The green line appears 3 times and all are the same length. This shows that Spine's shear keeps the head's dimensions.

You can get the normal shear by scaling on the axis being sheared. Conversely, had we gone with normal shear, a little scale would give you the same results.

We tried out different approaches to shear and the way we decided on in the end seemed to be the most useful. I'm open to reasons why it's a bad idea. It's not to late to change if we had to, but speak now! :)
Аватара пользователя
Nate

Nate
  • Сообщения: 10133

Pharan

@isaacburns
My bad. Yeah. Spine Shear is calculated as an individual axis rotation offset, and NOT:
1 sheary
shearx 1
Anyway, details aside, it's a 2D transformation that alters one axis instead of both.
Аватара пользователя
Pharan
  • Сообщения: 5366

Søren

I personally find it easier to work with when it keeps the "volume". Along with FFD it can give you some cool looking effects very easy.
Аватара пользователя
Søren

Shiu
  • Сообщения: 2423

isaacburns

I agree with Shiu. It seems more useful the way it is.
isaacburns
  • Сообщения: 15


Вернуться в Unity