Unity with Vive VR with Maya Meshes

smallarrows.GIF

VR with Unity, Maya Meshes and HTC Vive

Start Unity (You may need to set up an account)
Select NEW

Give your project a name such as  Maya_Tutorial. This will create a folder with folders inside.
Save to the Desktop.
Select 3D.
Select Create Project.

Close the Services tab, right mouse over the tab, select Close Tab if Services is there.


Import a VR Camera and Sensors for Vive
Choose Window->Asset Store

Type Steam VR Plugin  the free one
unity_VR_steam_plugin
Select the
Steam VR Plugin and Download

Choose Import
Choose Accept All and OK a few times

Put the main view window back to Scene instead of Asset Store
Click the Scene tab on the left

Open the arrow on the SteamVR folder from the Project tab, select Prefabs
In the Inspector tab
change Size to Calibrated, this uses the calibrated area from the headset
Drag the CameraRig into the Hierarchy tab

Delete the Main Camera from the Hierarchy tab if there is one

Add RigidBodies and colliders to Vive hand held controllers
Open the arrow for CameraRig in the Hierarchy tab choose one of the Controllers
Choose
Component->Physics->RigidBody
Choose Component->Physics->Sphere Collider

In the Inspector tab select Edit Collider to change the size of the collider
Do this for the other controller too.


In Maya:
Create poly models for items that do not move in your VR environment. (NURBs do not work)

Scale:
Make your active area fit within a 15 x 10 x 11.25 xyz unit area centered. (This size could vary based on the calibration of your Vive.)

If you have any texture maps place them in the Desktop->Unity project-> Assets folder
Assign the textures from Maya, get the images from the Unity project Assets folder.

Choose File->Send to Unity->Set Unity Project select  Desktop->Unity project
Choose File->Send to Unity->All or Selection
Under File Type Specific Options arrow->Embed Media arrow-> select Embed Media This will keep associations with the texture maps you already saved in your assets folder if you have any.
An FBX model was saved.

Any animated items should be separate Maya files. It will be easier to manage
You may need to bake certain animations that don't translate, such as some deformers and Ncloth, etc. IK rigging and blend shapes should translate

Save a spare copy of your Maya model in another folder away from your Unity project.

In Unity:
Click on the word Assets in the Project tab
Select each Maya file, select the Model section, change the Scale Factor in the Inspector tab to 20.
Drag each Maya file from the Assets list in the Projects tab into the Hierarchy tab.

Collisions
Add collisions to objects, floor or walls.

Select an object.
Select Component->Physics->  Capsule, Sphere or Box Collider depending on the shape of the object.

Edit the collider shape in the Inspector, choose the Edit Collider button, move the green outlines of the collider shape. (You may need to select the object from the top of its hierarchy.)

If your shape is complex you can add multiple collider shapes to one object.
Make sure Edit Collider mode is off. Select the collider in the inspector, right mouse key Copy Component and Paste Componet as New

(If you like make a prefab. Once you set up a shape with all its colliders, you can drag it from the hierarchy into the Prefabs. This will keep the collisions, it will be available to add to the scene as a copy with collisions already set up.)


Physics
Add a rigidbody to your models to make them move with gravity or collisions.

Select your object in the hierarchy, choose Component->Physics->RigidBody

Try experimenting with the settings of the rigid body on your object, especially gravity, drag, and constraints in the inspector.


Start the Steam program from Desktop:
Select the VR button

In Unity: hit the Play button   unity_play_arrow

Answer
Accept All in the Steam VR plugin
popup window

Turn on the hand held controllers, put on the headset


If the Vive VR is not working:
Make sure everything is connected
Make sure the hand held controllers have charged batteries
Use the Steam VR utility to recalibrate the size of the active area if necessary
Make sure the scale of your model is a similar size to the active area in the SteamVR plugin.


Play Animation from Maya
In Unity:
Select your Maya animated object from the Hierarchy window.

Select Assets in the Project tab

Select your animated object, click the small arrow to open the contents unity_asset_arrow

Select the same object in the Hierarchy window to display its options in the Inspector.

Drag the Take 001 icon over to the Inspector Tab on the right place it on top of Collision Animation
unity_take001



Fix your Texture Maps that come from Maya
Select the texture from the Assets window.
Change Texture Type in the Inspector on the right to Texture.
Change Wrap Mode to Repeat.


Add a different environment
Select the Camera (eye) from the Hierarchy.
Open the arrow and select Camera (eye) from under the CameraRig->Camera (head).
Under Camera in the Inspector, choose Clear Flags Solid Color.
Select a new background color.

or

Select Window->Asset Store.
Filters
FREE ONLY

Type in Skybox in the ubiquitous search at the top
Hit the Magnifying glass icon.

Select the file you prefer

Select the Download button
Select Import
You can turn off everything except the Skyboxes if you prefer
Click the Import button
Open Window->Lighting
Click the small dot next to Skybox  unity_dot
Select your skybox


Screen Capture Your Project Windows 10, Game Bar, Xbox App
Windows 10, Win Key + G to open, WIN Key + Alt to record


Screen Capture Your Project with OBS Studio
http://obsproject.com 

Windo