Announcement

Collapse
No announcement yet.

[Plugin] Leap Motion - Event Driven

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by devel.bmad View Post
    Ehi getnamo!! Amazing work, your plugin is absolutely great.
    A couple of strange issues on OS X and UE 4.7.4:
    1) Standalone game / Restarting UEEditor
    - I create a new first person project. Configure the leap plugin, select blueprint -> game mode -> pawn -> select pawn class -> leap rigged character.
    - Play in editor: I see the yellow hands and can use the leap controller.
    - Save everything.
    - Restart the editor: the pawn is reverted to the default blue FP character. Why?? I cannot seem to correctly save the game mode
    - Play standalone game: I see the default blue FP character and no leap. Is this normal?
    - Package standalone: I see the default blue FP character and no leap. (no error with the plugin, everything configured following your instructions)

    2) shoulder location
    When the hand is tracked, the shoulder always moves to the middle of the chest and in front of the character (see ss). Shall I configure some parameter?
    ...
    Regarding the first issue it may be related to using a C++ character as a baseclass? If that is the case, the problem may be related to https://forums.unrealengine.com/show...l=1#post167217 to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why this error occurs, but it only occurs when the base class is derived from C++ not blueprint.

    On the second issue, that shoulder position should only occur when you have your hand full stretched out. Just tried the plugin on 4.7.6 and it seemed to behave as expected. Try to get me a video of the specific problem so I can try to replicate the issue.


    Originally posted by robhamilton View Post
    Hi getnamo,

    First, thanks so much for your great work on this plugin. It's a fantastic resource.

    Like devel.bmad I'm also seeing some strange behaviors in 4.7.4 and now 4.7.5 with your plugin, both on Windows and OS X. Currently on both platforms I'm using the Unreal source compiled via Visual Studio and XCode respectively.

    After creating a new project based on the Epic 3rd or 1st person default templates, if I follow your basic instructions (copy the Binaries and Plugins directories as is to the project root) and change the default pawn class to one of your LeapRigged ones, your yellow convenience mesh doesn't replace the standard blue Epic one. This same sequence used to work in 4.6 just fine and still does with my older 4.6 examples.

    Another telling difference in 4.7.N is that the resources for your examples no longer appear in the Content browser when I follow this setup path. If I manually copy your Blueprints, Character and Materials folder (from within your Plugins > LeapMotion > Content folder) into the project root > Content folder, then I can at least see your content in the Content browser. However this leads to double entries in the Game Mode > Player Controller Class drop down.

    Perhaps the default pathing for 4.7.N has changed, and your file structure no longer is recognized the same way?

    I'm finding that if I load up another map in either a default 1st or 3rd person Epic blueprint project (such as one of the starter content maps) THEN your plugin will override the default character.

    Any idea what's going on? It seems something has broken with either 4.7.4+ or with a compiled code base?

    Thanks!



    -------------------------------------
    Rob Hamilton
    https://ccrma.stanford.edu/~rob
    @robertkhamilton
    Some templates now have characters placed directly in the map. They need to be deleted in order for your custom game mode character to be used.

    Originally posted by kdumovic View Post
    ...

    I tried the method above also to no avail. I just keep getting a value of 0.0. Maybe the return value is supposed to be something other than a float? I've successfully gotten sphere radius from the Leap on a web app with the leap.js api and it doesn't matter how you use it, if your hand is above it it should return a value other than 0 unless your hand is closed...
    This was my error, you found a value I missed linking up, this has now been fixed in 0.9.3. Unsure of how you want to use this sphere however as it changes with the curvature of your hand and it is probably not what you're looking for in terms of collision. Try out the new 0.9.3 update for easy collision.

    Originally posted by Spittygood View Post
    So I'm pretty noobie on this stuff.... Where do I find the Leap Event Interface blueprint that would have the Event Hand Moved? ...
    Leap Event Interface used to be found under blueprint props, since 4.7 this is now called Class Settings.



    You similarly go to Interfaces and click add->LeapEventInterface. After you hit compile, all the leap events will show up after you right click the event graph and type 'leap'. If you're using the convenience content the leap controller bind is placed in the LeapAnimBodyConnector. You can add leap motion events to another blueprint safely but you will also have to add the component in addition to adding the interface in order to receive the events.



    Originally posted by Spittygood View Post
    Again, I was trying to attach a collision sphere as a component to the character mesh, but this method doesn't appear to work with this interface (I saw this method on an unreal tutorial video where the sphere is attached to move around a large physics actor sphere)
    ...
    That may be the intent for kdumovic, but I was originally trying to use the method in this video:

    https://www.youtube.com/watch?v=uOy0...9pvhE&index=79

    I don't think this works with the basic rigged character, as the hand is instanced in the C++ code. I believe that you are correct that attribute from the leap page may be the correct way to get this interaction to work, but I am clueless on how to do it. I wanted it to work like the unreal video where you could punch a physics actor sphere.
    This method does work, but with a twist. All you do is attach the collision shapes to the skeletal mesh sockets. You do this by adding them as a child of the mesh and the selecting parent socket in the details pane.

    That said using the physics asset now provided in the plugin is much easier and you can still modify the physics asset to cover the range and sizes you need for your particular mesh.

    Leave a comment:


  • replied
    Update to 0.9.3
    -Added LeapCollisionCharacter which adds physics collision enabled by
    default. This can be enabled for other setups by using the PhysicsActor
    collision preset.
    -Updated PhysicsAsset used for collision
    -Removed old content
    -Fixed SphereRadius property link found on LeapHand

    This update should make it much easier for you all to add collision based interaction. You simply select the new convenience character called LeapCollisionCharacter and hit play. Your entire body is covered by a fairly accurate PhysicsAsset which you can modify to suit your needs.



    To change other sub-classes to support this interaction, simply change your skeletal mesh preset from character mesh to physics actor.



    Hit play and you will be able to push around any movable actors with physics enabled like so



    Here's an example of me playing jenga with no code changes, but simply adding rectangular shapes to push around.



    What do you think? Useful? Let me know!

    Leave a comment:


  • replied
    Originally posted by Slayemin View Post
    Click image for larger version

