|
Vacation time |
|
|
|
Written by Administrator
|
|
Sunday, 05 October 2008 19:52 |
|
I got my year vacation now. I will be away from PC. Sorry if anyone dropped me an email and I didn't respond earlier. I will get to everyone of you when I get home.Thanks!
|
|
The simplest simplest simplest solution for Pole Vector |
|
|
|
Written by Marin Petrov
|
|
Thursday, 18 September 2008 13:11 |
global proc string mp_PoleVec () { string $handle[] = `ls -sl`; float $px = `getAttr ($handle[0] + ".poleVectorX")`; float $py = `getAttr ($handle[0] + ".poleVectorY")`; float $pz = `getAttr ($handle[0] + ".poleVectorZ")`; float $tx = `getAttr ($handle[0] + ".translateX")`; float $ty = `getAttr ($handle[0] + ".translateY")`; float $tz = `getAttr ($handle[0] + ".translateZ")`; string $loc = firstS(`spaceLocator`); move -r -os $tx $ty $tz $loc; move -r -os (10*$px) (10*$py) (10*$pz) $loc; select -r $loc; select -add $handle; poleVectorConstraint -weight 1; return $loc; } mp_PoleVec;
What is so simple about it is that actually every ik Handle you create has the Pole Vector calculated at it's creation. That's why the joints stay in the same place when you create an ik Handle. And the Pole vector is simply the Pole Vector floats you read at the attribute editor of the handle. I don't know why so many people, me including don't know that. It is so obvious. Maybe that's why :) Ok - with that script just select the handle you want and run the mp_PoleVec procedure - it will automatically create a locator and constraint it to the ikHandle you selected. The good thing in this approach is that you can create a polevector fo N number of joints in the ik Solution! Note: The ikHandle must be parented to the world for the script to work.
|
|
Finding the world space for a Pole Vector |
|
|
|
Written by Marin Petrov
|
|
Friday, 15 August 2008 14:42 |
|
The problem: If you have three joints, included in an Ik Solution of some type, and the plane the three points are making is NOT parellel with one of the orthogonal projections of the Cartesian space it will be difficult for you to find the proper placement of a Pole Vector , especially if /after adding it to the IK solution/ you don't want the joints to reorient themselves. I have seen several methods for this issue. The best solution I found /and used myself :) / is something I have seen Aaron Holly doing. I simply thought there is an easier solution for this problem. Me and a friend and ex colleague of mine - Slavi Kaslev /great engineer btw :) !!! / have written some code that simply adds a locator in world space, that can be used for Pole Vector without reorienting the chain. Here is the solution, which I used for some time now with my autorigging tools I've wrote: global proc string mp_CScreatePoleLocator (string $jointA, string $jointB, string $jointC) { vector $a = `xform -q -a -ws -t $jointA`; vector $b = `xform -q -a -ws -t $jointB`; vector $c = `xform -q -a -ws -t $jointC`; vector $ab = $b - $a; vector $ac = $c - $a; vector $up = cross($ab, $ac); vector $direction = cross($ac, $up); float $rot[] = vector2rot($direction, $up); string $locator = firstS(`spaceLocator`); move -a -ws ($b.x) ($b.y) ($b.z); rotate -a -ws ($rot[0]) ($rot[1]) ($rot[2]); // NOTE: Change here for locator offset move -r -os 0 0 5; return $locator; }
firstS /on the 15th row/ is a proc that simply returns the first string. The idea behind this is to find a fourth point , which sits on tha plane of the three joints. That way, when you use that point for a Pole Vec - there are no offsets of the joints. Me and Dobri Georgiev made another solution for this : //the three points and their absolute coords vector $a = `xform -q -a -ws -t joint1`; vector $b = `xform -q -a -ws -t joint2`; vector $c = `xform -q -a -ws -t joint3`; //the distance between the points as vectors vector $ab = unit($b - $a); vector $bc = unit($b - $c); //make the vectors start from the B point and offset them by 10 vector $f = $b + 10*$ab; vector $g = $b + 10*$bc; // find the center of the triangle made by the new vectors vector $center = ($f + $g + $b)/3; string $locator = firstS(`spaceLocator`); move -a -ws ($center.x) ($center.y) ($center.z);
This is a little different approach - finding the three points in world space /like the first method/ and after that finding the distance between the points and storing them as vectors. Then making new vectors starting from the $b point but in the opposite direction of the first ones and shifting them by 10. Then finding the center of the triangle /the flipped one/ and adding a locator at the center. Cool Variant :) If you have another solutions for these I would like to hear them :)
|
|
Michael Phelps |
|
|
|
Written by Administrator
|
|
Friday, 15 August 2008 14:23 |
|
This is the guy that deserves the most attention at these Olympics!!!!
Simply incredible! He is making a World Record from every start! He already won 6 gold medals! It is simply a pleasure to watch him swim. GO GO Michael!!!!!!
|
|
|
Bulgaria lost over USA |
|
|
|
Written by Marin Petrov
|
|
Friday, 15 August 2008 14:18 |
|
Ahhhhh. Nothing more to say. I'm angry!!! Not because we lost /1:3 games/ , but because there are some things happening with our team which nobody knows why. Our captain - Plamen Konstantinov still doesn't play. They are making some blood tests and who knows why. If he manages to come for some of the next matches, the team won't be the same as it used to be. I can't believe they are stopping him play at the Olympics as I`m sure it's some intrigues and not a doping issue as they are saying in the medias.
|
|
Bulgaria - second volleyball win! |
|
|
|
Written by Marin Petrov
|
|
Tuesday, 12 August 2008 22:05 |
|
Bulgaria just won over Japan on their second volleyball match in the preliminary groups! Before that we won the match with China, now we will be playing with Italy, which will be a little more hard I think :) These two matches we were playing without our captain - Konstantinov. Nobody knows why he's not playing, the medias just said that he will be playing in the next matches though! I hope so!
|
|
|
|
|
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>
|
|
Page 10 of 25 |