Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Final IK
#1
Hi!

I read 'somewhere' earlier, before buying Obi Cloth, that it should work with Final IK. However, I cannot get it to work.

I am running the solver in LateUpdate.

I have a character, wearing a sash, which I'm trying to animate with Obi Cloth. It works, but problematically. With no Final IK enabled, it works as should. 
However, when Final IK is enabled, the part of the sash that is tied around the character's waist and should stay under his armour, constantly jumps (shows) above the armour in parts. Sometimes more, sometimes less. And when the character is going down a hill, for example, the part that should stay in place shows above armour and noticeably jumps up and down. 

Umm... some idea? Thanks.

Best regards, Laura
Reply
#2
Yes I am having this same problem. I notice in late update it generally doesn't behave as well as in fixed update, even without Final IK - though it is a necessity as in fixed update the hair (that I am trying to simulate) will float above the character instead of staying place. In late update, though the cloth stays on the body, unfixed particles will flicker around and go crazy, until you stop using the IK features.

I am using it with Final IK's "FBBIK Grounder" for foot correct placement.
Reply
#3
Hi to both!

Keep in mind that updating in LateUpdate won't allow the engine to use a fixed timestep (which is required for accurate physics). Same happens with Unity's built-in cloth. Some jitter and "jumpy" cloth, even when completely unaffected by external forces, is to be expected. Tme passed between render updates is not always the same, even though Obi uses a low-pass filter to smooth out abrupt changes in timestep.

However by your description alone I cannot tell if what you're experiencing is normal or not. Do you have some screenshots / video to show the issue?
Reply
#4
(05-01-2018, 12:40 AM)josemendez Wrote: Hi to both!

Keep in mind that updating in LateUpdate won't allow the engine to use a fixed timestep (which is required for accurate physics). Same happens with Unity's built-in cloth. Some jitter and "jumpy" cloth, even when completely unaffected by external forces, is to be expected. Tme passed between render updates is not always the same, even though Obi uses a low-pass filter to smooth out abrupt changes in timestep.

However by your description alone I cannot tell if what you're experiencing is normal or not. Do you have some screenshots / video to show the issue?

Hi Jose, here is a video of the problem (the last 10 seconds give the best demonstration). Note there is no wind or external force in the scene.

https://www.youtube.com/watch?v=D7cKalDfbfI
Reply
#5
(05-01-2018, 07:25 PM)Deckard_89 Wrote: Hi Jose, here is a video of the problem (the last 10 seconds give the best demonstration). Note there is no wind or external force in the scene.

https://www.youtube.com/watch?v=D7cKalDfbfI

Hi there,

Have you set up colliders, and set up a rigidbody at your character's root? if you did, make sure you checked "kinematic for particles" in it. If you don't, particles will try to affect the physics of the character, and since that in turn changes the reference frame of the particles, it creates a feedback loop causing them to jiggle around. Just a wild guess based on similar situations i've seen before, I could be off the track though.

If this is not the case, I guess the only way for me to figure out what's happening is to take a look at the scene. If you could export it in a package I would be glad to take a look at it and diagnose.
Reply
#6
(08-01-2018, 08:01 PM)josemendez Wrote: Hi there,

Have you set up colliders, and set up a rigidbody at your character's root? if you did, make sure you checked "kinematic for particles" in it. If you don't, particles will try to affect the physics of the character, and since that in turn changes the reference frame of the particles, it creates a feedback loop causing them to jiggle around. Just a wild guess based on similar situations i've seen before, I could be off the track though.

If this is not the case, I guess the only way for me to figure out what's happening is to take a look at the scene. If you could export it in a package I would be glad to take a look at it and diagnose.

Hmm... Where is "kinematic for particles" on the rigid body? Do you have an image I could take a look at?
Reply
#7
(08-01-2018, 09:32 PM)Deckard_89 Wrote: Hmm... Where is "kinematic for particles" on the rigid body? Do you have an image I could take a look at?

It's hard to miss, since it is the only property available for rigidbodies. Keep in mind that ObiRigidbody is automatically created at the topmost rigidbody on your collider hierarchy whenever you add a ObiCollider component. It's not a component you manually have to add. The pic is taken from the CharacterCloth sample scene.

