Raycasting based auto-rigging method for humanoid meshes

62
Raycasting based auto- rigging method for humanoid meshes Romain LOPEZ Christophe POIREL

description

Raycasting based auto-rigging method for humanoid meshes. Romain LOPEZ Christophe POIREL. Rigging. AutoRigging. Biped. Armature. Similar Works Frankenrig. Christian Miller Okan Arikan Don Fussell Symposium on Interactive 3D Graphics and Games (I3D) 2010. - PowerPoint PPT Presentation

Transcript of Raycasting based auto-rigging method for humanoid meshes

Page 1: Raycasting based auto-rigging method for humanoid meshes

Raycasting based auto-rigging method for humanoid meshes

Romain LOPEZChristophe POIREL

Page 2: Raycasting based auto-rigging method for humanoid meshes

Rigging

Page 3: Raycasting based auto-rigging method for humanoid meshes

AutoRigging

Biped Armature

Page 4: Raycasting based auto-rigging method for humanoid meshes

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

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

Similar WorksPinocchio

Ilya Baran & Jovan Popovi´c

SIGGRAPH 2007

Page 7: Raycasting based auto-rigging method for humanoid meshes

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

Body mapping :Silhouette

Page 9: Raycasting based auto-rigging method for humanoid meshes

Why a body mapping?

Armature:LegsArmsHeadTorso

Page 10: Raycasting based auto-rigging method for humanoid meshes

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

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

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

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

Outlining

Page 15: Raycasting based auto-rigging method for humanoid meshes

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

First step

The lower slice with four points matches the legs.

Page 17: Raycasting based auto-rigging method for humanoid meshes

Navigation

Page 18: Raycasting based auto-rigging method for humanoid meshes

Paths

We link the points regarding three paths.

What for?

Page 19: Raycasting based auto-rigging method for humanoid meshes

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

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

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

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

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

Finding the head

We remove the arms, and the remaining points are the head.

Page 25: Raycasting based auto-rigging method for humanoid meshes

Result

Here is a body mapping.

Now, how to place the bones using it?

Page 26: Raycasting based auto-rigging method for humanoid meshes

Raycasting Placing the bones

Page 27: Raycasting based auto-rigging method for humanoid meshes

Entry points

Provided by the body mapping.

Page 28: Raycasting based auto-rigging method for humanoid meshes

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

Raycasting

From the entry point, inside the slice, we cast rays in all directions.

Page 30: Raycasting based auto-rigging method for humanoid meshes

Inside view

We keep the closest intersection points from the entry point.

Page 31: Raycasting based auto-rigging method for humanoid meshes

Projection

The rays are cast from the entry point.

Page 32: Raycasting based auto-rigging method for humanoid meshes

Polygon

A polygon is made of the intersection points.

How the find its center?

Page 33: Raycasting based auto-rigging method for humanoid meshes

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

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

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

Stop condition

We stop when we reach the arm pit.

Page 37: Raycasting based auto-rigging method for humanoid meshes

Bone path

The barycenters found at each step are candidates for the joint positions.

Page 38: Raycasting based auto-rigging method for humanoid meshes

Bone path

The joints positions will be used to place the bones.

Page 39: Raycasting based auto-rigging method for humanoid meshes

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

Leg

Page 41: Raycasting based auto-rigging method for humanoid meshes

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

All the points are found

Page 43: Raycasting based auto-rigging method for humanoid meshes

Placement de l’armature

Page 44: Raycasting based auto-rigging method for humanoid meshes

Armature ratios

Page 45: Raycasting based auto-rigging method for humanoid meshes

Head

Page 46: Raycasting based auto-rigging method for humanoid meshes

Head

Page 47: Raycasting based auto-rigging method for humanoid meshes

Foot

Page 48: Raycasting based auto-rigging method for humanoid meshes

Foot

Page 49: Raycasting based auto-rigging method for humanoid meshes

Final result

Page 50: Raycasting based auto-rigging method for humanoid meshes

Motion capture linking

Page 51: Raycasting based auto-rigging method for humanoid meshes

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

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

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

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

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

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

Conclusion

Page 58: Raycasting based auto-rigging method for humanoid meshes

Results

3788 faces8.8 seconds

Page 59: Raycasting based auto-rigging method for humanoid meshes

Results

8820 faces13.1 seconds

Page 60: Raycasting based auto-rigging method for humanoid meshes

Results

1425 faces5.2 seconds

Page 61: Raycasting based auto-rigging method for humanoid meshes

Future works

Enhancing the shoulder positionning.

Enable the user to improve the bones placement.

Page 62: Raycasting based auto-rigging method for humanoid meshes

Questions?

Romain LOPEZ : [email protected] POIREL : [email protected]