Are these baseball interactive visualizations possible with PlayCanvas?

I’m evaluating tools for getting specific work done for my baseball company. We are capturing “3d” data now so the typical 2d svg based charts are not quite as compelling as 3d would be. Looking to build things very similar to these:

So my question is if it’s possible to build things like that in PlayCanvas? Taking into account the interactivity, animation, physics etc.

Not sure that there’s much “game physics” going on there. There must be a large set of sampled data in that data set of yours I guess? But yes it would be easy enough - quite a lot of building “procedural” meshes in both of them (the trails). But really not that hard given the data. I guess that might need smoothing and interpolation, but these are just normal math issues.

PlayCanvas can create procedural meshes, so yep, it can make those visualisations. Quite a lot of work of course.

What does your data format look like?

Yes interpolation will be needed. Data wise we have things like velocity, spin rate, angle, spin tilt, start/end position and much more. I’m not sure if we have locations between start and end. We don’t know what all the data points we have mean yet :slight_smile:

The trails are a must no matter which direction we take our project. So to make the baseball trails requires procedural meshes which require a lot of work? Sorry I know next to nothing about 3d, animation, etc. I thought the trails would be easy.

I can tell you we won’t be creating the stadium environment like in the 2nd link.

Can I create the interactivity found in the first link that contains regular html/js outside the canvas and interact with the visual or does it all have to be contained within the PlayCanvas project file? 1st link allows you to click players which filters the data and triggers an animation.


Yes you can have any amount of HTML and other stuff you like - at the end of the day PlayCanvas is a canvas, a library and your own code. You can detect clicks on 3d objects and clicks on HTML. None of that will be very tricky.

There isn’t a standard “trail renderer” in PlayCanvas, and it is work to make procedural meshes like that - but not impossible work by any means. It’s just going to be a matter of feeding the data points into something that creates a smooth curve and then building a mesh along it. I mean it’s not just moving a couple of spheres around, but it is far from impossible :slight_smile: Things like Unity do have a built in trail renderer, but if you intend this to work on mobile and you want HTML then you can forget that.

Basically a trail renderer makes a model out of the places where something has been.

1 Like