smallarrows.GIF

156 syllabus      site index      3D artists      past student work        DMA

Unity VR with Maya IK Inverse Kinematics

unity_ik
Tutorial to create an animated IK rig and import into Unity

In Maya:
Select
Create->Polygon Primitives->Cylinder->option.jpg

     Input Height divisions:  3
     Input Cap divisions:  0

Scale the cylinder 4 units to elongate



Create a Skeleton
Switch to the Rigging Module
rigging_module 


Hit 4 to switch to Wireframe Shading


Select Skeleton->Create Joints
     Draw a skeleton over your cylinder


Select the cylinder and the parent of the joints in the Outliner   (Windows->Outliner)

Select Skin->Bind Skin->option.jpg
     Change Max influences to 1     (default 5)
The weighting will be restricted to individual joints rather than spread across multiple joints.
You will need to adjust this based on your geometry, keep it low, 5 is too much.
(The gif example above has 9 height divisions on the cylinder and 2 Max influences.)

unity_ik1



Animate the Rig
Move the timeline over to frame 1 at the bottom of the screen.
timeslider_1

Select a joint

Highlight Rotate Z in the Channel Box
     Use the right mouse key to bring up mini menu, choose Key Selected.


Move the timeline over to frame 120 at the bottom of the screen.

Rotate the joint

Highlight Rotate Z in the Channel Box
     Use the right mouse key choose Key Selected.



Hit the play arrow on the time slider. timesliderplay.jpg



Note: Maya Tools such as IK Handles will not import into Unity.




In Unity:
Import SteamVR

Type SteamVR in the search bar
unity_VR_steam_plugin
Add the SteamVR Player Prefab to your scene
Select the SteamVR folder from the Project tab
Select the arrow, open InteractionSystem, open Core, select Prefabs
Drag the Player into the Hierarchy tab



Add your Maya File to your scene
Select the Maya file in the Assets list
Select the Model tab in the Inspector
Change the Scale Factor to .3
Uncheck Import Cameras and Lights
Hit Apply

unity_import_scale

Drag your Maya file from the Assets list over to the Hierarchy tab.



Loop the animation
Select your Maya Model in Assets

Switch to the Rig tab in the Inspector
     Change Animation Type to Legacy  (default was Generic)
     Hit Apply
Switch to the Animation tab
     Change Wrap Mode to Loop, near the top (default default)
     Select Add Loop Frame
     Change Wrap Mode to Loop, near the bottom (default default)


Select the Play arrow
unity_play_arrow



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Publish WebGL


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

smallarrows.GIF