- Uređeno
Wonse

- 4. lis. 2019
- Pridružuje se 16. kol. 2018
Hello. I have 2 models, using the clipping mask. both have similar skeletons, the same atlas size (1 512x512), similar animations..
but one of the character is costing 50 times more performance than the other on unity. Is there a guide to get better performance when using mask ? it making my big computer play at 30fps, (it is a simple character, with the legs hiddens by the clipping mask)
can i send the scene to you to take a look ? (i cannot post it to the public) I'm still usign a 8 m old version of the spine plugging for unity, is there some novelty about the clipping since then ?
tank you
- Uređeno
Hello, i'm trying to mix 2 animations on my character, in unity. I'm using the unity animator
Both animation are using the full body when played alone.Per example, i want to combine 2 annimations from these
1 Gun shoting animation
1 Running animation
1 Knife attack animation
1 Use a smartphoneI want to be able to play any of theses animation alone, or combined with one another. and animation dont start at the same time. (first i run for 1 secs, then i shot with the gun, then i take a photo with the smartphone, then i wtop walking..)
If it was 3D character, i would just use a avatar mask. but with spine i cannot do that.
Do you have any idea how to do this nicely ?
I'v think of one way, but it seem too complex.
- Having each animation in 4 version. The complete one, right handed. Another, with only the arm and torso animated right handed. and the same for left handed
- On unity animator, I have 2 layers, one "base" with the completes animations, and one "secondary" playing only when i got 2 animations at the same time. (with the animation using only half the skeleton)
When i play a skill, i use the "base" layer, with the complete animation, then if i add another skill, if i already have a skill working, i play the new on the second layer, so it will just overide what needed for the skill. and if the base animation is using a hand, i use the other hand on the second layer.
problem : if the base layer is using a "shot" then i play a "run". I cannot play it on the second layer. Because it use the complete body.
Or i could have all the "upper body" animation on the second layer. with, for each node a blend between the "full body animation" and the "part of the body animation". and when i play the animation, if it is thje only one, i play full body, else, i play the part" and when i play another skill, i just change the blend value to change from "full body" to "arm".
Is this possible, on unity, to flip the animation to chose to play it on the left or right part of the skeleton ?
Is there a mask system ?Do you have an Idea how to do it ? Mine have big flaws
- Uređeno
The point follower script, on Unity, does not unsuscrite from the event when it is destroyed
adding this seem enough (the same thing the bone follower use)
void OnDestroy () {
if (skeletonRenderer != null)
skeletonRenderer.OnRebuild -= HandleRebuildRenderer;
}Thank you
Thanks a lot,
- Harald wrote
Are you using the SkeletonMecanim component with an animation Controller? Then having the belt animation on a separate animation layer should be the way to go.
If you are using SkeletonAnimation, you could use tracks at index 1 for the belt animation:
int trackIndexBelt = 1; skeletonAnimation.AnimationState.SetAnimation(trackIndexBelt, beltAnimation, loop);
Alternatively, you could deal with sorting by adding a
SkeletonRenderSeparator
component, as shown in theSpine Examples/Other Examples/SkeletonRenderSeparator
example scene. It demonstrates how you can split one skeleton into multiple render parts for depth sorting and rendering of other elements between them. However I would rather recommend using animation tracks or layers as described above.I am using an Animator on unity (with the skeleton Animator for spine model)
- Uređeno
- Uređeno
Hello, i want ot add on my game an object, in wich a part is changing color. (for example, a shield in front of the hero, in wich the logo can change color depending on the element type.
the shield is a skin on the spine charater model, everything is using the base shader, for now.
i know how i would do that for a 3D model (material with a custom shader, multiplying with a mask...) bu ti'm not sure it would work with a spine model.
Any idea how do to it nicely ?
- Uređeno
Hello,
On my game, I want to add a gadget to the hero. It is a belt (+backpack) with custom animation, but i want it to play his own animation, while the player play his own. how should i do that ?i'm using unity Animator, my heroes have a lot of animations
Can i mix 2 objets in unity ? (for sorting issue, i cannot just put a belt object before the character)
Could i use a skin for the belt, and make it move his own animation on another Layer on the animator ?Thx Badlogic
i'll try to stay with simple rectangle clipping mask, so
- Uređeno
Hello, i'm working on a unity game for mobile.
does the clipping mask from spine have some performance issue ? should i limit the use of this tool ?
Hello. @Harald. i'm not trying to get the hero sit on a car, but his model is completely hide, and he play a car instead, more like a metal slug or yosi island tank.
Let's Play Super Mario World 2 Yoshi's Island - Part 04: Mole Tank Time - YouTubethe hero "become" the car, and once the car phase is over, the car diseapear and the hero model is back. it is 2 differentss skeletons, but i would like to keep runing the same animator
Edit : is this possible for one animator to animate 2 objects at the same time with spine ?
- Uređeno
Hello
For my game on unity, i'm using the Spine with an Animator. the animator controler is generic, and shared betweens my character. I have multiple character, each with his own spine model.At some point, i want my player to be replaced by a Vehicle for a short time, the vehicle has his own animations and sprite. But i would like to use the same Animator on the object with the same current states and properties.
For now, i have a spine model for each hero, and a spine model for my car.
I would like the animator, when i play my "drive" animation, to use the car model.
But i dont want to add the car to each spine models and reexport, to avoid geting images duplicated on my atlas png.
So, how should i do this ?
Is this possible to add a skeleton on a slot on the character skeletton, and hiding the rest of the character ?
Do i have to get 2 skeletons component on my character and hide one ?