With the shoulder joint setups always have problems when binding to the skeleton. I came across an interesting solution in Maya from TD Matt and I ported it to 3dsMax using a script controller and auxiliary elements.

Here is a video about how it works

Setup consists of several elements:

 

где Shoulder Bone – additional skeleton bone (that should be skinned)

Sphere with texture coords – poly object to work with ray intersection algorithm

Origin bone – position for ray start point

Target bone – position for ray direction

?дея заключается в следующем: перевести вращение кости в пространство текстурных координат сферы с помощью пересечения луча с поверхностью сферы. Текстурные координаты позволят нам заскриптовать положение дополнительной кости, избежав использования вращений Ейлера кости и соответственно избежав перекручивания, гипбел лока и прочих проблем.

The idea is this: to work not with the bone rotation, to work with a sphere texture coords when scripting additional shoulder bone. Texture coordinates will allow us to scripted position of the additional bone, avoiding the use of rotations respectively Euler angles, avoid twisting, gimbl lock and other problems.

Here is a sample of a script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pos1 = rootPos.pos
pos2 = endPos.pos
rot = [rotController.x_rotation, rotController.y_rotation, rotController.z_rotation]

rm = RayMeshGridIntersect() --create an instance of the Reference Target

rm.Initialize 10 -- init voxel grid 10x10x10
rm.addNode theSphere -- add sphere to the grid
rm.buildGrid()

res=rot.y

hits = rm.intersectSegment pos2 pos1 false
if (hits > 0) then
(
theIndex = rm.getClosestHit()
theFace = rm.getHitFace theIndex
theBary = rm.getHitBary theIndex

-- Get the texture face
face = getTVFace theSphere theFace

-- Get the UVW verts of the face
tv1 = getTVert theSphere face.x
tv2 = getTVert theSphere face.y
tv3 = getTVert theSphere face.z

tv = tv1 * theBary.x + tv2 * theBary.y + tv3 * theBary.z

res = tv.y
print res
)

rm.Free()
res * 50.0

 

Download 3dsmax scene (version 2009+) – ShoulderBone

Shoulder bone in 3dsMax
Tagged on:             

Leave a Reply

Your email address will not be published. Required fields are marked *