Name:	leap-sphere.png
Views:	1
Size:	58.0 KB
ID:	1075791

    I tried the method above also to no avail. I just keep getting a value of 0.0. Maybe the return value is supposed to be something other than a float? I've successfully gotten sphere radius from the Leap on a web app with the leap.js api and it doesn't matter how you use it, if your hand is above it it should return a value other than 0 unless your hand is closed...

    Leave a comment:


  • replied
    That may be the intent for kdumovic, but I was originally trying to use the method in this video:

    https://www.youtube.com/watch?v=uOy0...9pvhE&index=79

    I don't think this works with the basic rigged character, as the hand is instanced in the C++ code. I believe that you are correct that attribute from the leap page may be the correct way to get this interaction to work, but I am clueless on how to do it. I wanted it to work like the unreal video where you could punch a physics actor sphere.

    Leave a comment:


  • replied
    Originally posted by kdumovic View Post
    Does sphere radius for hand work? I am getting a constant value of 0.0. Other variables like pinch or grab strength work fine.
    My blueprint looks like this - [ATTACH=CONFIG]36888[/ATTACH]
    Could be a bug..
    Is this how you're using it?

    Leave a comment:


  • replied
    So I'm pretty noobie on this stuff.... Where do I find the Leap Event Interface blueprint that would have the Event Hand Moved? When you are calling for the hand and creating a print string this is simply for debug purposes? (i.e. this blueprint doesn't actually accomplish a physics collision event, but rather just reports what the sphere radius attached to the hand is in size)

    Again, I was trying to attach a collision sphere as a component to the character mesh, but this method doesn't appear to work with this interface (I saw this method on an unreal tutorial video where the sphere is attached to move around a large physics actor sphere)

    Leave a comment:


  • replied
    Does sphere radius for hand work? I am getting a constant value of 0.0. Other variables like pinch or grab strength work fine.
    My blueprint looks like this - Click image for larger version

