The forum on this site is closed for new comments and posts. Continue the conversation in our Snap AR Discord server.

Stretch Object Between Feet in Foot Tracking Template?

  • Good question! I wanted to do a similar lens with this technique, unfortunetly i couldnt find an answer. Would be nice if someone lets me also now, if he knows how to do this :D

     

    Cheers,

    SirQu3ntin

    Comment actions Permalink
  • I've modified the scripts in the foot tracking template to give you the positions of the left and right feet. They are accessible on the global variable as global.leftFootPos and global.rightFootPos.

    Prior to importing your 3D object give it two bones - one at each end. These are what we'll track to the feet. There is a script called "tracking" on the main perspective camera. Add your 3D object to the scene as a child of the camera and for the script options choose your two bones.

    Your object will now be attached to either foot, but the example file I'm including is not complete.

    • The object rolls end-over-end as the user walks. It might just be the way my bones are rotated.
    • The occluders for the shoes are still present in the scene so they hide parts of the board.

    I am providing this template as a starting point. You'll have to solve the above issues on your own. I probably won't revisit this file unless I find it useful for something I'm working on. It is provided as-is.

    https://drive.google.com/file/d/1MH_VCBnJYhXawjwCvlnMN19k6wdemQDp/view?usp=sharing

    Comment actions Permalink
  • Hello Mike,

    I have a question regarding the template that you shared. It has more stable positioning with less minor movements. It looks great!

    But in basic template shoes don't flicker (appear and disappear) so much when you turn your feet into different directions as in your template. Especially when you move your feet back.

    Is it possible somehow to remove or decrease flickering effect in your template but still keep less minor movements?

    Thanks

    Comment actions Permalink
  • Hi Max,

    I saw your other comment first; I forgot about this post. All I did to the template was expose some extra information.

    The flickering is due to noise in the machine learning based estimates. If you want to smooth it out you’ll need to probably use some scripting. Alternatively you might be able to add empty scene objects to the feet then use the smooth follow script (in the asset library) to track your shoes to the feet.

    Thanks,
    Mike

    Comment actions Permalink
  • Hello Mike,

    It didn't help. 

    I seems that ML data is more advanced in the latest version of Foot Tracking from the Snapchat website. 

    But previous version from your Google Drive file may have some additional Java Script features that decrease the flickering. 

    By the way, is it possible to update the ML data from the Snapchat website version in the version from your Google Drive?

    Thanks,

    Max

    Comment actions Permalink
  • Hi Max,

    I don't know if you can swap out the ML models. You can definitely try though.

    Instead of the smooth follow script, you can try the following:

    1. Use an empty scene object as the "shoe"
    2. Write a script to get the position, rotation, and maybe scale (not sure if it is used by the foot tracking)
    3. Smooth out the transform values using boxcar smoothing (or algorithm of your choice). Boxcar smoothing is simple to implement and works pretty well.
    4. Use the smoothed values to then set the position, rotation, and scale of the actual shoe objects.

    You have to remember that the machine learning model has to be general enough to recognize feet under a wide array of conditions (shoes, socks, bare, different colors, etc) and it has to be able to run well even on low-end devices. Users are quite forgiving about the noise present in the foot tracking, so I wouldn't spend too much time trying to smooth it out. Smoother tracking is definitely better, but the raw foot tracking itself isn't all too bad.

    Comment actions Permalink
  • Hello Mike,

    Can i please ask you to check the latest version of Foot Tracking Template on your computer? But not the one that is available on official ML templates now.

    It seems that Snapchat released the newest version with this issues. I'm trying to find one of the latest versions, but without this issue.

    I would really appreciate that! By the way, is it possible somewhere to see the history of these templates with ability to download them?

    Thanks in advance

    Comment actions Permalink
  • If older versions of the templates exist the Lens Studio team might be able to provide them. They are going to be the best people to help with the foot tracking issues.

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!