bantam

- Mar 16, 2024
- Joined Dec 9, 2019
Thanks for responding. The issue is that spine editor and Unity implement this differently. 100 gravity on all 4 bones in unity flops down towards gravity in an expected way (check the Unity png in the dropbox link). In the editor it curls away from gravity. If it's correct in editor then it really needs to behave the same way in Unity so animators can rely on it working reasonably similar to how it behaves in editor. Otherwise they will have to load up unity every time to adjust the gravity to look right which in my experience they are most averse to leaving editor.
I added Flop Difference Unity.zip to the dropbox so you can see the gravity difference in Unity
Assets/Scenes/test.unityhttps://www.dropbox.com/scl/fo/b6yctecqdac6no38hqnzi/h?rlkey=g2jytges7qjfw1ge4u7z9vnpe&dl=0
I gave it a test with the latest editor and package and gravity works now!! Thank you! This is such a great feature sincerely.
I noticed one issue, I think the issue is in editor not unity. Take the physics bone from last spine, nested split it into 4 bones, give it a quick mesh and weight it like normal and apply physics constraint to every bone with default settings and 100 gravity. In editor it curls around ignoring gravity or like it's doing something related to the parent bone.
(can't seem to upload images to the forum so I will put them on dropbox)
In unity I feel it does what you expect coming to a natural rest to gravity
I've put the images demonstrating this along the new test spine with the mesh and bones to test this issue in the dropbox link also in case it helps!
https://www.dropbox.com/scl/fo/b6yctecqdac6no38hqnzi/h?rlkey=g2jytges7qjfw1ge4u7z9vnpe&dl=0
No gravity still happening in 4.2.14-beta and 4.2.15-beta editor and spine-unity-4.2-2024-02-15-beta
vs Unity
minimum test case with 2 bones, 1 with and 1 without a physics constraint with gravity at 100, brand new spine made with latest beta editor
vs unity in play mode showing no gravity (brand new empty project), just using a Skeleton Animation dragged into scene
Sent this test project along with the test spine to the contact mail. Please take a look.
Also forgot to mention the scene with the bug created is in Assets/Spine/sample.unity
- Edited
Harald
I was able to create a minimum test case successfully and emailed it over, sometimes it crashes the editor or causes an infinite loop and the editor needs to be killed. It gives the Invalid AABB inAABB error OP described. If you construct the SkeletonGraphic programmatically and disable the physics as I described above the issue disappears. If you disable the animation component attached to the SkeletonGraphic the issue does not manifest.Harald
This also happens to us when a SkeletonGraphic in UI is created far off screen and then moved on screen with characters that have physics constraint applied to the spine. We fixed it by applying the following options to the constructed SkeletonGraphic object:skeletonGraphic.applyRotationToPhysics = false;
skeletonGraphic.applyTranslationToPhysics = false;It would be super useful if we could apply a scale or max limit to these physics also in the future.
Thanks for responding, I may have I have missed a step to make it work, do we need to programmatically provide a gravity level in Unity somewhere? I didn't see a method for it through the SkeletonAnimation api.
Downloaded and run with spine-unity 4.2-beta (updated 2024-01-12), if it's not this version please let me know I will test again. I think it is correct though as I see the changes in the source.
I added a couple of break points to see if it hits those changes and it does, it seems to be applying gravity to the data structure.
Seems to make it to PhysicsConstraint.cs constructor
makes it down here
Also tried it with another one of our spines that uses 100 gravity for hair with a test pose to make it more obvious, 2023 blank project with default unity settings with SkeletonAnimation pulled into an otherwise blank scene to make sure its not any of our current projects settings screwing things up.
Hair not applying gravity
100 Gravity hair successfully working in Spine Editor
These gravities are set up in the setup pose in editor not in the animation timeline if that helps.
P.S. these physics constraints have really been impressive! It's a game changer for our productivity.
I think we've been experiencing something similar, we're using todays update which fixed some other issues we had but we're suffering a leaning issue that differs between Spine and Unity much like this
100 gravity on the right shoulder strap in Unity at the end of the Angry animation
100 gravity on the right shoulder strap in Spine editor at the end of the Angry animation
0 gravity in Spine Editor, the right shoulder strap veers further to the left much like in the Unity scene
I've sent the spine file and a blank unity project with just this scene and spine already configured to show the issue to contact@esotericsoftware.com, just hit play in the unity project and you'll see the difference.
Edit: just noticed the clip accessory on the weapon is also exhibiting this if that helps!
- Nate wrote
On Windows Spine uses a maximum of 1024MB (1GB) of memory by default, which is plenty for most users. You can specify
-Xmx1200m
when starting Spine, eg:Spine.exe -Xmx1200m
I'm suffering the same issue, how do you increase the memory on macOS specifically? If I run it on Spine.app/Contents/MacOS/Spine -Xmx1200m I get "ERROR: Unrecognized command line parameter "X": -Xmx1200m"
Fixed it using
export _JAVA_OPTIONS='-Xmx6144m'
It would be very helpful if there was a more appropriate 2020 default to memory size or if it was configurable in settings.
Addition of the outline shader helps us a lot thank you for adding it! I can't seem to get it working correctly at the moment. Enabling outline causes a spiky outline effect even at 8 outline. Any advice for getting it working? Using Skeleton Lit ZWrite but the effect is the same on all shaders.
Export settings if thats where im going wrong, tried a bunch of settings to no effect:
Unity 2019.2.14f1
Doesn't seem to make a difference if I use straight alpha or PMA