I may have painted myself into a corner on something. I’ve spent some time setting up a system that manipulates vertex points on a plane in real-time. Works great with code, but now I want to bake the animation and ultimately export to GLTF.
I found a demo on the forum from the past couple of days that visualizes in an oversimplified way what I’d want to do.
https://playground.babylonjs.com/#8T4D75
Basically, this demo is moving vertex points on that ground plane programmatically. I’d like to capture this movement as keyframes and be able to export. In my situation, I’ll have probably a dozen or so planes with each of the 4 points moving a few times per second and expecting maybe a few minutes of animation from a recording session. (big picture: I’m doing 2D cutout style character animation against motion capture data)
I had assumed I could make a few dozen animation tracks against the vertex points, but I think I’m reading this might not be possible.
Can someone steer me in the right direction? Ultimately, I want Babylon.js to do the real-time capture and real-time programmatic playback and editing, but then send it off to Blender to do the rendering.
If I had to guess based on what I’m reading, I should maybe look into morph targets for this?
I guess my secondary option would be to actually construct a rigged skeleton, but that seems like it might be overkill for something I don’t plan on editing/animating later.
thanks!
It Is usually the exact opposite, do all the animations in blender and the export to babylon.
I am wondering why doing all of them in babylon, also there are no .babylon importers in blender so you would need to rely on glb gltf where animation can not be exported at the moment.
First of all, yup! I know it’s a bit untraditional to start in web and export to a 3D app, but I really am keen on the idea of small/targeted 3D creative/productivity tools. Stuff that you wouldn’t bother making into an application, but as a web app, it works.
If I’m hearing you right, there’s no way to export animation into Blender. So no matter what road I go down, I’m out of luck.
That’s really a shame. I’ll probably do some more research - but would love any leads if you can think of any. Even if it’s a non-BJS library that I can write vertex points to at keyframes.
thanks again
Adding @Drigax who might have more insights on exporting to glb from babylon with animations ?
Thanks! Would still love to hear thoughts (especially because my idea might not pan out). But I’ve been playing with Three.js’s GLTFExporter today on this asset glTF-Sample-Models/2.0/AnimatedMorphCube at master · KhronosGroup/glTF-Sample-Models · GitHub, and it works great. The exporter itself isn’t so large, and my assets are basically just a series of textured quads, so I’m thinking I could maybe hack the script to accept BJS scene constructs instead of Three.js ones. Again, this is probably crazy, so I’d love to hear better options!
Definitely, we plan to support the animation export rather soon-ish
@Drigax will be able to provide more info on the timeframe.
Yep as I said on twitter, let’s make that a high priority 
2 Likes
that’s so nice, thanks! In that case, I might hold off on doing the export for now and work on hardening my actual app. I only started looking at this now because if exporting was a show stopper, I want to suffer the disappointment now before I continue. But between this, and how not overly complex Three.js’s look, I feel fairly confident that I don’t have to scrap this. I guess what I should do is prep everything with morph targets in the engine since that seems the most likely way forward. Thanks again!
Sure, I’m taking a break from exporter-related work this week, but I can get back on our animation export features first thing next week.
1 Like