Name:	radius-broken.PNG
Views:	1
Size:	50.9 KB
ID:	1075271
    Could be a bug..

    Leave a comment:


  • replied
    Originally posted by Spittygood View Post
    So I am stuck trying to figure out how to attach a collision box to the basic rigged character. I am trying to make it so I can swat physics actors (like a simple sphere) when using the leap hands, but it doesn't work. I tried the method of just placing in near the character model like how I saw this done on the unreal example video for a character punching a large sphere.

    My guess is that the way the leap hands are instanced doesn't allow this to work properly.

    I also looked at the skeletal set-up of the rigged character, but I don't see how components would be attached to that to create a collision volume.

    So to sum up....HELP! Any tutorials or a clear explanation on how to make this work would be appreciated!


    [ATTACH=CONFIG]35960[/ATTACH]
    I'm having the same problem, but with trigger boxes.

    I love this plugin; it is too cool for school. Excellent work, seriously. But my little program depends on trigger boxes. Any help would be so appreciated. Pls halp?

    Leave a comment:


  • replied
    Any help from the community on this one? Please?

    Leave a comment:


  • replied
    Interact with objects by collision sphere

    So I am stuck trying to figure out how to attach a collision box to the basic rigged character. I am trying to make it so I can swat physics actors (like a simple sphere) when using the leap hands, but it doesn't work. I tried the method of just placing in near the character model like how I saw this done on the unreal example video for a character punching a large sphere.

    My guess is that the way the leap hands are instanced doesn't allow this to work properly.

    I also looked at the skeletal set-up of the rigged character, but I don't see how components would be attached to that to create a collision volume.

    So to sum up....HELP! Any tutorials or a clear explanation on how to make this work would be appreciated!


    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	683.9 KB
ID:	1074875

    Leave a comment:


  • replied
    Hi getnamo,

    First, thanks so much for your great work on this plugin. It's a fantastic resource.

    Like devel.bmad I'm also seeing some strange behaviors in 4.7.4 and now 4.7.5 with your plugin, both on Windows and OS X. Currently on both platforms I'm using the Unreal source compiled via Visual Studio and XCode respectively.

    After creating a new project based on the Epic 3rd or 1st person default templates, if I follow your basic instructions (copy the Binaries and Plugins directories as is to the project root) and change the default pawn class to one of your LeapRigged ones, your yellow convenience mesh doesn't replace the standard blue Epic one. This same sequence used to work in 4.6 just fine and still does with my older 4.6 examples.

    Another telling difference in 4.7.N is that the resources for your examples no longer appear in the Content browser when I follow this setup path. If I manually copy your Blueprints, Character and Materials folder (from within your Plugins > LeapMotion > Content folder) into the project root > Content folder, then I can at least see your content in the Content browser. However this leads to double entries in the Game Mode > Player Controller Class drop down.

    Perhaps the default pathing for 4.7.N has changed, and your file structure no longer is recognized the same way?

    I'm finding that if I load up another map in either a default 1st or 3rd person Epic blueprint project (such as one of the starter content maps) THEN your plugin will override the default character.

    Any idea what's going on? It seems something has broken with either 4.7.4+ or with a compiled code base?

    Thanks!



    -------------------------------------
    Rob Hamilton
    https://ccrma.stanford.edu/~rob
    @robertkhamilton

    Leave a comment:


  • replied
    Ehi getnamo!! Amazing work, your plugin is absolutely great.
    A couple of strange issues on OS X and UE 4.7.4:
    1) Standalone game / Restarting UEEditor
    - I create a new first person project. Configure the leap plugin, select blueprint -> game mode -> pawn -> select pawn class -> leap rigged character.
    - Play in editor: I see the yellow hands and can use the leap controller.
    - Save everything.
    - Restart the editor: the pawn is reverted to the default blue FP character. Why?? I cannot seem to correctly save the game mode
    - Play standalone game: I see the default blue FP character and no leap. Is this normal?
    - Package standalone: I see the default blue FP character and no leap. (no error with the plugin, everything configured following your instructions)

    2) shoulder location
    When the hand is tracked, the shoulder always moves to the middle of the chest and in front of the character (see ss). Shall I configure some parameter?
    Click image for larger version

