Buffered-Interpolation

We do a lot of lerping in our networked application and sometimes the babylon lerp functions don’t jive well with the complexities of our app, which frequently sends updates about pos/rot.

I notice that there is a package for three.js that does buffered-interpolation, which is designed to work well “both in situations with continuous and sparse network updates”: InfiniteLee/buffered-interpolation: A class for interpolation of position, rotation, and scale for networked THREE.js objects. (github.com).

I’m wondering if this kind of thing might be in the works at Babylon, or if I don’t actually need something like this because I should be using _____ instead. All ears!

I’m not aware of any other plug-in implementations, as it is usually very custom to a project.
Personally, I use my own serializer(when not using other networking libraries), which means I use schemas to determine whether or not a value should be interpolated, and how(quaternion, vector, integer etc). The example you linked has hardcoded position, quaternion and scale, and would benefit from a more modular approach. That being said, you could port that example to BabylonJS in five minutes and modify to your needs.

2 Likes

Thanks for the feedback here @Raggar !

Let us know how that works out and might be a nice addition to the babylon toolset :slight_smile:

Hi @sebavan , happy to say @FrameVRWill cooked this up: GitHub - virbela/buffered-interpolation: A class for interpolation of position, rotation, and scale for networked BabylonJS objects..

4 Likes

This is so cooooooool !!! would you mind adding someting in the babylon doc for it ??? cc @PirateJC

3 Likes

WOOT! This is rad! Nice work @FrameVRWill !!!

Yup on it! I’ll add a new page to the extensions section of the doc for this.

4 Likes

Ok new page created for this under extensions.

There’s not much to the page right now, just a description copied from the github readme

@FrameVRWill - How would you feel about adding a few details to the page? Maybe some instructions on how to get it set up and a small example? Is that doable?

Thanks!

2 Likes