Polygonal Mind
  • Home
  • SERVICES
  • Projects
  • Decentraland
  • Blog
  • Assets
  • / CryptoAvatars

Blog

Animations in Decentraland

3/16/2020

0 Comments

 
ESPAÑOL
The Mission

In the process of working with decentraland we found out that animation is one of the most complex things to do.
In this guide I'm going to explain two methods that we learned in order to create simple animations and put them in your land.
Resources

  • Unity 2018.3.6f1
  • Decentraland SDK
  • Plugin decentraland for unity
  • your prefered 3D software
Pig piggy decentraland momus park
Bones and Rigging

The good thing about this method, it's that you can do it and don't pass for Unity to put it in Decentraland. However, Unity allows you to check how the model will look in Decentraland, more or less.
In this you rigg your models in your prefered 3D software, and export it, if you decide not to use Unity, you can export the GLTF format using Blender or babylon plugin for Maya.
https://doc.babylonjs.com/resources/maya_to_gltf
If you export it from Unity, there's a few more steps to follow if you want it to work perfectly:

1. Export you model in .FBX format with the selected keyframes you want export the model with. The recomendable thing is to export all the animations separated (iddle, running...) and them import them into Unity.
2. If it's imported correctly it will appear like the image bellow on the inspector.
import animation unity inspector
3. ​Now we will create an animator, this is what will control that the animation works correctly, it can be configured in several ways and program different clips on one mesh, but in this case we are just going to set one. For that we drag the clip into the animator window.
Unity animator
4. ​Finally, we put the model into the scene and on the parent, then we add the animator we just created and a skinned mesh renderer with the model or one of the parts of the mesh. Everything else has to be a son of this object to work.
mesh animation unity
Ending Result
Lynx animation Unity Decentraland
Lynx in Decentraland 
Animate on Unity

The method explained before, I believe it works very well when we want to animate complex models or organic ones to create NPC's or Wild life.
However for simpler objects I prefer to animate them in Unity, with the help of the animation window.

To do that we have to follow these steps:

1. ​Divide de model in how many parts you want them, and organize them acordingly (parent, sons...).
Unity parent son grandson
2. ​Set the model in Unity and click on the animation tab with the parent selected, to create an animator and a clip.
Unity animator and clip
3. ​Once created we can add keys to create the animation, by clicking the red button you activate the recording button and every transform you make to the object will be recorded.

​In this example we added the properties of position of the parent; rotation for the son and scale for grandson. To add a propertie right click on the property and select add key. Later I'm going to remove the key from the parent because if I left it that would completely break the animation and move it to other places in the scene.
Unity cylinder cube sphere animation
4. ​Animate your objects, with this method you can't animate textures, only the position, rotation and scale.
Animate position rotation scale
5. ​You can control the flow of the animation with the curves, if you want to make constant select the points, right click and set both tangents in linear.
unity animation curve
6. ​Then click the export button and it should appear correctly, like I said I removed the animation from the parent to avoid problems when you upload it to Decentraland.
Simple animation in decentraland tutorial
Precautions and Warnings

  • If you are animating a prefab, it's important to do it in the coordinate (0,0,0), because If not the object may move out of its place.
  • Don't animate the parent it will break the animation and move it to other places. even if you don't animate any property
Unity animation decentraland
without animating the parent
error glitch decentraland animation
animating the parent
  • Don't put the animator in entitites (the plugin indicates if it's one), the animation won't work in your scene.
  • If you want to fix the one stated above, add a mesh filter and a mesh renderer, that way it becomes a GTLF. You can put a model from unity (quad) and add completely transparent material to it, to make it invisible.
  • Inside a prefab, there can be a different set of parents each one of them with its animator. But a parent can't have two animators
Conclusion

Although it's quite a complex process, and can be quite frustrating when you start with it. But if you get to learn how to work with this you can create complex and beautiful animations, such as the ones of the transit system.
transit system decentraland elevator animation
elevator on the south transit (/goto -68,-117) 

Picture
Laura Usón
ARTIST
Passionate about videogames, movies and creatures. artist by day and superhero at night.
Cent
0 Comments



Leave a Reply.

    Categories

    All
    Decentraland
    Decentraland En Español
    Maya
    Metaverse
    Mixamo
    Morphite
    Substance Painter
    The Sandbox
    Totally Reliable Delivery Service
    Unity 3D
    Updates
    VRChat

    Archives

    February 2021
    January 2021
    December 2020
    October 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    December 2019
    October 2019
    September 2019
    August 2019
    June 2019
    May 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2016

    Picture
Home
Projects
Assets

Picture
Crypto
Friendly
Picture

Subscribe to get some 💚 in your inbox once in a while.

Follow us and your visit will never be forgotten!
Picture
Picture
Picture

 © 2015-2020 POLYGONAL MIND LTD. ALL RIGHTS RESERVED.
  • Home
  • SERVICES
  • Projects
  • Decentraland
  • Blog
  • Assets
  • / CryptoAvatars