[Image: xUOgX22.png]
Reply
#8
Gran sonrisa 
Ah, you mean ObiRigidbody!  Gran sonrisa Okay, I have applied one now (actually it did it automatically when I added a collider to the head, like you said it would). I also tried increasing World Velocity Scale a little and setting Update Normals to Skin. It seems to be a little bit improved, but it could be my imagination - it still does jiggle around when using IK.
You should be able to recreate it quite easily; Just get a character with hair (make a test one quickly with Fuse or something like that), then apply Full Body Biped IK & Grounder FBBIK components to this character, and setup Obi Cloth on the hair mesh like normal (but in Late Update sim order). Now try and walk on some stairs for a while, or very uneven terrain. Of course make sure the stairs (or whatever) are on a layer included in the Grounder Solver. If you find a reliable solution I'd be glad to hear about it.

Cheers
Reply
#9
(09-01-2018, 07:19 PM)Deckard_89 Wrote: Ah, you mean ObiRigidbody!  Gran sonrisa Okay, I have applied one now (actually it did it automatically when I added a collider to the head, like you said it would). I also tried increasing World Velocity Scale a little and setting Update Normals to Skin. It seems to be a little bit improved, but it could be my imagination - it still does jiggle around when using IK.
You should be able to recreate it quite easily; Just get a character with hair (make a test one quickly with Fuse or something like that), then apply Full Body Biped IK & Grounder FBBIK components to this character, and setup Obi Cloth on the hair mesh like normal (but in Late Update sim order). Now try and walk on some stairs for a while, or very uneven terrain. Of course make sure the stairs (or whatever) are on a layer included in the Grounder Solver. If you find a reliable solution I'd be glad to hear about it.

Cheers

Hi,

Found time to test this out. Works fine for me (tested it in the sample CharacterCloth scene). Just make sure that ObiSolver is set to execute after FinalIK in the script execution order panel.

If FIK executes after Obi (FIK places itself as the last thing to execute automatically), it will reposition the cloth after the simulation every frame which leads to jittering (cloth falls due to gravity, FIK moves it back up to meet IK constraints, cloth springs back up and falls, FIK moves it back up...etc).

Keep in mind that most IK methods make adjustments every frame to the raw animated bones, unlike physics engines (like Obi) which use the previous frame's output as input for the next frame of simulation. This means that the order in which you apply them is extremely important since any sync issues won't manifest themselves as 1-frame delays or similar stuff (which would be hard to notice), but will haunt you every frame instead.

What you're after is this sequence of events per frame:

- Skeletal animation poses the character.
- FIK moves the bones to their right position, to meet IK constraints.
- Obi simulates the hair mesh using the IK-corrected bones as input.

So, set ObiCollider and ObiSolver scripts to execute last, after all Final IK stuff.

cheers!
Reply
#10
(11-01-2018, 05:24 PM)josemendez Wrote: Hi,

Found time to test this out. Works fine for me (tested it in the sample CharacterCloth scene). Just make sure that ObiSolver is set to execute after FinalIK in the script execution order panel.

If FIK executes after Obi (FIK places itself as the last thing to execute automatically), it will reposition the cloth after the simulation every frame which leads to jittering (cloth falls due to gravity, FIK moves it back up to meet IK constraints, cloth springs back up and falls, FIK moves it back up...etc).

Keep in mind that most IK methods make adjustments every frame to the raw animated bones, unlike physics engines (like Obi) which use the previous frame's output as input for the next frame of simulation. This means that the order in which you apply them is extremely important since any sync issues won't manifest themselves as 1-frame delays or similar stuff (which would be hard to notice), but will haunt you every frame instead.

What you're after is this sequence of events per frame:

- Skeletal animation poses the character.
- FIK moves the bones to their right position, to meet IK constraints.
- Obi simulates the hair mesh using the IK-corrected bones as input.

So, set ObiCollider and ObiSolver scripts to execute last, after all Final IK stuff.

cheers!

Thank you, this seems to have fixed it! You might want to make a note about the script execution order in the manual for people using Root Motion plug-ins, because for me Final IK was indeed set to be last, and I never would have figured that out if you hadn't told me.

Thanks again  Sonrisa
Reply