Walk.js 2.0 beta


#1

Major upgrade

This release is a major update, as the script now uses full body harmonic animation. Since this has dramatically improved the overall quality of the script, I figured it would be appropriate to start calling it walk.js 2.0. As usual, comments, suggestions, insights and bug reports extremely welcome - here it is:

https://s3-us-west-2.amazonaws.com/davedub/high-fidelity/walkBeta/walk.js

As always, walkTools have been updated accordingly:

https://s3-us-west-2.amazonaws.com/davedub/high-fidelity/walkTools/walk.js

Release notes

  • New animations: walk, idle, walk backwards, sidestepping (left and right), turn on the spot (left and right) and flying, all using full body harmonics

  • As inspired by HiFi’s own animation graph, new avatar character animation file with all animations, sounds, transitions and reach poses described in one place. Example here

  • Defined two separate reach pose types - a designer / animator now has ability to specify different reach poses for pre and post state changes (e.g. one reach pose plays when the avatar is about to land and another plays just after he has landed)

  • Improved support for (Blender) avatars that are missing their pre-rotation values

  • Fingers are now animated procedurally (using harmonics)

  • All animation data now in easy to store / transmit json format

  • Tightened up the hips translations by adjusting for avatar hips height

  • Improved flying blending (up / down / forward / backwards / turning / flying slow animations are all blended depending on the motion)

  • Reduced footstep volume (slightly)

  • [walkTools] Implemented bvh player (the bvh -> harmonic animation converter is working, but not yet ready for release)

  • [walkTools] Added t-pose to walkTools editor as animating / rigging aid

Issues

The automatic stride length calibration had to be disabled due to this bug: https://worklist.net/20680. The stride lengths are now calibrated to fit an avatar with hips exactly 1m above the ground. The settings panel now has a 'Calibrate' button that can be used if accurate foot placement is required.

The bvh player’s interpolation is very crude, as it’s only a previewing tool to check everything is ok before conversion to harmonics. As such, the animation looks a bit jerky when a bvh file is played.

There is a glitch around the walk / idle dead zone. Attempts have been made to address this (see https://github.com/DaveDubUK/walkTools/tree/walk-blending/walkTools) but I’m not prioritising that for now.

I’m (finally!) starting to hit some performance limits due to the number of harmonics calculated each frame. Currently, for each animation in the mix, there are up to 1536 cosine calculations per frame. At times (e.g. during transitions) there may be four or five animations blended at once. This has led to script execution times of up to 7mS, that whilst acceptable, should not be exceeded too much further if support for lower spec machines is to be maintained.

Standard avatar

I’ve been busy with another project recently (I am now the owner of a VR friendly co-working space here in the tropical paradise of Koh Phangan if anyone fancies a working holiday /end shameless plug).

As a result, I think I’ve missed some discussion on which avatar should be used as the standard. I note that Sintel has been removed from the marketplace, and that a number of new ones are there. The main differences between avatars in the context of walk.js are the height of the hips (please someone make an avatar with 1m high hips!) and the position of the hands when the upper arms pitch is used to place the arms by the sides.

~ Can anyone advise on which avatar is considered as the standard?

Next steps

- I plan to change direction slightly, and start applying the walkAPI / harmonic animation system to a dance animations. The basic plan is to match the harmonics of the animation with the harmonics of any music being played, thus enabling avatars to dance in time to the music.
  • I’d also like to modify walk.js so that it works on NPCs also. I’d really like to make a ‘creepy statue’ that moves imperceptibly, mainly to demonstrate the infinitely smooth interpolation innate to harmonic animation.

  • I plan to look at using the new ATP for storing and serving animation files.

Acknowledgements

Big thanks to @howard.stearns for taking care that walk.js still works after the animation system overhaul, @thoys for fixing the js joint rotation stuff in Interface and @ctrlaltdavid for implementing the webwindow positioning stuff :smile:

  • davedub

#2

Will give this a shot once i get home


So far it has worked quite well when you have the blender rotaitons enabled. Even better than what it was in the past.


#3

This seems to be working very well with the blender avatars. especially with a full basic skeleton


#4

Confirmed functional with the “Robot” avatar too. :smile:


#5

I even dont seem to have the issues with the avatar “warping all over the place” when blender with all hte animations with the blender ovverides.


#6

@Menithal - yeah, I put some time into tweaking the pre-rotations for avis that don’t have them specified. It can never be perfect though, not unless the avi’s origional pre-rotations exactly match the ones specified in walk.js.

Glad to hear the improvements are noticable though!


#7

@davedub great stuff it looks good on the Mixamo / Ozan ‘Malcolm’ avatar
No more walk like a duck


#8

…and what if we wanted to get those pre-rotations exactly matched? Then what? I haven’t dug into .js to see if that is listed out, and was only curious.


Your work on this has been fantastic, and much respect to all those mentioned in the acknowledgements.


#9

@AlphaVersionD - If you wanted to match the walk.js pre-rotations, you could use this as the reference:

https://s3-us-west-2.amazonaws.com/davedub/high-fidelity/walkBeta/assets/miscellaneous/pre-rotations.json

As long as the joint orientations are all y-axis positive along the bone length, this should yield optimal results. If you do check this out, I’d be very interested to hear about your findings.


#10

@davedub
Unfortunately something in the new version of the walk 2.0 stopped working as it was on friday. Suddenly I was floating all directions instead of staying stil…

After reloading and restarting however, it worked fine again.


#11

@Menithal - that’s a cause for concern. It sound slike it could be a bit tricky to track down - were there any unusual conditions when it broke (e.g. moving over uneven terrain, or crossing surface boundaries)?


#12

I was experimenting with a new avatar from Maya, I then reverted to my previous avatar, and it begun to float around. If I can replicate it, ill report it.


#13

I’ve been advised to use the FightBot avatar as the standard, so the animations have been tweaked accordingly.

URLs for updated versions:

Please let me know if you find any last minute bugs or issues, am planning to do a PR very soon!

  • davedub