Stretch Object Between Feet in Foot Tracking Template?
Hey everyone,
I'm working on some new 3D models that would look cool stretched between the feet. I'm wondering if anyone knows any scrips or has any suggestions, on how to make the model stretch and move, while staying connected to each foot on it's ends, with foot tracking template. My goal is to have the object's ends each attached to both feet and when the user walks, it says connected, the middle of the object just gets bigger or smaller depending on how close the feet are. Kinda like that rope game you may have played in field day or something where you can walk and it stays connected to the feet but extends and retracts in the middle when you walk. Any advice on how to accomplish this would be greatly appreciated!
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
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.
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
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
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
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
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:
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.
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
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.