Spine 4.2 Physics Constraints | Chain

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome the stream uh we'll talk about physics constraint for setting up this chain it's not going to be perfect simulation of the chain there are a lot of things to consider like friction or influencing uh each node on each other so basically we'll be doing physics simulation with uh what we have in this version which is one physics constraint which affect only one bone and its children or um yeah you will see it in action in a moment so I will also be uh doing so this one from scratch and as well I would like to make another version where we have two points anchored so you see the limitations and maybe you have a better idea how to do it because right now now I'm still in the experimentation process I just wanted to share that process with you wait so this is what we have you can see we have a little bit uh bouncing up and down which we can turn off and we have a rotation delay for physics and if I rotate it we see the bottom part is hanging uh that we will have the gravity for it affecting it's looking cool it's pretty much uh enough for the animation and this is the beauty of this new version I mean it's still in the beta I mean or Alpha it's it's not available public yet but uh the idea is to have a minimum tools to create whatever we mostly need in Practical process of animation and we don't have like multiple bones uh constraints like Springs Etc and collision we just have one constraint that affects only one bone one constrain affect only one B so let's see we have this chain each image is separated you can see and they are already placed in the bone their bones here's it so the first thing we do here is select all the bones create new and transform constraints uh physic constraint sorry we can see uh one constraint is created for each Bond I will select all of them and save under uh number one using control one and you can see we have simulate enable that means it's already uh will simulate the moment we enable any of those properties we see above translate X Translate Y rotation share X share uh scalex so right now I will um do the rotation it is already something that you can see this might be useful in some cases where you have a snake sliding through a muddy surface but not not now so let's see what we can fix I'm selecting all of them and um we have inertia I will try to explain a little bit physics for those who um missed our previous streams so I'm working with one bone let's create the physics and I will uh reduce the strength this is the one that brings the bone to uh unconstrained for so when I move it let me um work on rotation when I move it you can see the bone is pointing uh to the previous position so this is inertia and higher it is more it will point and it's not going back to like no new position it's not uh going back because we have strength zero the only reason it will go back like hanging again if we enable strength and you can see lower value make it easy uh slower to come to that pose and higher value will just make it faster the other way we can uh fight inertia is the uh wind or gravity those are the forces a similar way as the strength so strength is fighting inertia to bring it to New pose the one that would normally be if we move the bone considering its rotation and it's position new so if I move this bone here this is the new position this is called unconstrained position if I turn on simulation and again move it here you can see it still goes uh to this POS because we have inertia and it it's avoiding being here and the reason it can be here is when we enable strength so strength will bring uh after some time it will bring to a constrained pose if uh instead of the strength we move the gravity the similar effect might be because gravity is forcing down and eventually it will be bring it to equilibrium and and pointing down but if our bone is something like this and we have inertia and rotation so if I move it and add a strength you can see it will bring to that horizontal pose but if instead of strength I uh make the gravity it will bring vertically down so gravity always pulls it down while strength is always pull brings it to the pose where it should be without conern so this is the difference if U bone initially points down gravity and uh strength pretty much looks the same so this is with gravity you can see that it is hanging and this is with a little bit wind you can see it's hanging so initial pose is not considered here because we have strength zero the only way we can consider initial pose is to give the value so if I raise it you will see that it's trying to go to the initial pose but it won't um because it will um need to fight uh gravity and wind as well so let's try I'm giving high value so you can see the wind gravity and strength all together are forces the strength fights to be here horizontally winds go tries to be uh to the right and gravity pulls to the down that's this we have uh in between pose so uh all that said here I'm coming back to here and let's now uh try to fix if I go uh inertia this and uh reduce the damping so we see like some oscillation and reduce the mass give higher strength maybe so this is uh obviously not like um chain not behaving like chain chain um maybe we have higher um lower dumping let me see so um the reason it is not realistic because we are actually bringing back to original pose and instead we can uh simulate it by just uh switching replacing strength with the gravity because we really need that chain to hang so instead of that now if I move it you will see it's just moving and it's not bringing back to original po it's just like a trail static trail and I will select all of them and add the gravity now it will fall down reducing dumping maybe less inertia less Mass so this is pretty much something you you can play with but with just rotation and gravity a little bit inertia uh we can simulate this so you you you you know that there are much more than this rotation so our chain should also be able to move like this and whenever it hits the other node it it should uh consider Collision so there are a lot of things that is not being considered here and with this physics constraint we clearly can't um consider all of them one thing we can do is make a little bit springy because some chains even though they are made from solid material they can uh have a little bit uh springy uh stretchy just for the sake of that I will uh create another set uh I'm going to uh use different settings for that so I don't need the same uh physics constraint because here uh all of them all properties will uh go under the same settings I need the scale to have different settings so for that I will create another set and save it under three and use scalix this is also not perfect it's not going to be perfect I will show you what does the scale for one on and then we can set it here so this is the scale again as with rotation when you move it up the scale if we have inertia I will reduce the strength right now if we have inertia it stretches just to be in the preview pose and only scale works so if I also turn on rotation you will see that it's pointing to the original POS while if we increase the strength it will go back to normal so this is what scale actually does uh answering two questions I I really don't know I have not tested but developers said that performance there would would be any performance issue it's a little bit uh lighter than actually other constraints so I don't think we should worry about it okay so this out of the way I will create constraints and try to enable only scale it's going to be subtle I really don't need too much here and still I will only need uh I think the gravity maybe with some strength I need that strength to fight the gravity otherwise it will constantly flow down see increasing the will bring actually it back at some point they will they should actually find equilibrium which is not something look because each affects its children that's why at the bottom we see um very stretched one so I think we can go with this maybe we can try to disable the scale for uh inheriting this way each of them will affect on their own so you can see a chain is stretching and going back I will try to find some value here okay a little bit stretching this is also something you can add and another thing we can add um moving them like not the scale but also moving them this will give another setting I'm just showing you what you can do but clearly I might go with just rotation because it depends what what this do in the animation but I'm just complicating in so you just see what what can be done let's create another set of physics save it here I will use only translation y gravity and it will start to go down increasing strength reducing the gravity if we don't need gravity with this setup yeah it's already like at the edge so with gravity it already breaks the setup so apart from stretching each bone we also have movement it's a little bit springy yeah but this is you can do so I will go and delete all the constraints to keep only rotation so with this setup we only have one constraint for each of them and we can clearly use it without any uh springing effect it still can work for us now the other issue I would like to tell um is to make a pth let me check something I will need a little bit of strength so when I rotate I actually see curves here for it looks a little bit laggy but it's it's not a problem I think they will fix it easily M my phone so when I rotate it the the strength value is actually make it to rotate otherwise it will always try to be at the bottom so we have strength and gravity together working uh to have this nice curvature you can also go ahead and um edit the values one by one for each of them and maybe give a little bit less dumpin here so the bottom section is is a little bit more has a little bit more oscillation because this one is clearly um this joint has very little Mass compared to the other ones so it's really up to you um but I will remove that because I'm going to attach the anchor to the bottom this I I did not try this um so I will be doing it now if it if I fail sorry for that but I really wanted uh to struggle uh with you watching so you also see all the solutions H let's see let's see I'm looking for some slow left and right but I don't know if I can actually achieve that because if I reduce the dumpin which will allow that uh this makes things uh to oscillate very fast like this is the one who allows us to actually oscillate but it's it's it does it very uh crazily so uh I don't have any information about the release of this version sorry for that I think to have more control over this uh weight here we can create a path and and we'll just try so this will be our part and all these bones will go there constrain them now I will remove all the constraints here or just turn off simulation and and make a length here so I will move this bone inside the main container here and bind the weights uh the mesh to those bones where is it here and here maybe I still need to put this bone here because they will detach at some point but let me simulate so later I I do it later okay now I need to create one constraint just for this and this is where I have more control I will ration and translate and add gravity move back maybe okay so I can see how part is working maybe we can reset constraints and see if spine can help us so you can see it's actually detaching from it I will need to create another bone on the tip of this and put this there just trying some crazy stuff I want that rotation from this big bone so maybe I can take it using transform constraints now let's just the physics um I need more rotation of set actually but I can't do that with this setup because right now rotation translate they they use the same I I love the translate difference but I need different rotation so maybe I can turn it off here and create another one and use rotation maybe bigger rotation so initia should be higher I see it actually rotates but I don't see why it's not applying yeah now it it rotates a little bit more I'll try uh to give more delay to the anchor and let's try to see if we can make the path work let's see rotation too much strength and more gravity maybe even less strength I'm looking at the bone actually because [Music] um the image has an offset and I will check it this constraint should actually copy this one let's see why it's not copying yeah now it's copying so we have our anchor mostly hanging and the reason why we have this so straight is because we we'll also need to reduce the strength from the translation anchor uh constraint reducing that giving higher gravity yeah something like this I guess I will need to disable this we don't need those h okay I I accidentally removed the simulation I guess somehow back to the track H so it it means that if I disable simulation for one physics it also disables for all the other ones or yeah how can this be true don't understand this so to for physics to work for this bone somehow it forces to others to also work I don't want to um say it as a fact because I might be just in correct I need to double check this but pretty much if I disable simulation for this I go back here and simulation is turned off here if I turn it on here I go back and I see it turned on here so let's for now turn it on maybe uh all the structure can't work if the children nodes are not there something I need to ask developers anyway uh I don't want to bore you more I will go ahead and create this setup it's again not going to be perfect but we need to try and test so we have this I will delete them and this okay now we are back to normal setup and removing this part I already have this part just a part no constraints so let's create constraints and Happ GE I think I missed one bone and where is it okay it was hidden great and the part is small small so let's make it bigger something like this uh the next thing I see there we have an offset for of the chain we don't like that so we have an option in the chain in the constraints path constraints to change the T tangent to chain so right now you can see that bones are tangent to the path changing to a chain we'll make sure they are connected to each other and changing to a chain scale will force them to to be scaled the bones if it's needed if there is a very short turn curvature yeah it it will be scaled we don't need that we we want original scale of the chain and that's the reason why we can't fix both edges right now because we don't have that ability as far as I know it's something like an IQ for constraint uh part constraint something like that so even if I move this you can see the other end will come with that because we have uh fixed uh length for the bones and it can be scaled there is no other way I can't like fix this point here and whenever I drag it it just stops so for that some I ke should I ke setup should be there stop moving but it's I I tried with that but it's not a cool idea so think of a bone here which has an IQ constraint one bone which has uh compress uh stretch locked and compress unlocked so we can move it we can move it this way but we can't actually move out so this way we will always have that that radius but it's it's not going to work in this scenario because we we really want not just fix this curvature but also because right now what would happen in in real it would go a little bit down and shrinking this curvature so the the real physics is not just fixing it here like instantly so I tried with that I will I will try again but right now let's create a basic uh setup so get here is here and let's select the path find it here and here okay so this is that this is the path and what we need to do is just create rotation phic constraint reduce the damping at the gravity I want it to be hanging reduce the strength and try it so I can see part is all all already being affected just move it down in the hierarchy maybe more dumping h less dumping more inertia um so this is very slight effect that we can achieve but as you can see up and down movement won't be affected as I said if I uh try to move it up we will see this uh going up and down which we don't want and even with if I move it too much here you will see this one is not looking like a touched I'm going to try to also add a scale I want to see what what that will do so scal X and the moment I increase the gravity it will start to stretch let's um leave it right now I will bring it back by just scaling down I don't know if this is a normal um way to do it you can see now scale also works and dumping not wind a little bit Mass dumping e okay you can see we have a little bit up and down but that comes with the price because we have here going up and down I I don't know how to do that without stretching I mean I can come here and turn on chain scale which will fix this but we will uh yeah we need to change to spacing to proportional and give 100% should be here so this way we can make sure that both edges are fixed but that will make that chain to change its scale scale of the nodes and become a rope or rubber we don't need that so yeah as I was saying we can create Nike constraint here for this bone and just try to uh limit compressing uh stretching so I will only turn on compress and it will prevent it to stretching too much so I will come back here to change it back to length and change back to chain so now this bone can compress but can't stretch let's put it here so you can see it compresses but then all of a sudden stops because we have and even uh it even starts going up at some point I will just try to reduce the oscillation uh increase so this is not something I would like to see not realistic physics and yeah let me know how it it looks for you so far I will go quickly and tell you uh all the limitations we have or or something because you might expect to see a great physics here but being realistic and practical is is is uh better here so uh first of all one thing that the bone length is really matters uh longer bone uh simulate a little bit heavy with exactly the same physics so I will select both of them create physics rotation let's remove um you can see the small bone is seems lighter so if I uh set the bone length to zero uh there won't be any rotation and this also works for the scale so without bones uh length only the translation works uh this X and Y otherwise it just it just there the the length of the bone needs for calculations uh the next thing as you already saw we can constrain one bone uh to multiple physics constraint uh right now uh properties are not separated uh the mix value so we have only one mix value here maybe in the future we will have a sliders here that would be great because we will use one constraint for different properties but right now we we will need to copy uh make another constraint another limitation that uh seems that can come with this constraint but it's actually uh not there the springing so imagine we have a grid of Bones and you want drag this and and the other also affect that like a mesh but I did not find any way to simulate that because the only way you can do is to create um put all of them here and then create constraints and give them some delay or bone length difference that way you will see some Randomness but clearly this bone will not affect this bone or the otherwise only parent affects the children born that's the relationship um I see right now again I'm not an official representation of developers team I'm just uh just lucky to receive the closed version the Alpha version to play and maybe showcase to you so you also give your insights and maybe uh concerns anyway so whatever I'm saying here don't take it as a full true fact because tomorrow I can say it the other way I'm still in the experimentation phase um the other thing that I really miss and I spoke to them and they said maybe they can add it later so imagine we have um bone that rotates here uh but you can see that it pretty much rotates um in in World space so all physics work in World space even if I put this bone inside another bone and scale this bone just to mimic that frame of reference SK frame of reference this bone will still be simulating in the world space so there is no actually local space um need need to inform field show there is no information about the release of this version okay so there is no local option I was assuming maybe we can have um local button here here as we have with translates uh constraints transform constraints the other thing we don't have is I mean it's it's not that they promised and they didn't give is gravity or wind being Global uh variable so right now if I set any gravity here if we have working with real characters and we have clots hanging you would assume that all those clots should um be assigned to the same gravity but you will need to go and manually assign them so if one day you want to change that gravity for all of them you will need still to select all of them and change that so I was assuming we would we might have that Global variables and we could could assign that gravity or wind to them so all s uses one wind um this is another limitation that we don't have right now and one more thing that people are confusing is that the wind is going to be great hey let's simulate the wind so wind what we have now is just a force that applies uh left to right like horizontal Force the similar way as the strength but strength is uh forcing the bone to go to a constrained pose so if your bone is rotated up and move to the left it will force it to go there and uh still look up uh while gravity or wind always force them to point that direction you actually uh set because if you set the positive High high value for gravity your bone will try to point down negative gravity will point up and if translate also enabled simulation property it will also reach up to fight the strength uh Force if strength is zero it will con con forever like move the way you actually set with wind and gravity so wind is not something that is um is going to animate your character is just a force that points that way to animate the wind to simulate the wind you will have to manually uh set the values up and down up and down and play with them so there is no actually which I'm going to ask them if if it's something realistic to have in this version so imagine you would have a drop down box here and there would be preset strong wind Slow Wind like or anything and if you set them this property is actually fluctuates and uh the value is actually changing to show that even here with Just Wind being there you will see that bone moving without moving that bone so the wind will affect consistently on that bone and that would uh also apply on the character and in the animation without even you animating them but right now you will have to animate made that wind even if they introduce the sliders here that Keys which we don't have right now just the buttons you will still need to go up and down up and down change the direction here and there so you will be simulating the wind it's not something like we have in other programs where you enable the wind set some parameters and it wind works so this is another uh limitation we have right now um what else yeah I I think this is for now something I have um I'm very happy with what we have and even though I said we don't have the mesh Springs or Collision all those are outside from this uh version scope uh I'm really happy with what we have because in practice uh practice we we really don't use that very much I mean of course uh we we use that Collision we might use some ball for falling but but in the animation we mostly what we really need is just that uh secondary movements that follow through movements of the clots or or the some hanging stuff and that's what's most important and takes too much time I mean that that ball falling the ground on the ground if they introduce that you will need to create a collision Boxes Etc and make sure that works and it would take so much time from us to actually set it up I'm not uh against of that obviously what I'm saying is just I'm happy that we have this simple start with this version maybe later we can add more and more um yeah what we really need they actually introduce it and this is pretty much enough personally for me so um that's said I think I will be finishing now and thank you for watching if you have any question apart from when the release will be out because I really don't know I have no information it's not up to me we don't have questions and yeah sorry for this uh unfinished works or streams I just sometimes find a little bit time to experiment and I really want you to see how uh this experimentation is going because I would like to see it if other people do something that I I can't do at the moment hey yeah that's that's actually sad if you are using 8 3.8 and a lot of people are using that when they are working in full-time jobs mostly in that uh company they use that fixed uh version but if you are freelancer once in a while you receive project that are 4.1 and so really think is a little bit better because yeah versions change much better faster yeah the Medusa head of course tentacles are super easy to animate with this okay see you in the next stream or video thank you very much
Info
Channel: Armanimation
Views: 3,987
Rating: undefined out of 5
Keywords: spine, spine2d, 2d, game character, animation, 2d animation, rig, rigging, spine 2d, spine 2d animation, spine 2d tutorials, spine 2d tutorial, 2d rigging, animation 2d, game art, game animations, VFX, fx, photoshop, spine animation, spine tutorial, spine pro, 2d spine, 2.5d animation, 2.5d, 2.5d vfx, spine 教學, face rig, spine vfx, spine 2d vfx, characters, game characters, physics, constraints, chain
Id: 1NkB4Ui4g-U
Channel Id: undefined
Length: 64min 20sec (3860 seconds)
Published: Sat Oct 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.