View Full Version : Faking collision detection for bones?
I finally put myself to the task of rigging my anime character, and soft IK is the perfect tool for the two loose strands of his belt.
I already adjusted the strength of their rest position so that they won't fall right through his jacket, but I also need to fake some sort of collision detection for when he's moving; So that they won't swing right through.
I was thinking of carefully setting their rotation limmits, but even if that's going to work, it's going to be quite labour intensive (and I absolutely hate setting rotation value's), so i was hoping there are some other options available.
Any suggestions are most welcome...!
|
|
flyingP
01-17-2004, 03:43 PM
Srek has a collision example for soft IK on his site which may be of interest, haven't had a chance to play with it myself but it looks very intersting
http://www.bonkers.de/download/downloads.html
Hi,
have a look here: http://www.bonkers.de/download/sik_collision.mov
http://www.bonkers.de/download/sik_collision.zip
In this example i'm mixing SIK and Dynamics via Xpresso.
Hope this helps
Srek
Just wanted to say that i have used the Soft IK collision file Srek has posted and it works great...:bounce: Thanks Srek:thumbsup:
Cactus Dan
01-17-2004, 04:27 PM
Howdy,
Here's another alternative. It's a bit more complicated to set up, though.
Make a dummy bone chain of the belt end and pull it outside of the character's hierarchy so that it deforms nothing (you won't even need to "Fix" the bones). Set up your dynamics with that bone chain just dangling straight down. That will be what I call the "Control Bone Chain". Then set up Goals for each of the "real" bones and use an expression to snap the Goals to the same bones on the "Control" bones using Global Position. Then copy these goals, place the copies somewhere inside the mesh's hierarchy and move them to a position just outside the mesh where they can be used as a clamp object for the other goals.
It's not a perfect solution but it's what I used for the stampede string on my cowboy character's hat:
http://home.earthlink.net/~cactusdanl/ContrlBn.jpg
Adios,
Cactus Dan
LucentDreams
01-17-2004, 07:29 PM
cool idea dean, what happens if your character bends over though wouldn't it still hang on an angle?
Cactus Dan
01-17-2004, 08:21 PM
Howdy,
Originally posted by Kaiskai
cool idea dean, what happens if your character bends over though wouldn't it still hang on an angle?
Do you mean like this?
http://home.earthlink.net/~cactusdanl/ContrlBn2.jpg
The way it's rigged is that the "Real" bones are trying to resolve themselves to the "Control" bones but the "Clamp Goals" are preventing them from going into the mesh. Once the character bends over and the "Control" bones swing outside the mesh and past the "Clamp Goals", then the "Real" bones can resolve themselves to the "Control" bones.
It doesn't work perfectly. There are still some issues in extreme positions, but that seems to be due to the left and right bone chains going around the face and how they are set up.
Adios,
Cactus Dan
Thanks for the suggestions all...!
Both seem pretty complex though. I can just barely get my head around Shreks example, let alone Dan's clever setup.
Dan, can you please explain your setup in some more detail, I'm intrigued but I'm afraid I don't fully understand why it works.
As I understand it: The real bone chain is always trying to get to the same position as the controll bones, but the clamps are preventing it, right?
And what exactly is the function of the expression? (to give both chains the same goals?)
LucentDreams
01-17-2004, 11:29 PM
ahh thanks for that Dan, I mininterpreted part of how it was working, Thats a very cool system you have there.
Cactus Dan
01-17-2004, 11:36 PM
Howdy,
Originally posted by Kirl
As I understand it: The real bone chain is always trying to get to the same position as the controll bones, but the clamps are preventing it, right?
And what exactly is the function of the expression? (to give both chains the same goals?)
It sound like you understand it better than you think.
The expression is for the Goals (of the "Real" bones) to try to match the Global Position of the corresponding "Control" bone and then get clamped by the "Clamp" Goals. The clamping has to be calculated with "Local" Position (so it still works when your character does a 180 turn). Therefore both the Goals and the "Clamp" Goals need to be a child of the same parent (whatever you decide).
Oh and one more very important thing I forgot to mention is that the "Control" bone chain's anchor bone needs an expression to match the Global Position of the "Real" bone chain's anchor bone so that the "Control" bones move with the character. For this I just used a simple Global Matrix to Global Matrix.
It's a little difficult to explain, but it's similar in principle to using a Rail Spline.
Adios,
Cactus Dan
Great stuff, thanks for clarifying Dan. :bowdown:
Would you mind posting the expressions you used? I would be very gratefull...
CGTalk Moderation
01-17-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.