Name:	Screen Shot 2015-04-07 at 01.55.17.png
Views:	1
Size:	415.9 KB
ID:	1072067

    Leave a comment:


  • replied
    Originally posted by commedieu View Post
    Getnamo,

    Thank you so much for getting this together. I ordered a Leap due to your work. I have a question about general pipeline, is your plugin/workflow currently the more user friendly solution for blueprint based projects, than the 'official' plugin? I'm excited to start learning after my job is done, but I just wanted to know if its more worth it to follow this route, than trying to work with the official plugin, for now...?
    It depends largely on your use case.

    As it is the official plugin supports rigid body hands with collision out of the box. This makes it convenient to push physical boxes around and the such. You simply drop an special actor into the scene or a component onto a character to get these hands to play with. It's simple and if you only want that kind of functionality I recommend using the official plugin.

    If you want anything beyond that, the unofficial plugin currently has easier support for it. This includes gestures, pinching and grabbing, input mapping, getting raw images, VR mode tracking, interaction box, frame history, tool tracking etc. You can in theory access them in C++ with the official plugin, but if you want these exposed in blueprints you are largely recreating what this plugin does. It is built with an event-driven architecture which means you simply respond to the events that you're interested in. Below is a blueprint example of using the circle gesture to show a sphere the size of the circle you are making



    Note that only the bottom event is needed. The top image shows equivalency for casting generic gestures to sub-gestures. You can get access to these features by adding a leap controller component to any of your blueprints and adding the LeapEventInterface to receive the events.

    The unofficial plugin also provides a convenience rigged character (and now passthrough) that is built with VR in mind. It is the default UE4 character with loosely coupled animation blueprint, which means you can swap both the character and the animation to your own and still retain the leap hand overrides. These do not have collision enabled by default, but if you would like to add it, a simple way would be to add a collision asset for the character you wish to use (capsules for each finger/joint). Rigging also supports VR mode automatically so just entering VR mode (fullscreen by default) will make everything feel 1:1 expecting the leap mounted to your hmd, and exiting out will expect the leap in a 'on table' default mode.

    Either way both plugins are easy to use and will make getting a leap project working how you want it very easy. It would be reasonable to expect the official plugin to gain some of the missing functionality over time and some of the missing convenience setups are planned for the unofficial. Long-term I am planning to abstract hardware away from a VR skeleton, which would allow you to support various input methods without altering any game logic. I would personally try both and see which you feel works better for your use case.

    Also note that as it currently is you need to compile the engine from source to include the official plugin (but it should make its way into the 4.8 binary), whereas this plugin installation is dragging and dropping into your project.

    Hope this helps!

    Leave a comment:


  • replied
    Getnamo,

    Thank you so much for getting this together. I ordered a Leap due to your work. I have a question about general pipeline, is your plugin/workflow currently the more user friendly solution for blueprint based projects, than the 'official' plugin? I'm excited to start learning after my job is done, but I just wanted to know if its more worth it to follow this route, than trying to work with the official plugin, for now...?

    Leave a comment:


  • replied
    Originally posted by Rasa View Post
    Hi Getnamo,
    In Default third person, I have setup the Input setting for Moveforward and turn rate to Leap right Palm Pitch and Leap right Palm Yaw, so now in certain stage I have control the character in idle stage but it is difficult to become idle while giving gesture, Is there way to become character idle by leap geasture.

    I tried Disable and Enable Input but Disable works well after that Enable doesn't works, gestures doesn't detect.
    ...
    I recommend that you use the blueprint events instead of input mapping if you're doing anything more complicated than joystick-like input. You can however use a simple conditional such as the 'branch' node with a boolean that forwards the input to MoveForward/etc only when true. The boolean would then be set/switched on the input mapping events (grab and pinch) like you've shown in your attachment to give your desired effect.

    Originally posted by san View Post
    Pretty impressive you got this third party plugin working so well!
    I'm curious why there is are Windows and OSX versions of the plugin but none for Linux. Is it simply the lack of resources and/or exerience in that area or are there fundamental issues that need to be resolved?
    Lack of resources on my part. Keeping the mac compile in sync already eats up more of my time than I'd like, I welcome any pull requests if you can help in any way. Also note that you have the full source with the plugin, so if you're on linux you can compile the plugin yourself, it is likely you will need no code changes. If that's not an option I recommend asking for the official leap plugin to support linux as they should have the resources, especially as it will be included in future UE binaries.

    Originally posted by bwiklund View Post
    After creating a fresh project, dropping the folders in, and restarting unreal:

    When I click OK, it fails with:

    This on OSX 10.10.1, UE4.7.3, Leap SDK 2.2.3
    Mac binaries were still on the old 4.6 version, the plugin simply needed a recompile. While I was at it, I updated both the binaries and dlls to the latest SDK (2.2.4). Grab the latest update from the usual place

    Update to 0.9.2
    -Mac Binaries compiled for UE 4.7
    -Leap SDK, libs and dlls updated for SDK 2.2.4
    Last edited by getnamo; 03-25-2015, 09:12 PM.

    Leave a comment:

Working...
X