Git Product home page Git Product logo

Comments (5)

noname0310 avatar noname0310 commented on May 26, 2024 2

I'm going to handle the bullet physics in a way that multithreads it and makes the JS interrupt overhead nearly non-existent.

It's currently in progress in a separate repository.
https://github.com/noname0310/bullet-rust-wasm

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024 2

Since I received several similar requests, I decided to quickly create a non-performant implementation first

The ammo.js physics backend will be available from babylon-mmd 0.42.0.
Although ammo.js is not very good performance, you will get very similar results to mmd.

The usage is the same as before, see this test code
https://github.com/noname0310/babylon-mmd/blob/main/src/Test/Scene/physicsTestScene.ts#L63
https://github.com/noname0310/babylon-mmd/blob/main/src/Test/Scene/physicsTestScene.ts#L111-L113

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

try

const mmdPhysics = new MmdPhysics(scene);
mmdPhysics.angularLimitClampThreshold = 10 * Math.PI / 180; // 10 or higher

const mmdRuntime = new MmdRuntime(scene, mmdPhysics);

This is an issue with havok physics, so it's not a fundamental fix.

If this doesn't work, you should consider bake the physics simulation.

I am currently working on bullet physics(the physics engine of mmd). Once this is finalized, there will be no problems with physics computation, but it will take a long time before this solution is available.

So for now, there is no solution other than the two methods suggested above.
If you're interested in physics baking, I'll show you how. in detail

from babylon-mmd.

noname0310 avatar noname0310 commented on May 26, 2024

I can easily reproduce mmd's physics using ammo.js, the emscripten build of bullet physics, but I'm not currently working on an ammo.js implementation as I want to focus on a more optimized solution.

Creating an ammo version of MmdPhysics would be an trivial task, so if you're interested, you might want to consider it.

from babylon-mmd.

SavAct avatar SavAct commented on May 26, 2024

Thanks for the information. I am curious about your optimized solution 🙌

from babylon-mmd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.