# Week 8
## Motion capture
### Motion control
- Computer animation refers to any computer-based computation used in the production of images intended to create the perception of motion.
- In general, any value that can be changed can be animated. An object’s position and orientation are obvious candidates for animation, but all the following can be animated as well: the object’s shape, its shading parameters, its texture coordinates, the light source parameters, and the camera parameters.
- Three general approaches to motion control in 3D computer animation:
- ***artistic animation*** - the animator has the prime responsibility for crafting the motion.
- [Le régulateur, France, 2004 Philippe Grammaticopoulos](https://www.youtube.com/watch?v=kxwTm9nwywU) applying NPR (Non Photorealistic Rendering) animation technique.
- [Making of Le régulateur](https://www.youtube.com/watch?v=nmDN9EEyeOM&t=182s)
- ***data-driven animation*** - live motion is digitized and then mapped onto graphical objects. The primary technology for data-driven animation is *motion capture* (MoCap).
- [BVH Animation Technology for Overgrowth - Wolfire Games](https://www.youtube.com/watch?v=-UcXDCEkm5s)
- [The Motionbuilder-friendly BVH Conversion Release of CMU's Motion Capture Database](https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion)
- ***procedural animation*** - there is a computational model that is used to control the motion. Usually, this is in the form of setting initial conditions for some type of physical or behavioral simulation.
- [Wikipedia](https://en.wikipedia.org/wiki/Procedural_animation)
- [Karl Sims webpage](http://www.karlsims.com/)
Karl Sims is a digital media artist, computer graphics research scientist, and software entrepreneur. He was the founder of GenArts, Inc., a creator of visual effects software for the motion picture industry. He previously held positions at Thinking Machines Corporation, Optomystic, and Whitney/Demos Productions. Karl studied computer graphics at the MIT Media Lab, and Life Sciences as an undergraduate at MIT. He is the recipient of various awards including two ARS Electronica Golden Nicas and a MacArthur Fellowship Award.
- [Locomotion Studies - MIT - Karl Sims (1987)](https://www.youtube.com/watch?v=aUdCS1lLiYs)
- [More procedural animations by Karl Sims](https://archive.org/search.php?query=director%3A%22Karl+Sims%22)
- [Dutch interview (VPRO) with Karl Sims](https://www.youtube.com/watch?v=WmrTNrtE-Lk)
- [An embodied approach to arthropod animation](https://www.youtube.com/watch?v=I1P_B65XW4I)
a system for dynamically animating ground based arthropods in real-time, capable of traversing realistically across a complex, arbitrary environment. The physical simulation of the virtual world further grounds the creatures, enabling complex emergent animations to form.
- [Deepmotion: Procedural Animation for Characters via Scripting in C#](https://blog.deepmotion.com/2018/04/25/procedural-animation-for-character/)

- [Unity3D: Physics Based Procedural Animation on a Humanoid](https://www.youtube.com/watch?v=UkvHydwP2mw)
## Animation in interactive 3D
When playing a game, the player drives the motion of the scene. Therefore,
animation is stored in small sequences that are controlled using the joystick
(the player's control). For character animation, some systems support inverse
kinematics (IK) and some do not.
### Reading: Interactive 3D
- Art of Maya [pdf link](http://web.cse.ohio-state.edu/~parent/classes/682/MAYA/art_of_maya.pdf)
- Interactive 3D. P.81 ~ 85.
## MoCap data: data collecting or generating
- Download free motion capture data as .fbx
- [turbosquid.com](http://www.turbosquid.com/Search/Motion-Capture/free/fbx)
TurboSquid provides 3D assets including 3D models. You can find free 3D models as well as free motion capture FBX data that can be imported to Maya.
- Create a folder to save the downloaded fbx files.
### In Maya
- **Quick Rig** (Skeleton/Quick Rig) to your biped modeling in Maya.
- Import fbx data into the scene. Check the imported character from the outliner window, and play to check the animation.
- In the HIK window, your rigged character should be in the Character box (e.g., QuickRigCharacter) and change the Source to the imported character. (e.g., Humanoid1)
- Now you can see that your character behaves according to the imported MOCAP motion.
- You can **bake** animation using the HIK command and export the animation clip with the model as FBX.

### Export to Unreal
- Choose the highest bone of your character, where has kyes.
- Go to File / Send to Unreal -> Selection and export your animation.
- You can choose the mesh and skeletons and export them too.
### In the Unreal Engine
- Open Epic Games Launcher and Launch Unreal Engine. You need to create your account in the Epic Games, if you don't have.
- Create New Project.
- In the Content Browser, create one folder and import your fbx files to here.
### Related tutorial
- [Unreal Engine 4 - Mixamo To Unreal Engine 4 - UE4 Import by Titanic Games](https://www.youtube.com/watch?v=8RB53mAiwGw)
- [ANIMATION FROM MAYA TO UE 4 10 HD by Manoanim APS](https://www.youtube.com/watch?v=zOZbghSJNpc)
- [MAYA CHARACTER TO UE4 EP5- WALK CYCLE ANIMATION by SacMakersDaniel](https://www.youtube.com/watch?v=_ZSDTp-l3pw)
- [MAYA CHARACTER TO UE4 EP7- IMPORTING CHARACTER AND ANIMATIONS by SacMakersDaniel](https://www.youtube.com/watch?v=5TBHJd6olo8&t=133s)
### How to add a third-person camera in Unity 3D
- [Sharp Coder blog](https://sharpcoderblog.com/blog/third-person-camera-in-unity-3d)