![Page 1: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/1.jpg)
Raycasting based auto-rigging method for humanoid meshes
Romain LOPEZChristophe POIREL
![Page 2: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/2.jpg)
Rigging
![Page 3: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/3.jpg)
AutoRigging
Biped Armature
![Page 4: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/4.jpg)
Similar WorksFrankenrig
Christian Miller Okan Arikan Don Fussell
Symposium on Interactive 3D Graphics and
Games (I3D) 2010
![Page 5: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/5.jpg)
Similar WorksSkeleton Extraction from a Mesh for Easy Skinning Animation
Martin MadarasRoman DurikovicTomas Agoston
Tomoyuki Nishita
13th International Conference on
Human and Computer - HC
2010
![Page 6: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/6.jpg)
Similar WorksPinocchio
Ilya Baran & Jovan Popovi´c
SIGGRAPH 2007
![Page 7: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/7.jpg)
The method
It’s in two parts:• 2D body-mapping of the mesh.• 3D raycasting to center the bones.
Tools used : Blender, Python
![Page 8: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/8.jpg)
Body mapping :Silhouette
![Page 9: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/9.jpg)
Why a body mapping?
Armature:LegsArmsHeadTorso
![Page 10: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/10.jpg)
Human point of view
Anybody can identify the differents body parts of a mesh.
It’s more difficult for a computer…
![Page 11: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/11.jpg)
Computer point of view
It’s a 3D points cloud.
How to simplify the mesh?
![Page 12: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/12.jpg)
Creating a 2D projection
Using a grid in front of the mesh:
A ray is cast through each hole in the grid.
A a ray hits the mesh, we keep the instersection point.
![Page 13: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/13.jpg)
Silhouette
Each intersection point is put on the same plane:
silhouette
Requirement: all limbs must be separated and visible.
![Page 14: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/14.jpg)
Outlining
![Page 15: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/15.jpg)
Final silhouette
Only the outlining points are necessary to identify the limbs.
How to find them?
![Page 16: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/16.jpg)
First step
The lower slice with four points matches the legs.
![Page 17: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/17.jpg)
Navigation
![Page 18: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/18.jpg)
Paths
We link the points regarding three paths.
What for?
![Page 19: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/19.jpg)
Finding the legs
We go through the middle path, from point to point, keeping the max height.
![Page 20: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/20.jpg)
Finding the arms
We save the legs and remove them.
Among the remaining points, the edges are the arms.
The points along the edge of the legs are the hips.
![Page 21: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/21.jpg)
Starting point
We calculate the line equation between the arm and the hip.
If there’s a point between them on the line, it’s the starting point.
Y = A*X + B
![Page 22: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/22.jpg)
Finding the arm pits
We increase ‘b’ in the line equation.
At each step, we look for the closest point to the line.
The point ends up being « stuck » in the arm pit.
![Page 23: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/23.jpg)
Finding the arm
The points between the hip and the arm pit are stored and removed.
Starting with the arm pit, from point to point, we reach the point with the same abscissa as the arm pit.
![Page 24: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/24.jpg)
Finding the head
We remove the arms, and the remaining points are the head.
![Page 25: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/25.jpg)
Result
Here is a body mapping.
Now, how to place the bones using it?
![Page 26: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/26.jpg)
Raycasting Placing the bones
![Page 27: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/27.jpg)
Entry points
Provided by the body mapping.
![Page 28: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/28.jpg)
The arm
We start in the arm.
The arm pit is the height limit, the stop point.
How to use these points to place the bones?
![Page 29: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/29.jpg)
Raycasting
From the entry point, inside the slice, we cast rays in all directions.
![Page 30: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/30.jpg)
Inside view
We keep the closest intersection points from the entry point.
![Page 31: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/31.jpg)
Projection
The rays are cast from the entry point.
![Page 32: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/32.jpg)
Polygon
A polygon is made of the intersection points.
How the find its center?
![Page 33: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/33.jpg)
Barycenter
Each point has weight depending on the distance to its closest neighbour.
Therefore, for this slice, the bone will go through the barycenter.
![Page 34: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/34.jpg)
Step by step
From the barycenter we go down the limb.
Again, at each slice, we cast rays to find the next barycenter.
![Page 35: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/35.jpg)
Stop condition
The algorithm stops when it’s outside the mesh.
Then it goes back in the opposite direction.
N.B. : There’s no hand rigging for now.
![Page 36: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/36.jpg)
Stop condition
We stop when we reach the arm pit.
![Page 37: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/37.jpg)
Bone path
The barycenters found at each step are candidates for the joint positions.
![Page 38: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/38.jpg)
Bone path
The joints positions will be used to place the bones.
![Page 39: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/39.jpg)
Shoulder
The shoulder is found by casting a ray in the opposite direction of the arm path.
It’s placed half way of the intersection point.
What about he other limbs ?
![Page 40: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/40.jpg)
Leg
![Page 41: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/41.jpg)
Hip
The hip is on the vector of the path at an anatomical ratio of the leg length.
![Page 42: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/42.jpg)
All the points are found
![Page 43: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/43.jpg)
Placement de l’armature
![Page 44: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/44.jpg)
Armature ratios
![Page 45: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/45.jpg)
Head
![Page 46: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/46.jpg)
Head
![Page 47: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/47.jpg)
Foot
![Page 48: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/48.jpg)
Foot
![Page 49: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/49.jpg)
Final result
![Page 50: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/50.jpg)
Motion capture linking
![Page 51: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/51.jpg)
The rest position
It’s the initial position of the armature in the motion capture data.
From this position, rotations will be applied frame by frame.
![Page 52: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/52.jpg)
Our goal
Here’s the rigged character.
We want to put its armature in rest position while moving the mesh.
![Page 53: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/53.jpg)
Method
Using any frame to cancel its rotations, so it will be back in rest position.
![Page 54: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/54.jpg)
Method
We modify this frame to place fit the rigged armature, by applying rotations, translations and scalings.
Then we bind this frame’s armature to the mesh. This way the mesh will be moved with the bones.
![Page 55: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/55.jpg)
Method
Then, we cancel the rotations so the armature is back in rest position.
We apply the mesh transformation.
Then, again, armature is linked the mesh.
![Page 56: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/56.jpg)
Method
This way we can link mocaps to our rigged character in order to animate it.
![Page 57: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/57.jpg)
Conclusion
![Page 58: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/58.jpg)
Results
3788 faces8.8 seconds
![Page 59: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/59.jpg)
Results
8820 faces13.1 seconds
![Page 60: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/60.jpg)
Results
1425 faces5.2 seconds
![Page 61: Raycasting based auto-rigging method for humanoid meshes](https://reader035.vdocuments.site/reader035/viewer/2022081604/56816760550346895ddc34f1/html5/thumbnails/61.jpg)
Future works
Enhancing the shoulder positionning.
Enable the user to improve the bones placement.