Maya To Unity3D

17
Maya to Unity3D

description

Slides from a presentation I gave on leveraging 3D content for multiple platforms, including mobile games (via Unity3D).

Transcript of Maya To Unity3D

Page 1: Maya To Unity3D

Maya to Unity3D

Page 2: Maya To Unity3D

Welcome!

This section is on the Maya to Unity3D pipeline

Goals:

• Outline the critical steps involved

• Optimize and leverage art for the metaverse and beyond!

• Provide community and support

Page 3: Maya To Unity3D

• Download the FBX plug-in from Autodesk

• Use ‘Y Up’ (the default in both Maya & Unity3D)

• Work in meters:

Maya>Preferences>Settings

Working Units, Linear=meter

To get started:

Page 4: Maya To Unity3D

Working Units = meters

Maya Preferences dialog

Page 5: Maya To Unity3D

Test the Pipeline EarlyHere is a handy tip to ensure scale is right, from the start:• Create a simple 1 x 1 x 1 cube in Maya• Export the cube and bring into Unity3D• You should have a 1 x 1 x 1 cube in Unity

Add a Human Proxy• Create a simple cube in Maya to represent a human form• This is useful for making furniture, rooms and other content the

right scale• A simple 1.8 meter cube is roughly equivalent to 6 feet

Page 6: Maya To Unity3D

Modeling

• Use polygons• Convert existing NURBS to polygons• To create smooth surfaces, use NURBS and

convert to polygons• Modify > Convert > NURBS to Polygons

Page 7: Maya To Unity3D

Materials and Lights

• Add textures and materials as usual• UV map objects• Create UVs > Automatic Mapping• Render with mentalRay• Limit UV sets to 2• Lighting / Shading > Batch Bake (Options Box)

Page 8: Maya To Unity3D

Automatic UV mapping

Red arrows show changes from defaults:• Shell stacking• Create new UV set• UV set name

Polygon Automatic Mapping Options dialog

Page 9: Maya To Unity3D

Lighting/Shading > Batch Bake

Arrows are changes from defaults:• Bake shadows• Keep original shading network• Use bake set override• Color mode• Prefix• Bake to one map• Override mesh UV set assignments• UV set name

Mental Ray Baking Options dialog

Page 10: Maya To Unity3D

Cleanup and Prepare for Export

These are generally considered “best practices”:

• Save (prior to deleting history, etc.)• Modify > Center Pivot• Mesh > Combine (polygon menu set)• Modify > Freeze Transformations• Modify > Reset Transformations• Edit > Delete All by Type > History• File > Optimize Scene Size• Use meaningful names for materials and geometry

Page 11: Maya To Unity3D

Export

• Export using FBX, .ma, or .mb

• If Unity3D is installed on a different machine, export .fbx

• If Unity3D is installed on a machine with Maya, use .fbx, .ma, or .mb

• Unity3D automatically triangulates geometry

(so no need to have the exporter do it too)

Page 12: Maya To Unity3D

FBX Exporter 2006.11 for Maya dialog

The FBX Exporter

Page 13: Maya To Unity3D

Quads will automatically be converted to triangles by Unity3D

Page 14: Maya To Unity3D

Quads will automatically be converted to triangles by Unity3D

Page 15: Maya To Unity3D

In Unity3D

• Drag and drop Maya files into the Unity3D project assets folder (both object file and texture UV)

• Drag new asset from the Project list into the Scene

• If asset doesn’t show up, check the inspector:- Set scale to 1,1,1 if needed- Select asset in Hierarchy list and hit ‘F’ to frame it in Scene view

• To add texture:- Select asset in Hierarchy view- In Inspector, hit “Select” on swatch for Main Color/Base (RGB)- Select the texture UV created in Maya

Page 16: Maya To Unity3D

Adjust Scale in Inspector as needed

Page 17: Maya To Unity3D

Assign Texture created in Maya