5th of Dec Update


Haven't updated in a while because I haven't really made any major achievements, everything has been very gradual in growing my understanding with the Leap API as well as how Sam's demo actually works.

I've been focusing the last few days on how Leap works, from how to access any leap data within a script to detecting hands using the HandModels[] from the current Frame. I had a slight play around with the concept of four hands simply by duplicating the LeapController and HandModels twice over and position them in a way as to replicate four hands. Movement is that where both the left hand controls both hands on the left side and vice versa with the right. This was a good way to visualise the task and see the gaps in why this technique wouldn't work.


My current challenge is to replicate the mirroring from Sam's demo. Now that I understand the code better I can see that the way that Sam has implemented it is no longer possible with the new Orion API. He mirrors the hand using the mirrorZ method which has now been removed from the newer classes. So far as I can tell there are a few ways around it:

  • Recreating the mirrorZ method in my code and using in a similar way that Sam did. The method itself is pretty simple however it requires quite a bit of refactoring of the new Orion assets as there seems to be a decent change in the structure. From what I can tell the method iterates through each finger in a hand model and sets the finger value for mirrored to true. Then when creating the hand each finger appears on the opposite side (I THINK). The biggest thing that makes me thing this is not such a good idea is that there is probably a reason why they have gotten rid of this and replaced with:
  • MirrorZ and mirrorX axis methods. These methods from what I can tell sound like almost exactly like what I need as they are often pointed to on forums as the answer however they are in a class called LeapTransform which i can't for the life of me seem to work out how to apply the leap mirrored transformation to a hand model. 
  • THIRDLY another method I found when perusing through the new Orion API: 
    Which again sounds like it might be useful, however I'm not sure if the tracking would map to the new hand from the left to right etc. And also it returns a Hand rather than a hand model and I'm not sure how to Instantiate this in the scene. I tried to add to my List<Hand> where the Hand representations are stored when they are seen but that didnt seem to work. 

That's where I'm at currently, a little bit stuck with where to go from here because I've kinda tried all the ways I could think of and gotten stuck due to probably an average understanding of what is happening. I think tomorrow I'll have a break from it and work on the user interface for a little change of pace/variety.

Comments

  1. Good stuff Alex! That looks promising. I can try to help you clarify some of those outstanding questions. Would be good also for me to understand a bit more how it's working.

    ReplyDelete

Post a Comment

Popular posts from this blog

Texturing Hands

Day 2