Search Unity

Motion Controller

Discussion in 'Assets and Asset Store' started by Tryz, Feb 21, 2014.

  1. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Blender is actually fairly good, I use it sometimes, but very rare since I own Modo, Maya, Max, but the interface is annoyong is my opinion, but even though I own all of these tools, I have a guy on my team who loves Blender and we allow him to use it and loves it.... and swears by it.
     
  2. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,682
    FWIW, UMA is based on models rigged in Blender.
     
    kurotatsu likes this.
  3. devstudent14

    devstudent14

    Joined:
    Feb 18, 2014
    Posts:
    133
    @recon0303 and @hopeful yeah I could get Blender to work with general animaitons in Unity and a crappy custom controller that Imade, and Blender is awesome for retopologising and other stuff.

    I just haven't found a way to make a Blender export work with both Mount Points and Motion Controller. Maybe you have and, if so, I'd be really interested in knowing how you did it step-by-step. Otherwise, I have to use Max. No choice :( It was so wonderfully easy with a Max export, and that's coming from someone with +2 years Blender experience and practically no Max experience.
     
    Tryz likes this.
  4. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I use Maya and found it's pretty easy too. I looked at Blender once, but got scared. :)
     
    Last edited: Nov 19, 2016
    TeagansDad and devstudent14 like this.
  5. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Updates Ahead!

    I just pushed out a bunch of updates. Some are minor, but two are pretty cool:

    1. Transform Following



    The AC now has an option on the "Advanced" view to "Use Transform" and "Rotation". When checked, the AC will ignore movement requests from drivers (like the MC). Instead, it will simply move and rotate as the GameObject's transform moves and rotates.

    When this happens, the MC will turn the movement into pseudo input. This means motions and animations will run as if someone were controlling the characters. This is great for NPCs.

    You can now let AI assets move your characters and you don't need any special AC/MC code. Just let the AI asset move the character's transform and the MC will take care of activating the movement motions.

    Of course, you'll still want to use the "Activate Motion" actions to jump and trigger other motions.


    2. Send Message

    The MC now has a SendMessage(IMessage) function. You can call this function directly or use the Event - System Dispatcher to send messages to the MC.

    In doing the Sword & Shield work, I found this was a great way to activate and control motions.

    When the MC gets the IMessage interface, it will pass it to all enabled motions. Each motion will then ignore the message or react based on how it's coded. This is a great way to let motions manage themselves based on actions you give them. You'll see more of this when I release the Sword & Shield pack.


    In both cases, I'll be updating the documentation soon.
     
  6. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    That's hella kewl, mang.

    I'll be trying it in my new AI.
     
    TeagansDad and Tryz like this.
  7. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    WIP ____ Ranged weapons with Motion Controller ... I am using full Ootii's stack : Motion Controller, Bone Controller, Mount Point and Camera Controller .... AIM is IK driven ....
    Idle works .. not let's try walk and run

    shooting.PNG shooting2.PNG
     
    Last edited: Nov 19, 2016
    Tryz, kurotatsu and TeagansDad like this.
  8. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    By the way.... landscape in fully procedural created in run time ....:)
     
    hopeful, TeagansDad and Tryz like this.
  9. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    AWESOME!
     
    antoripa likes this.
  10. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Just having the opportunity to use the right assets ....yours :)
     
    Tryz, kurotatsu and TeagansDad like this.
  11. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Tryz Hi it's been a while since I talked with you last about VR, you had wrote on the asset store of my review under "quick and easy" that you're working with it and interested in supporting it. If you haven't experimented/integrated yet I may have found one easy solution and that is to add a simple controller switch/toggle (when Vive hands or feet touch invisible game object/button that the controller switches from Vive to animation with IK from the position where the hands/feet touched the game object button. Your second last message "Updates ahead" would this allow VR head tracking ignorning movement requests from your controller?

    Also..

    I was thinking of a needed solution for a motion controller system that if we add game objects as targets for a motion to connect to.. such as a game object designated & attached to steps or a ledge on a aircraft/vehicle another for a handle to open a door and a game object designated for a seat to direct the controller to sit and two more for foot pedals that controller directs the footsteps. I would see the need to change the motion order but overall in end the character just follows/connects to the game objects for sophisticated custom realtime animation. Do you have something like this already?
     
    Last edited: Nov 19, 2016
  12. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Look into Modo, its about 12 dollars a month if you can't afford Max or Maya.. Modo Indie works very well. for animations ,skinning, I would use Maya LT, which is 30 a month on Steam, only should need for a month or two..

    Blender, I rarely use, anymore these days, I do from time to time, for certain things, but very rare. i hate the interface with a passion. Modo retopologising, its amazing. I like it way better than any other, including Zbrush and TypoGun.



    This is even the old version.
     
    Tryz, devstudent14 and TeagansDad like this.
  13. devstudent14

    devstudent14

    Joined:
    Feb 18, 2014
    Posts:
    133
    @recon0303 those retopology tools look amazing! There is a paid addon for Blender that improves the retopology tools, but even that addon doesn't have the ability snap multiple vertices to a surface at once. I've wanted that for a while! Thanks for the headsup :)
     
  14. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Naughty Dog and many others use Modo for stuff like this. Since some of there tools are better than Max, Maya for modeling and Retyop in my opinion, I been doing 3d, animations for a long time.
     
    Last edited: Nov 19, 2016
    devstudent14 likes this.
  15. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Hey Ascensi,

    Yeah, I was hoping to get a Vive and never actually scraped the money together to do it. :(

    I'm not fully understanding what you're saying about touching an invisible object. Can you explain that more? Is it about letting the Vive control character/player movement?

    Dahhh... pressed 'post' too early.

    For this, I think the SendMessage() functionality I added would be super helpful. Let's say we're talking about getting on a motorcycle.

    When the character is in the right position next to the bike, you could force the motion to activate using MotionController.ActivateMotion() or you could use SendMessage(). What's nice about send message is that each motion will look at the message and determine if it needs to do something. If so, it can force itself to activate.

    So, you could have a "Get On Vehicle" message. Then all the motions that care about "getting on a vehicle" can test themselves and the preferred one could activate. One message could handle motorcyles, cars, horses, etc.

    In the motion itself, it would care about any foot placements.

    I hope that makes sense.
     
    Last edited: Nov 19, 2016
    recon0303 and kurotatsu like this.
  16. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    @Tryz really nice latest update ...UI is great with the new button .. I even took a look to Combatant new script ...
     
    Tryz likes this.
  17. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    hahaha... I'm sneaking out some code in prepping for Sword & Shield.
     
    antoripa likes this.
  18. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I knew that :) :) enjoy Sunday ... here is more Snowday :)
     
    kurotatsu likes this.
  19. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Ditto, good day to be inside working on unity.lol
     
  20. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Do you have a price yet for Sword and Shield?
     
    antoripa likes this.
  21. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Tim, have you checked out For Honor yet??? It's not out yet, but in Alpha and I think shows some very good, stuff for sword and shield, Dodge..Maybe even something your looking for for Dodge.

    The Dodge is not 100% what you are after by what your asking for, but seems close. with some aspects.

    Check it out, some are in this video, some are in others check out others.

     
    siblingrivalry and antoripa like this.
  22. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I have been following For Honor since the first announce ... I look forward to play with it ...it should be first quarter 2017 ...
     
    kurotatsu and recon0303 like this.
  23. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Yes it's about letting the Vive take over.. and an optional switch from Vive to animation and back.
    The invisible object = just a trigger/button that toggles specific animation from the point of the hands touching a physical button/trigger. and then other game objects to be used as to targets for the animation arms, legs etc to transition to and maybe a way to reverse that via another physical button/trigger that when someone is in VR like a door knob that the reverse animation starts as soon as the knob is turned. Anyway I was just thinking of a way to transition from your controller to Vive and back but also hoping that when Vive is in use that it bypasses or allows the Actor Controller to inherits the movements.
     
    Last edited: Nov 20, 2016
  24. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I'm thinking $22. After Unity takes their 30%, that gives me $15.

    I saw it a couple months ago and it looked interesting. I haven't followed it though.

    The video looks pretty close to what I'm trying to do. I'm not creating a full fighting game in the asset, but the foundation. This way people can create their own rules for combat. Things like hits, attributes, damage, flow, etc... will work out-of-the-box.

    As with all my assets, you can certainly use it out-of-the-box. However, I'm expecting game developers will extend it for their unique games.
     
    Last edited: Nov 21, 2016
  25. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Sounds like the new AC "Use Transform Position" will definitely help. You can toggle that on and off based on the trigger volume you mentioned. When checked, we'll basically bypass the AC use the transform values set by another asset... say the Vive.
     
    kurotatsu and TeagansDad like this.
  26. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    TeagansDad, recon0303 and antoripa like this.
  27. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Nope I know I was more of thinking some of the actions, more or less, or what your looking for in animations parts of them. I know NOT all, would take me months, and months to make all of them lol..
     
  28. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Woah, MC is on sale!!! Get it guys well worth it.. I buy everything on sale, and MC was one of few I paid full price for it, and with no regrets.. I own about 100 assets, and I bought 2 or 3 not on sale, one was MC.. My point is, its a steal with the sale.... We know how to make controllers and have many times, but to save time, we bought MC, and has saved us tons and tons of time and money..

    No regrets, buy it!!

    Edit: Store is down, so will have to wait for them to get it back up lol
     
    Last edited: Nov 21, 2016
    TeagansDad and Tryz like this.
  29. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Thanks! my aim is to use a physical button/lever rather than Volume. I'm no programmer so I'm just trying to see how I can piece it altogether with 3rd part assets like Vive Grip buttons/levers.

    The other part of this that I'm not sure if your bypass will work on or not is to allow partial animation (from the head down) so only when in VR the person can still freely look around. Either that I would have to completely replace the character with just a camera attached to the head.. once sitting down the characters legs will be animated & controlled with Vive input.
     
  30. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    You know you've bought too much stuff from the asset store when you see ten fantastic assets on sale and then realize you already own all of them.
     
  31. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    The MC doesn't typically have the camera tied to a bone.

    With VR, I'm not sure how that works with animations.

    I don't actually think you want the camera tied to the head bone. The reason is that you can't really keep the head bone from moving if the neck moves, and the shoulders move, and the spine moves, and the hips moves, etc. They all flow together. If the camera was part of that, you'd see all sorts of wobbling as the character moved.

    I think you'd have the camera separate from the actual skeleton. It may use the head's height information to help manage that, but I think the camera is separate from all the other animation movement.

    I'm not really sure how that works if the character bends forward to pick something up off the ground. Does the animation force the camera forward and down?

    I don't know... anyone have some insight into this? I'd have to open up Rainbow Six or Battlefield again.
     
    hopeful likes this.
  32. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    LMFAO, read my mind..

    So true, I broke down and bought Rewired.
     
  33. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I attached a fixed joint to a seat in a helicopter and attached the camera to it.. the camera view was fine when I picked up the helicopter while in VR -everything was smooth, the camera stayed with the seat while the world out the window was moving.



    I'd like the head on a character to positioned via Vive movements to negate any dizzying effect because if the camera was frozen only to a particular direction of the animation with the head as part of the animation then there would be a problem. I understand that the body parts would have to follow each other in the animation but if you can bypass the neck animation and freely tilt your head side to side, look left and right, up and down etc then I don't feel there would be a problem. If the head doesn't follow the Vive head tracking then we would see the inside of the character's face.. things would just not line up.

    About the camera being set to the tracked head height information, this is true when using the Vive Prefab but if you're just using a camera then it's a bit different .
     
    Last edited: Nov 21, 2016
  34. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    I think I follow.

    In the motions is a function OnAnimatorIK(). It basically comes from Unity's OnAnimatorIK function. That will run after the animations process. So, I would think the Vive could tap in there and control the head bone(s). This way you've got complete control.

    If you went that route, you'd have to add the code to the motions as I don't know the Vive API. I'm certainly happy to help where I can. I just can't promise anything more than that as I don't have any VR hardware to test with myself. :(
     
  35. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I'm not into VR just yet, was going to wait a few years to bother with it, but by some google searching, I seen a post, that may help in Final IK, I have Final IK, but as I said never used it for VR stuff. its on sale to so just a thought, Final IK also works great with MC.

    https://forum.unity3d.com/threads/h...amerarig-with-a-player-model-properly.401363/
     
    Ascensi and Tryz like this.
  36. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I've got final IK as well and experimented with it.. it has the camera parented to a duplicated neck bone..as a recall. I talked with the developer about this issue half a year ago about how I could somehow disable the neck/head area for animation but still allow other areas of the body to animate but he didn't have a solution. I haven't checked to see if his VR asset has evolved or not since but it may be worth checking again. I'm also setting this character up with the Virtuix Omni controller so I need to switch from that controller to Motion Controller with the Vive still working on the head/neck area until the character is seated.

    Update: Final IK now has a VRIK solver that might have a solution.


    The Vive api is free on steam, I wouldn't know what to change if I had to program something in but if the OnAnimatorIK offers a simple way to select on the character what will be controlled etc then I might be able to work it would I find this function to edit on a AC or MC component?
     
    Last edited: Nov 22, 2016
  37. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    The function is part of every motion. Think of motions like mini-MonoBehaviours. You code them to do specific things.

    Most work is done in the Update() function. However, just like a MonoBehaviour, there's other functions you can override and tap into. OnAnimatorIK() is one of them.

    If you own the MC, this new motion will give you a starting point. It just inherits the standard Idle, but shows you how you can access the OnAnimatorIK() function. In there is where you'd put whatever Vive code you need to control the head bone. I grabbed it for you. From there, I'm not sure what Vive needs.

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace com.ootii.Actors.AnimationControllers
    4. {
    5.     /// <summary>
    6.     /// Idle motion for when the character is just standing and waiting
    7.     /// </summary>
    8.     [MotionName("VR - Idle")]
    9.     [MotionDescription("Test motion for VR.")]
    10.     public class VR_Idle : Idle
    11.     {
    12.         /// <summary>
    13.         /// Default constructor
    14.         /// </summary>
    15.         public VR_Idle()
    16.             : base()
    17.         {
    18.         }
    19.  
    20.         /// <summary>
    21.         /// Controller constructor
    22.         /// </summary>
    23.         /// <param name="rController">Controller the motion belongs to</param>
    24.         public VR_Idle(MotionController rController)
    25.             : base(rController)
    26.         {
    27.         }
    28.  
    29.         /// <summary>
    30.         /// Awake is called after all objects are initialized so you can safely speak to other objects.
    31.         /// </summary>
    32.         public override void Awake()
    33.         {
    34.             base.Awake();
    35.         }
    36.  
    37.         /// <summary>
    38.         /// Callback for setting up animation IK(inverse kinematics).
    39.         /// </summary>
    40.         /// <param name="rAnimator">Mecanim animator whose IK we're processing</param>
    41.         /// <param name="rLayer">Index of the layer in the animator we're processing</param>
    42.         public override void OnAnimatorIK(Animator rAnimator, int rLayer)
    43.         {
    44.             Transform lHead = rAnimator.GetBoneTransform(HumanBodyBones.Head);
    45.         }
    46.     }
    47. }
    I hope it helps.
     
  38. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Thank you very much! I might try this with the new Final IK VR IK. If I was to add more bones to the OnAnimatorIK function would I have to add every bone in the arm & hands or will it only need the forearm bone to disable the rest of the arm & hand?
     
  39. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    It depends... (horrible answer, I know).

    Lets say you're wanting the arm and hand to reach out and grab something. In that case, you probably just need to bend the shoulder and elbow to reach the target. The hand and finger rotations caused by the animation would still be valid to grab the item. So, you don't need to overwrite the hand and finger bones.

    On the other hand, if the hand and fingers were not rotating the way you want (say you want them to match the size of the item you're grabbing), you would need to overwrite them.

    Since bone rotations in animations are additive, typically you want to modify from the top level (shoulder) down to the lowest level that matters (pinkie). But, it depends on what you're trying to achieve.
     
  40. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Hi, any update on progress with updating AI integration with Behaviour Designer? I've had your asset on my wishlist for a while and now that it's on sale it's a no brainer.
     
    Tryz likes this.
  41. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Welcome to the forums !

    its a no brainer for sure:)
     
    christougher, Tryz and TeagansDad like this.
  42. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    christougher and antoripa like this.
  43. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi @christougher
    Integration works even with Formation and Movement Add-On .. I have not done any test with Tactical add-on, but I do not see any reason to not work. There is even a small demo scene where you can see the basic actions .. I am working on a small document that I am should release on the end of month. Please feel free to post here if you need further information or support.
     
    Tryz, Ascensi and christougher like this.
  44. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I'm very interested in combining BD and MC - please send me any documentation on this process when you're ready.. I'll PM my email address.to you as well.
     
    antoripa likes this.
  45. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    yes .. just replied with my email address .... if topic can be interesting to everyone, I would suggest to post here ...for other please feel free to contact me ...have a nice day .. or night ..
     
    Tryz likes this.
  46. LunarExGames

    LunarExGames

    Joined:
    Feb 18, 2015
    Posts:
    44
    Hello. Finally found the forum - what happened to the "Sword and Shields" pack? As I was going to purchase it but now it's gone from the asset store? Was looking at this for a project.
     
  47. Tryz

    Tryz

    Joined:
    Apr 22, 2013
    Posts:
    3,402
    Welcome. :)

    It hasn't been release yet. It's out to the beta testers. I hope to submit it to the asset store next week. Then, they take about 2 weeks.
     
  48. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Welcome, you will find out here, that everyone trys to help one another on this forum even for some other assets that we use with Motion Controller as well as MC. .. One of the better forums I belong to compared to most assets. Which is a 5 star asset:) Plus Tim's support is always fairly fast, I been here around a year now.
     
    antoripa, TeagansDad and Tryz like this.
  49. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hello guys ...has some one user MC with Networking ? If yes, can share the experience ...
     
  50. Kenaz

    Kenaz

    Joined:
    Mar 4, 2015
    Posts:
    8
    Hello Tryz, I just got Motion Controller 2 or 3 days ago.
    I spend couple hours to study documents and tutorial videos, but I still have many questions:confused:

    1. Has any document, tutorials or example for explain how to use frameworks stuffs(in framework v1 folder)?

    2. I notice that releases notes wrote about basic inventory and weapon set. Also character properties. Is that a standalone feature or a extra pack's interface? How to use?

    3. About Sword and Shield Pack, Is possible that I could implement any melee weapons if I have animations?

    Thanks!