Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unite Now - Kinematica – Democratizing Motion Matching for Character Animation

Discussion in 'Animation Previews' started by AskCarol, Apr 28, 2020.

  1. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Is it possible to blend from kinematics to the animator? Let's say the gameplay uses Kinematica and cutscenes use the Animator to do more complex animations such as interacting with other Animators (fight scene). This could even be during gameplay if the player needs to grab another character and push them or something similar, or is this something Kinematica could/will handle as well?
     
  2. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, I am not sure to understand what is bothering you here : the concatenation of short clips, or the conversion from Humanoid ? If your short clip is looping, you can tick the loop option in Unity animation importer, and Kinematica will automatically set the clip itself as pre and post boundary clips, making the process pretty straightforward.

    You are absolutely right, Kinematica shouldn't be limited to realistic and slow motion. Using fast anime-like motions shouldn't be an issue with Kinematica because :
    • I forgot to mention but the 1 second discard in the past is actually a inaccurate approximation in Kinematica, and only a few frames should be necessary (we will fix that in future versions)
    • Discarding 1 second in future is not needed for event/action matching, so sword attack animations or other actions like backflip, dodges... are not concerned by this issue and can be as short as desired.
    • Loop animations can also be of any duration because the automatic pre/post boundaries will make for the missing past frames and future 1 second
    • Trajectory extrapolation should works great with other locomotion animations (start, stops, turns)
    • Currently the future time horizon can not be lower than 1 second, but we will change that in the future to match needs for faster animations, fast anime-like motions shouldn't require 1 second future trajectory
     
    NotaNaN and florianhanke like this.
  3. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Yes, Kinematica outputs pose (and root motion) to an animation stream in a playable, that will be processed by the animator. Therefore you can mix it with any other animation playable : upper body animation for weapon for instance, or a cutscene. Few examples mixing animations with playables https://docs.unity3d.com/Manual/Playables-Examples.html

    It's better to do the grab in Kinematica as it will use motion matching to transition seamlessly to the grab animation
     
    Grimreaper358 and florianhanke like this.
  4. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Thanks for addressing this -- That's a great answer!
    I definitely would like to see how I can use Kinematica for my own purposes, as I do a lot of fast/near-instant animations, so I would definitely like to see how I could make Kinematica's graph automation work for fighter/action style animations. When this functionality is added, perhaps an example/tutorial could be provided to demonstrate its flexibility? -- In my own use-case, I was a bit skeptical, since Kinematica really seemed to be built with a lot of assumptions on how the end-user will use it. This would be fine -- except users like me would be left out in the cold.


    A bit of both, to be honest -- For example, if Kinematica relies on a straight 1hour clip of animation data, and I already have my clips separated into smaller clips (of which most are loops or one-shot animations intended to be used on humanoids), rather than making an entirely new resource (i.e. an _actual_ 1hour animation clip) from all the separate, nicely categorized, animations in my project, I'd rather be able to grab and append the clips I want together (concatenate) without making it a separate resource (and possibly duplicating an hour's worth of data to add to the size of my binary).

    To be fair, I haven't looked into the concatenation process yet due to time crunches, but the posts here make it seem like a long string of animation in a single, continuous, file is essentially required. And if this is the case, the 'duplication' of animation data (in terms of having to generate a large clip file from many smaller files that would still need to remain intact for humanoids to continue using them as one-shots) would cause a seemingly unnecessary spike in the filesize for my project, as those individual clips would still be necessary for other, less-complex, (humanoid) characters in the game, who each have one-shot or looping animations that use the same assets as the Kinematica clip would be needing. This means either file data duplication (which is a big no-no in game development), or some kind of json-like metadata that will let Kinematica "combine" the clips via processing, without actually duplicating the file data (or in memory.)

    I'm not trying to give you guys any grief, as I know you are aiming for a 1.0, but I am curious how this situation is being handled right now (and how it is likely to be handled in the future), as my projects nearly always have this kind of data structure for their animation, and I don't want to have to deal with yet _more_ 'loose' assets floating around my project that are only there for a technical workaround. Hopefully that makes sense?
     
  5. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789

    Sweeet! All good news here. Is this with the upcoming update or it's possible with the current version?

    Also, how would you handle the other characters' animation with Kinematica? How would it know to transition into being grabbed?
     
    awesomedata likes this.
  6. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, I had a look to the project, I reply on the public forum for other users that might encounter the same issues :

    • First of all the issue about boundary clip resetting to Idle is a bug on our side, we will fix it, but for now you can work around it by putting a single clip only inside a FBX. i.e. instead of having Bunny FBX with Idle, WalkForward, WalkBackward, you need one FBX for Idle, another for WalkForward, and another for WalkBackward. Sorry for the inconvenience !
    • You need to setup WalkForward pre and post boundaries clips with WorkForward itself to have a nice loop (and do the same for WalkBackward). There is also a little bug making speed for first frame of clips incorrect, it shouldn't be a big deal, we will also fix this bug.
    • If you look at your Walk Forward animation during debugging, you can notice that walk speed in 3.6 m/s, you must replicate this spped in Desired Speed Slow in the Biped Short script values, you can notice on the screenshot that input trajectory (green) and animation trajectory (in blue) are similar, this will allow Kinematica to stick on the Walk Forward and stop jumping every frame.

    upload_2020-8-17_10-27-45.png
    • Since (for now at least !) you only have a walk forward animation in straight direction, you should probably use root motion steering to help character rotate toward the desired direction, this will avoid big gap between desired or current trajectory and therefore will also avoid Kinematica stuttering (you can have a look at Snappy Locomotion sample for more info)
    • For the same reason, you don't have start and stop animation, so no smooth transition from idle to locomotion and vice-versa, you probably want to adjust Velocity Percentage to 0 in order to jump instantaneously from 0 to 3.6 m/s, since it matches your actual data.

    Let me know if you any other issue !
     
  7. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    396
    Thanks a lot for taking the time of answering all my questions. Sounds very interesting. I'll check the samples.
     
  8. pk1234dva

    pk1234dva

    Joined:
    May 27, 2019
    Posts:
    84
    Hey guys, great stuff.

    I've been fooling around, and while all the samples work fine, I've tried making a custom character with animations from mixamo, and it doesn't seem to work well.

    I'm using a generic avatar for the character, with root assigned as the hip bone. The clips seem to work perfectly fine with standard animator use - the transform of the game character is changed as you would expect and it uses root motion properly.

    However, when I import the clip into the kinematica asset builder I'm using on the character, and take a look at the preview, it's moving all weird, wiggling around, and the path doesn't even stay horizontal (it goes up into air a bit, doesn't stay on XZ plane).

    After some experimenting, when I use "Root motion node: <Root transform>" in the clip import settings, everything looks fine when I play the preview of the clip inside the kinematica asset builder, but there is not actual green path displayed, and it's only the hip bone that's really moving in space - the game object stays still. Root motion node none gives the faulty behavior I've explained above. Root motion node Hips works ok, but the path is displayed as coming from the hips.

    I'm not very experienced with this and I'm new to root motion altogether, and I'm sure I might be missing something.
     
    giraffe1 likes this.
  9. haoxiner

    haoxiner

    Joined:
    Mar 13, 2018
    Posts:
    6
    Hello, is there any interface to set playback speed?
     
  10. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Absolutely, we will add documentation for all those features. Regarding the pre/post boundaries, it's just an option to set in the clip in the builder asset window, it doesn't create other assets
     
    awesomedata likes this.
  11. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    It will be possible in the upcoming update coming in a few weeks, that will include matching events, which can be used for any contextual action (grab, push button, vault over obstacle, attack...)

    When the attacker matched an event "Grab", you can simply match a corresponding event "Grabbed" in the defender that will play the corresponding animation. We will add melee combat sample later to showcase this situation.
     
    Grimreaper358 and awesomedata like this.
  12. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, unfortunately root bone setup is extremely confusing in Unity, can you describe the hierarchy of your avatar and tell which bone is supposed to be the root ?
     
  13. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, currently no, we have plan to add it in the future, but that's not our top priority
     
  14. pk1234dva

    pk1234dva

    Joined:
    May 27, 2019
    Posts:
    84
    Thanks for the reply, honestly, I'm so confused at the moment that I don't even know. And I'm not completely sure how root motion in unity works... but here's my thoughts... it will be quite lengthy and some little questions will be interspaced in it, but I'd still appreciate if someone helped me out with it.

    //

    My game object "Character" has an animator etc. It has two children - "Mesh" which contains the skinned mesh renderer, and the other is just a transform "Hips" and is the root bone of the armature. In the generic avatar settings for the character, I've chosen the "root" as these "Hips" - I assume that this means that this hip bone is used as the root for root motion (i.e. it's movement in the animation space is used for calculating root motion). The Game object "character" lies on the "floor", and the hips are displaced up into the Y axis a little bit - around ~1.05.

    When just playing this animation on a normal animator with "apply root motion", everything works fine. So I'd assume that my setup of the avatar is alright.

    But when this same animation is imported into the kinematica asset builder and I preview it, the path is noticeably going down into the ground a bit, then up again, etc, and the character wobbles all around left and round. The green preview path is relatively on the ground though, which I think is desireable.

    1, First weird thing / side question - what does the "root motion node - <None>" setting actually mean? I'd assume the result would be no root motion... but when using this setting on a generic avatar animation, root motion works fine. So what does this setting do? Does "<None>" in this context maybe more mean like "don't use custom root transform" ?
     
  15. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello,
    That's very likely a bug in preview mode (character going into the sky and into the ground) that I just found and will fix in next version (I sincerely apologize for the inconvenience), it's very likely you character is properly setup if you see an expanded green path at your character location.

    And that is why I say it's extremely confusing :) Because there are 2 concepts :
    • There is the Root node you can setup in the Rig panel of your import settings
      upload_2020-8-20_8-46-44.png
    • And there is also the root Motion node you can setup in the Animation panel of your import settings (the one you mentioned)
      upload_2020-8-20_8-47-35.png

    The root node specifies which node is the root of the body, i.e. the visible part of your rig, the average location of your character in the animation. So in your case (and most cases), Hips node (implicitly projected to the ground by Unity) is a perfect candidate. Note that intuitively this is often the first node of the hierarchy, but not always (sometimes there are intermediate nodes between the root and the hips) this is why Unity give you the option to tell them which node it is.

    In some of cases, for an animation containing motion like a move forward animation, motion will be naturally carried by the root node itself (i.e. the position of the hips will just move forward in the animation). BUT, in some specific cases, you might want to embed motion in a different node. For example if your hips is doing a lot of small jerky movements, AND you would rather have a smooth root motion (which gives much better result in Kinematica :)), animator will usually animate another external node to the body hierarchy representing the root motion. This node is the root motion node you edit in animation panel of import settings

    The rule of thumb for editing those options is :
    Is the node carrying motion a parent of Hips or Hips themselves ? (which means Hips will move along this node)
    • Yes, this node should be set as the root node and no motion node should be set.
    • No, this node should be set as motion node and Hips should be set as root node
     
    Last edited: Aug 20, 2020
    FlavioIT and florianhanke like this.
  16. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Yep -- this is confusing.

    This is why I keep saying UI should not be "phoned in" -- it greatly affects the UX.

    Time definitely needs to be devoted to figuring out how to properly convey these ideas in the UI itself.
    Unity is notorious for a lack of documentation, so why not just visually indicate (in some fashion) the distinction we need to understand? -- i.e. by automatically setting "hips" to the proper value in the majority of cases, but display a little "caution" icon you can hover over that explains this distinction in-summary via a tooltip or popup? -- (i.e. "click or hover here if your animation looks wrong" should be visually implied.)

    Just my two-cents.
     
    Egad_McDad and NotaNaN like this.
  17. pk1234dva

    pk1234dva

    Joined:
    May 27, 2019
    Posts:
    84
    Thank you for your indepth reply.

    Yes, I thought that's what the motion node does - what's confusing to me is that the default setting is "none". It would be a bit clearer to me to say the default the default setting is "root node" or something like that. It's just semantics though I guess - it only matters whether you consider the motion node to be something that is optionally used, that allows you to override the default root node as far as root motion goes (in which case "none" makes sense) or whether you assume it's always used (in which case it would make sense to just set the motion node to a default of "use root node").

    Also, I wasn't aware that the root node is implicitly projected in general, I thought that was only the case with humanoid avatars. Just to maybe get a bit better understanding of how the root motion actually works, I'd appreciate any corrections on the following:

    You start with an animation. This animation has some sort of root transform inside the animation space, generally something like the hips, projected down or something. When you're now using root motion for a character, each frame unity checks the offset of this root transform inside the animation space, applies this transform offset to the actual game object, and then "removes" this offset from the animation space (otherwise we would end up applying it twice in your actual in-scene representation), and the other transform settings of the body/pose (children of the root node basically) are then applied.

    Few things I'm not sure about:

    1,how exactly is the "offset" in the animation space calculated and applied? It would make sense that it's done in a pretty "local" way - i.e. if in the animation space you have two keyframes of the root transform position and orientation, let's call them A and B, where B is same as A but displaced in A's forward direction, you would just modify the in-scene character game object by displacing it in it's forward direction. Similar with rotations - it again is done sort of "locally".

    2, you mention that the root is generally projected onto the ground. If this is the case, how is any root motion in the y axis even possible? If the root transform stays at the same level through the animation, how could there be any movement up/down? Generally that's undesirable, but surely for jumping etc. it often makes sense - so is there some way to turn that off?
     
  18. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Yes you're right, unfortunately all that stuff is old legacy Unity code, we can't really change it and have to live with those little imperfections. However that's something that will definitively be improved in DOTs animation
     
    awesomedata likes this.
  19. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Yes I understand, I don't know all the reasoning behind the design but maybe the reason to have "none" by default is to avoid generating unnecessary motion curve. Because if you set root AND motion to the same node, it will generate 2 curves :
    upload_2020-8-20_10-56-15.png
    Maybe it's cleaner to not generate motion curve by default.

    Also, if you set motion node to "none", you have more options in the root node process :
    upload_2020-8-20_11-1-26.png
    Probably because if you set the motion node, then it's assumed that this node is already processed. It's hard to know since lot of design decisions had to be made over the year in order to support all client demands and those confusions were kind of unavoidable.

    But anyway it's legacy code that can hardly be changed as of today.

    Yes it is exactly what happen

    If you want to see the code, you can look at PoseSamplePostProcess class in Kinematica, it replicates all those computation from Unity engine. In you example, let assume Hips is the root joint, here is some pseudo-code of animation from frame A to B

    Code (CSharp):
    1.  
    2. Vector3 rootPosA = ProjectOnGround(A.Hips.Position);
    3. Vector3 rootPosB = ProjectOnGround(B.Hips.Position);
    4. gameObject.transform.position += rootPosB - rootPosA; // apply root motion
    5. gameObject.GetChild("Hips").transform.localPosition = B.Hips.Position - rootPosB; // remove offset to not apply root motion twice
    6.  
    This is exactly why motion node must be set in this case since it's not processed (not projected on the ground)
     
    FlavioIT likes this.
  20. pk1234dva

    pk1234dva

    Joined:
    May 27, 2019
    Posts:
    84
    Wonderful, all makes sense. Thanks a ton Francois!
     
  21. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    233
    Quick question. How would one go about using kinematica with combat animations ? Can we lets say set a "attack" trigger and the kinematica will motion match to a attack anim ?
     
  22. AndrewKaninchen

    AndrewKaninchen

    Joined:
    Oct 30, 2016
    Posts:
    149
    Pretty much exactly that.
     
    florianhanke likes this.
  23. Deleted User

    Deleted User

    Guest

    I see Kinematic uses the Unity Licence, I wonder if Unity User can publish a game or create assets for the Asset Store with these Animations of the Demos from Kinematica included?
     
  24. haoxiner

    haoxiner

    Joined:
    Mar 13, 2018
    Posts:
    6
    Hello, I found that in Binary.CodeBook.Encoding generated from an animation clip, some boundingBoxe.inverseDiagonal == infinity.
    This caused Synthesizer.MatchPose return unexpected result. Is this a bug or what should I do to prevent this?
     
  25. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, we asked legal department for an answer, I will let you know once they respond
     
    Deleted User likes this.
  26. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, is it possible to DM the clip in question by any chance ?
     
  27. haoxiner

    haoxiner

    Joined:
    Mar 13, 2018
    Posts:
    6
    here is the clip:

    https://www.dropbox.com/s/zfzu87vps6qxp6f/strafeidle.fbx?dl=0

    I use avatar created from this fbx, drag this clip to Kinematica, create a metric, then select L_foot_skin and R_foot_skin joints. When building, I found numValidDimensions in Builder.BoundingBox.cs is zero, causing the inverseDiagonal = infinity
     
  28. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Thank you for the animation, however I would need the rig as well (since there is no avatar inside the FBX) would you mind uploading the rig as well please ?
     
  29. haoxiner

    haoxiner

    Joined:
    Mar 13, 2018
    Posts:
    6
    Sure, the Model, Clip and kinematica asset wtih their .meta files are included in the Sample.zip.
     
  30. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Legal department is currently reworking the Unity Companion Licence so this will likely change to make things clearer. The intent is for the assets to be free to use in Unity projects, but until the licence is updated, user should refrain from using them in projects they wish to ship
     
    Deleted User likes this.
  31. Rom-

    Rom-

    Joined:
    Nov 26, 2008
    Posts:
    85
    How would one go about making Kinematica multiplayer ready? Would you want to calculate everyone's animation state on each client, to alleviate network traffic? Or would you opt for transmitting animation states over the network, to alleviate cpu usage? What about some sort of hybrid approach that sent high level animation states over the network, but detail states (like running into walls, etc.) was calculated locally?
     
    florianhanke likes this.
  32. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Thank you very much, I got the project and got the same error as you (inverseDiagonal infinite). I fixed it, the fix will be available next release. Meanwhile you can fix it locally by replacing line 149 of
    Editor/MotionLibraryBuilder/Builder.BoundingBox.cs


    Code (CSharp):
    1. var inverseDiagonal =
    2.                     math.rcp(2.0f * math.sqrt(numValidDimensions));
    by

    Code (CSharp):
    1. float inverseDiagonal = numValidDimensions > 0 ? math.rcp(2.0f * math.sqrt(numValidDimensions)) : 0;
    This will set all features to 0, which means they won't impact motion matching query in any way. In my fix I also added a warning because this is a degenerate case that should be avoided by user (because that means a joint in the metric is not used at all)
     
  33. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, whether you use animation graph or motion matching, replicating the entire animation state will always result in poor quality (because it copes very bad with lag and low data update frequency, not mentioning network usage) that will never be worth the trade against the CPU cost of resimulating animation pass (graph or motin matching) for each replica on every client.

    The best is always to replicate the highest-level information possible, and motion matching is much more efficient in that regard because it is structurally much simpler than an animgraph. We need to investigate more Kinematica & network, but as an idea : for locomotion, I would simply replicate character transform (rotation/position) and target direction (for player) or target position (for AI) and run Kinematica for each replica with that information. Event (running, fighting...) would be even simpler, you would only need to replicate the start transform & pose of the event, the whole event sequence being deterministic.
     
    florianhanke likes this.
  34. haoxiner

    haoxiner

    Joined:
    Mar 13, 2018
    Posts:
    6
    Thank you very much. What does 'a joint in the metric is not used at all' mean?

    In my case, when a character finishes an attack, I want to use motion matching to find the closest idle pose from some idle clips. But if I set inverseDiagonal = 0 when there is an error (inverseDiagonal infinite), the result will not be what I expect.
     
  35. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    In the Kinematica asset you just shared, there is only an idle clip, in which the feet stays at the same location during the entire clip. That means each pose from your motion library has the exact same feet locations.

    However, motion matching discriminates each pose from the library by their feet locations (more generally the joint transforms setup in the metric) in order to pick the best match in a given situation. Then, what's the point of comparing feet positions of every pose in your library (with the current character feet positions) if all poses have the same feet positions ?

    In that case, motion matching won't be able to pick a true best match since all candidates are the same. This is why Kinematica should send a warning in that case.

    Of course as soon as you will add more clips with different feet locations, this will change.
     
  36. gladman

    gladman

    Joined:
    Aug 12, 2020
    Posts:
    1
    Hello
    I got this when I tried to start Hello World sample:

    --------

    A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
    Unity.Collections.NativeArray`1:.ctor(Int32, Allocator, NativeArrayOptions) (at /Users/builduser/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:57)
    Unity.Collections.NativeList`1:ToArray(Allocator) (at Library/PackageCache/com.unity.collections@0.9.0-preview.6/Unity.Collections/NativeList.cs:567)
    Unity.Kinematica.PoseSet:Create(QueryResult, Allocator) (at Library/PackageCache/com.unity.kinematica@0.8.0-preview/Runtime/Data/PoseSet.cs:31)
    Unity.Kinematica.PoseSet:eek:p_Implicit(QueryResult) (at Library/PackageCache/com.unity.kinematica@0.8.0-preview/Runtime/Data/PoseSet.cs:50)
    Unity.Kinematica.QueryTraitExpression:eek:p_Implicit(QueryTraitExpression) (at Library/PackageCache/com.unity.kinematica@0.8.0-preview/Runtime/QueryLanguage/QueryTraitExpression.cs:72)
    HelloWorld.HelloWorld:Update() (at Assets/Samples/Kinematica/0.8.0-preview/Hello World/HelloWorld.cs:23)

    --------

    Unity ver. 2020.1.0f1
    Kinematica 0.8.0
    Jobs 0.2.10-preview.13
     
  37. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    This is the last post I've seen mentioning using this new animation system with DOTS & ECS. Has there been any progress or samples of it working the new way since this reply from late May?
     
    Orimay and awesomedata like this.
  38. diggerjohn

    diggerjohn

    Joined:
    Apr 28, 2009
    Posts:
    60
    Hi, this looks great and I am just getting started.
    Can you point me to a discussion of the steps and requirements of a new custom character and rig.
    Also any discussion of getting this new rig to work with Kinematica.
    I have gone through the documentation and I seem to be missing these points in there.
    Perhaps there is another source I don't know about.
    I have been trying a number of different things but so far no luck.
    Thank you.
     
  39. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, sorry for the delay, this is a memory leak fixed in 0.9, this should alter the behavior of the program in anyway, so you don't need to worry about it
     
  40. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, we didn't start working on porting Kinematica to DOTs yet, last months we were focus on core features, debugging workflow and bug fix
     
    alexchesser likes this.
  41. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello, there is a documentation to create a Kinematica program from scratch in the HelloWorld sample (Readme.md file). Kinematica supports any kind of rig, there is no particular requirement, you just need to define the joints that should be used for motion matching in your Kinematica asset file. For example the Project Demo https://github.com/Unity-Technologies/Kinematica_Demo is using Kinematica on a quadruped.
     
  42. diggerjohn

    diggerjohn

    Joined:
    Apr 28, 2009
    Posts:
    60
    I have downloaded Kinematica_Demo_0.8.0-preview.zip but I find no Samples dir. The only Scene file I find is Biped. I checked README.md as suggested and that is just a word doc pointing to the git download.
    How can I find the Hello World sample?
     
  43. diggerjohn

    diggerjohn

    Joined:
    Apr 28, 2009
    Posts:
    60
  44. diggerjohn

    diggerjohn

    Joined:
    Apr 28, 2009
    Posts:
    60
    Moving forward a little.
    As you can see in the attached image I have my character loaded successfully.
    I found that I had to change the names of the bones to what they are in the Biped character to get the animations to play with it. But obviously the normal's and something else are all wacked out.
    The export from 3DSMax was fine as you can see in the companion character.
    But once Kinematica is associated with the character the bones get all deformed.

    Any suggestions on this would be very very helpful.
    Thank you.
     

    Attached Files:

    Last edited: Oct 28, 2020
  45. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Hello @diggerjohn, I apologize for the delay.

    Concerning the samples, you can import Kinematica samples from the Package Manager (menu Window -> Package Manager)
    upload_2020-11-4_8-23-52.png


    Concerning your character, it seems it's not skinned the same way that the Kinematica sample character (meaning the vertices of your character mesh are not bound to the same bones that Kinematica sample character). You can check it this way :

    • Drag and drop your character in the scene
    • Create in your project a new animation controller that plays Circle_Animation from Kinematica package for instance :
      upload_2020-11-4_8-43-28.png
    • Drag and drop the created animation controller in the Animator component (in the Controller property) of your character in the scene
      upload_2020-11-4_8-46-1.png
    • Play
      upload_2020-11-4_8-46-54.png
      If your character is still broken, that means indeed the skinning is wrong and the issue is not related to Kinematica
     
  46. diggerjohn

    diggerjohn

    Joined:
    Apr 28, 2009
    Posts:
    60
    Yes, I understand this.
    I have tested Skin application in 3DS Max and Mixamo and there is clearly a problem.
    I figured out the solution for easy testing just as you provided.
    Can you PLEASE tell me how or at least in what tool you are skinning your characters?
    Kinematica is the only environment in which I have ever had this problem.
    Thank you.
     
    Last edited: Nov 4, 2020
  47. FrancoisFournel

    FrancoisFournel

    Unity Technologies

    Joined:
    Feb 12, 2020
    Posts:
    66
    Sorry for the confusion, I just talked to an animator at Unity and it actually there is no trivial way to retarget Kinematica animations to another character (this will be possible with DOTs in the future), renaming joint names won't be enough. Sorry for the inconvenience !
     
  48. diggerjohn

    diggerjohn

    Joined:
    Apr 28, 2009
    Posts:
    60
    Understood.
    Yes, this is a huge problem for us in using Kinematica.
    I have invested a great deal of time into this already.
    Can you possibly provide that Unity Animator contact so I can get a description of the process
    they are using, no matter how extensive, to retarget Kinematica animations to another character?
    Or perhaps provide my contact info to them so they could contact me about it?
    Thank you.
     
  49. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    The best way I know right now is to use a DCC app and retarget your animations there. Basically, all of them have the ability to retarget animations (because of motion capture so it's the same process) then you export the animation as if it was made for that rig (same usual exporting).

    There's also an app on the Unity asset store that seems to be able to retarget humanoid animations to a generic rig so maybe that would also work.
     
  50. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Hopefully you don't have a LOT of animations and a LOT of variations, as this will definitely increase your build size due to the massive number of mostly-duplicate animations. D: