January 25, 2023

Innovations in Physical Simulations: More Interaction

*With the collaboration of David Ávila.

We continue working on the utilities of our 3D graphics engine, Evergine. Today we want to present you one that makes us incredibly excited and that can help you to simulate movements as different as particle collisions or the effect of the air on a static car inside a wind tunnel.

What we have done

Until now, when you looked for physics engine demos in a web browser, they used to have significantly reduced functionalities: few objects and limited ways to interact… Instead, as you can see below, we have brought all the functionality of an advanced physics engine (Bullet Physics) to web browsers. This allows for more advanced ways to create real-time physics simulations. In the following example, you can see a simulation using joints, which interconnect different physical objects with each other (the various links of the bridge) and react dynamically with the rest of the cubes in the scene:

It wasn’t easy to achieve this level of physics in a web browser. In the following video, you have even more elements, and it is possible to see how they interact with each other when hit by physical projectiles:

What it is used for

Various industries can use this innovation. For example, in the representation of particle collisions, something that research laboratories, universities, or other educational centers also take advantage of. It can also be used for virtual wind tunnels to test the air resistance of vehicles, airplanes, or bridges. Also, from now on, it would be okay to mathematically ‘throw’ lightning bolts in reproducing atmospheric phenomena within web applications. In addition, achieving realistic physical simulations allows the design of advanced machine-learning environments.

WebXR can also take advantage of web support for physical simulations. For example, it is launching a WebXR-enabled web application on a cell phone that allows interaction with physical objects placed virtually in the real world via AR (Augmented Reality) from the screen.

How we have achieved it

At Evergine, our main physics engine is an open-source graphics engine called Bullet Physic or just Bullet. Recently we have managed to get Bullet to compile in WASM, a binary code format for web browsers.

All the graphics engines we know use external physics engines and compile to Javascript or S.js, but only some have compiled to WASM. We have achieved this thanks to Emscripten, which allows us to collect WASM from C++ code, and to Microsoft‘s latest developments in Blazor compilers, which will enable us to link the Bullet Physics library and use it in the Evergine engine. All this has been possible thanks to the latest developments that Microsoft has released in Blazor.NET6, another of the company’s frameworks for application development.

In short, this innovation puts us at the forefront of graphics engines and 3D image generation in web browsers. If you want to know more about what’s new in Evergine thanks to the advances of Blazor and .NET6, we will be happy to help you.

josé manuel blanco
José Manuel Blanco
Content Specialist

Wait! Don't leave yet.

Sign up for our monthly newsletter to be updated on all the latest news, case studies, and more.

We don't send spam and you can unsubscribe at any time.