Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by nielsvaes · Jun 16, 2014 at 01:07 PM · mayablendshapes

Blending Maya blendshape animations

This is my first try getting blendshapes into Unity and I've hit a wall.

I have no problems getting blendshapes to show up in Unity, I can manipulate the values between 0 and 100 and the blendshape is applied. I also don't have a problem getting animated blendshapes to play in Unity. When I make an animation in Maya I can import the mesh and the animation and have it play in Unity.

What I do have a problem with is blending between blendshapes. What I want to do is the following:

  • import a face into Unity with a neutral expression

  • make an animation in Maya using blendshapes where the character says "I am Niels"

  • make an animation in Maya using blendshapes where the character says "I'm 29 years old"

  • export those animations from Maya and import them into Unity

  • create an Animator with the animation clips "neutral", "iAmNiels" and "iAm29YearsOld"

  • create 3 booleans in the Animator: "neutral", "iAmNiels" and "iAm29YearsOld"

  • from a script, set one of the booleans to true so the accompanying animation starts playing.

The only way I can get blendshape animation to show up in Unity right now is if I export for example "I am Niels", import that specific mesh + blendshape animation and use that specific mesh to play "I am Niels". If I want to play "I am 29 years old" I have to use that specific mesh to play that specific animation.

The face with no animation has a blendshape node in Maya with several blendshapes. The animated faces have the exact same blendshape node with the exact same blendshapes. Every file, when imported in Unity, also shows all the correct blendshapes.

I was under the impression the same thing as with joint animation was possible. Where you import your character in a t-pose, import specific animations and then blend between them in the Animator.

Am I overlooking something simple or this is approach just not possible?

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Jun 16, 2014 at 01:30 PM 1
Share

I did read somewhere that you can manipulate BlendShapes via Animator, otherwise they show up in the Skinned $$anonymous$$esh Renderer, which you will need to access.

avatar image nielsvaes · Jun 17, 2014 at 06:42 AM 0
Share

Yes, like I mentioned in my post I have no problem getting the blendshapes to show up or even working.

I want to know how and if it's possible to blend between different blendshape animations in the Animator.

Do you know what and where you read something about the Animator?

avatar image Grimngor · Jul 22, 2014 at 11:56 AM 0
Share

I am also interested on this, any one has the answer? :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by carrollh · Jan 31, 2015 at 02:23 AM

Well, as long as you just want to crossfade shape animations and aren't using joint-based animations with it the following should work (I can't get them to work together no matter what I try):

In Maya:

  1. Create the Blend Shapes under the same node. (i.e. select all blendshape meshes, then the original mesh, then Create Deformers > Blend Shape Option > Advanced > Deformation Order: Front of Chain > Create)

  2. Keyframe your animations. Because of 1. you should have all of the blendshape sliders available in the same BlendShape node.

In Unity:

  1. Import your model from Maya. Use either the maya file or an fbx. Dae should also work.

  2. Create an Animation Controller. Add a boolean Blending, and a float BlendAmount to the base layer.

  3. Drag on your idle animation so it is the default animation. Right-click > New Blend Tree.

  4. Specify what keyframes your animations are set to in the inspector for the model you imported.

  5. Double click the blend tree node. Add a motion field for each animation you want to blend between. Drag each of your animations into the motion fields from the imported model.

  6. Define the blend curve for your animations based on the value of BlendAmount.

  7. Double click the background of the Animator panel to get back to the base layer. Right-click your idle animation, and create a new transition to the blend tree. Trigger the transition by setting the boolean Blending to true. Repeat to create a transition from the blend tree back to the idle state if Blending is false.

  8. Do what you want with it in code. If you leave the default blending values, BlendAmount = 0 and Blending == true will result in the first animation, and BlendAmount = 1 will be the other. Ramp it during runtime using Lerp to get a transition.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to import skeleton and blendshape animation from maya? 1 Answer

Facial animation in maya -> unity 6 Answers

blendshape multiplication- Exporting Envelope attr from Maya 1 Answer

How do you control blendShape value in javascript? 0 Answers

Do blendshape and bones work together in Maya? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges