Havok plugin for animation prep?

Hi,

Simple question, and maybe stupid at that: is it possible to use the Havok wasm plugin from another language to bake a simulation offline that will be rendered in BJS afterwards (online)?

Second advantage: use my favorite language instead of typecript.

Thanks,

I do not think so.

You could use javascript and maybe Python has a way to run wasm but I am not sure it would be as straightforward as you think. You might need to rewrite the full glue in python.

I am thinking rust compiles real good to WASM so maybe they have a wasm runtime ?

Thanks Sebavan,
Looking at https://github.com/BabylonJS/Babylon.js/blob/9144f5dfe89d7a138338af6f2a39dcd467f40a51/packages/dev/core/src/Physics/v2/Plugins/havokPlugin.ts#L265 I think I can get started.

I will definitely use Rust for a better wasm cooperation.

I will leave this thread as is for the moment, time to figure out.

You can use a wasm runtime like : GitHub - bytecodealliance/wasm-micro-runtime: WebAssembly Micro Runtime (WAMR)

But the real issue is to mix the JS and the wasm. Havok is not only .wasm but also a glue layer.
But, if it’s pre-baked, then why use realtime libraries? Why not bake with Blender/Maya/Houdini or any tools available with a native interface like BulletPhysics, Jolt,… ?

You are right, I should rather follow that approach, much easier to roll!

1 Like