Monday, October 10, 2016

BSA228, getting it into Unity, 10 October, 2016


don't need to animate objects in Maya, but do need pivot point in right place.
hit insert button to change pivot point  and insert again to set
edit -LOD (level of detail) -generate LOD meshes

Take shine off walk cycle shoes

export for unity
set up folder for unity Assets: LevelOne and also create folders for environment (subfolder Props), characters, and scripts

fbx is best if you  have animation on an object
in Plug-in manager and load/auto load fbxmaya.mil
choose export selection and choose FBX.export file type in Maya ext 2
interface will pop up.
export selection choose smooth mesh and uncheck animation if you're moving a prop over that can be animated in unity.  Leave behind cameras and embed media
set up props as prefabs

taking character out of maya is different.  If movements are all togetherin timeline, make notes of when the movements start and end on the timeline.
export, choose fbx, takeinto unity folder, assets, characters
keep animation in and bake it with end number in timeline.
choose smooth node and embed media
name and export
avatar= skeleton.  unity will pick her apart by bits

in Unity, import character and make sure it knows in rig that it's humanoid
can split clips in Unity, if all the movements are in one long timeline in Maya, by hitting on character and going into ?  hit clamp timeline? to specify what frame to frame a particular motion is.  click add to put in more movements

If animation doesn't take to character in unity, don't worry about it.  delete character, materials, and actions and go back to Maya and re-export
If it doesn't work after 2nd or 3rd time, time to address problem in Maya.  Could be a box that needs ticking hasn't been ticked

animation controller in assets-characters-animation folder
split up movements from timeline and label clips
put motions on time loop in motion inspector and hit apply
base layer nodes, add behavior, right click make transition to link from entry to motion and motions together
any state is left unattached to a node.
test that everything is ready with characters through scripting?
with objects, simple animations can be done in unity.  keep in props folder in environment, add collider mesh collider first, create folder in assets- environment called animation
open animation and create animation controller and name it.,  choose named controller to right and look at black tiled box for nodes.  Says in right hand lower corner what's what yso you don't get confused.
make clips inside
right click empty new state rename to movement name
open animation window
select object and hit create a clip, put it in props animation.
make prefab to reuse props and it's animation if you want a field of things acting the same way
select at upper left side list and drag and drop in assets-environment- props folder.




No comments:

Post a Comment