Only one week after Box3D physics was launched, the favored free & open supply cross platform Jolt physics engine launched Jolt Physics 5.6. This highly effective physics engine is already being utilized by tons of open supply sport engines, together with Godot and GDevelop in addition to getting used for industrial AAA titles comparable to Horizon Forbidden West, Loss of life Stranding 2 and X4. The 5.6 launch provides a number of new options, with the star of the present being the brand new hair simulation system.
Jolt Physics 5.6 options:
- Added interface to run compute shaders on the GPU with implementations for DX12, Vulkan and Metallic. These interfaces could be disabled by setting
JPH_USE_DX12,JPH_USE_VK,JPH_USE_MTLandJPH_USE_CPU_COMPUTEtoOFF. To construct on macOS, you’ll must have dxc and spirv-cross put in. The simplest technique to set up them is by putting in the Vulkan SDK. - Added a strand based mostly hair simulation operating on GPU
- System relies on Cosserad rods.
- Can use lengthy vary attachment constraints to restrict the stretch of hairs.
- Helps simulation (information) and render (comply with) hairs.
- Hair vs hair collision is dealt with by accumulating the common velocity in a grid and utilizing these velocities to drive hairs.
- Helps collision with the setting, though it solely helps ConvexHull and CompoundShapes in the mean time.
- The roots of the hairs could be skinned to the scalp mesh.
- Notice that that is nonetheless work in progress, some issues that also should be executed are listed in Hair.h.
- Carried out a brand new friction mannequin. This friction mannequin is cheaper to execute (15 % quicker, 40% much less reminiscence for Pyramid check) and doesn’t favor the primary contact manifold level. As a substitute of making use of friction at each contact level, we now calculate the common contact level and apply friction there. Friction consists of two linear constraints and 1 angular constraint. The linear constraints use the
friction_coefficient * sum(contact_impulse)to find out the max linear friction impulse, the angular constraint makes use offriction_coefficient * sum(distance_friction_point_to_contact_point * contact_impulse)to find out the max angular friction impulse. - Elevated most worth of
HeightFieldShape::mBitsPerSampleto 16 to have the ability to create top fields that extra intently match the uncompressed top values. - Made tolerance that’s used within the inside edge elimination algorithm configurable in
CollideShapeSettings::mInternalEdgeRemovalVertexToleranceSqandPhysicsSettings::mInternalEdgeRemovalVertexToleranceSq. - Added assist for RISC-V RVV, the SIMD extension for RISC-V.
- Added
JPH_BUILD_SHARED_LIBScmake variable to find out whether or not to construct static or shared libraries (it defaults toBUILD_SHARED_LIBS). This enables embedding Jolt as a static library inside a shared library. - Simulation stats: Added monitoring of collision steps. This fashion we are able to know by what number of steps we have to divide the numbers to get averages per step.
- Added assist for glTF
KHR_physics_rigid_bodiesconstraint motors. This providesESpringMode::MassNormalizedStiffnessAndDampingto have the ability to specify the spring parameters mass-normalized / in acceleration-mode. It additionally providesEMotorState::PositionAndVelocitywhich creates a power proportional tostiffness * (position_target - position_current) + damping * (velocity_target - velocity_current). - Added
Ragdoll::DriveToPoseUsingMotorsvariant that drives to a pose utilizing each place and velocity. - Added
Physique::ApplyBodyCreationSettingsandPhysique::ApplySoftBodyCreationSettingsto have the ability to replace a physique with creation settings after creation. - Added
ShapeCastSettings::mExtraConvexRadiuswhich inflates the question form by an additional convex radius. - As much as 40% efficiency enchancment (scene dependent) and as much as 70% reminiscence discount (scene dependent).
Key Hyperlinks
Jolt Physics GitHub Repository
You possibly can be taught extra about Jolt Physics 5.6 and see the brand new hair simulation in motion within the video under.

