Skip to content

Releases: xissburg/edyn

Edyn v1.2.1

24 Oct 17:05
Compare
Choose a tag to compare

Small fixes coming from version v1.2.0 and attempting to make it build on Conan to be added into Conan Center.

Edyn v1.2.0

18 Oct 00:41
Compare
Choose a tag to compare

This version of Edyn brings a completely new multi-threading model, which simplifies some annoying quirks of previous versions. Following is a list of relevant changes.

  • Now using EnTT 3.10.1
  • New multi-threading architecture with three execution modes:
    • Sequential: runs the simulation in the calling thread.
    • Sequential multi-threaded: identical to the sequential mode except that it will conditionally parallelize certain steps.
    • Asynchronous: offloads as much work as possible to background threads to make the call to edyn::update as lightweight as possible.
  • External systems are now simply pre- and post-step callbacks, invoked before and after each physics step with fixed delta time in either execution mode.
  • External entities and components must only be registered when running in asynchronous mode or in a networked simulation.
  • Unnecessary to mark components as dirty. Changes are observed internally using EnTT signals. Similarly, edyn::refresh has been removed.
  • Unnecessary to mark components as continuous. When running in asynchronous mode, components that change in the simulation worker are updated in the main registry.
  • Cylinders and capsules can be created aligned with any of the 3 coordinate axes.
  • Rag dolls can be made of either boxes, cylinders or capsules.
  • Ability to ignore entities in a raycast.
  • edyn::rigidbody_def::update_inertia() has been removed. Moment of inertia is calculated from mass and shape by default. Custom inertia can be assigned to the optional field edyn::rigidbody_def::inertia.
  • edyn::batch_rigidbodies has been removed as it isn't necessary anymore because island workers have been replaced by the unified simulation worker.

More details can be found in the User Manual. Enjoy! 🚀

Edyn v1.1.0

23 Apr 19:47
Compare
Choose a tag to compare

This version continues the development of networked physics, now providing better ways to handle inputs.

The concept of transient components has been eliminated in favor of marking components as dirty and including them in the next few snapshots to decrease the probability that these data changes would never reach the server due to packet loss. Input components should now be derived from edyn::network_input and be marked as dirty whenever they change to ensure they'll be included in the next few snapshot packets.

Actions are a new feature, which are one-shot inputs that are accumulated over an update and then included into an action history that is sent to the server in every registry snapshot. This decreases the probability that inputs would be lost due to a registry snapshot packet being lost, since the next packet will contain the actions that happened in the previous. Regular components are still useful for idempotent inputs, but actions should be used for one-shot inputs (e.g. firing a gun or shifting gears in a vehicle). See the User Manual for further details.

On top of that, a few other changes and fixes were made:

  • Fix glitch with soft contacts.
  • Fix issues with sensors (i.e. bodies which participate in collision detection but receive no collision response).
  • A custom merge function can be written to be invoked when a component moves from one registry to another.
  • Serialization function not necessary for empty types.

Networked physics is something that's quite difficult to get right so the next releases should also bring more improvements to this section of the library. Enjoy! 🚀

Edyn v1.0.0

02 Apr 05:10
0af44ff
Compare
Choose a tag to compare

With the first iteration of networked physics complete, this release is deserving of the major version number one. So, welcome to Edyn v1.0.0! It is now possible to run a simulation in a server and synchronize it with multiple clients, and Edyn should take care of replicating client state in the server with correct timing using a jitter buffer, and applying state from the server in the clients with extrapolation, conciliation and visual jitter smoothing. Not much has changed besides the introduction of networked physics. This is a summary of other updates:

  • Merge functions are not necessary anymore for external components which contain entities. entt::meta is used now instead. Thus, external components must be registered with entt::meta and at the very least, their members which hold values of the entt::entity type must be specified.
  • Generic constraint is now fully featured with limits, restitution, friction, damping, spring and bump stops.

This being the first release of networked physics means it is still not very polished. The APIs are not yet the best and some features are missing, such as packet and component validation in the server side, which is crucial for security since one cannot assume the client will send good data only, but it does not stop us from making our first networked physics prototypes. Packets are still not optimized so they can be quite big and use substantial bandwidth. Check the Networked Physics section in the User Manual for more information. If you wanna know more about the internals of the networked physics model, see the Networking section in the design document.

Check out the Edyn Testbed to see networked physics in action.

The upcoming releases should be all about polishing and optimizing networked physics. There are so many things that can be improved, and so many bugs to be uncovered...

Enjoy! 🚀

Edyn v0.3.0

27 Jan 20:59
Compare
Choose a tag to compare

Welcome to Edyn v0.3.0! Following are the relevant updates in this version:

  • Per-vertex material properties (friction and restitution) on triangle mesh shapes (read more).
  • Closest features are now available in the edyn::collision_result provided by an invocation to edyn::collide for closest point calculation (read more).
  • Add function to apply torque impulse edyn::rigidbody_apply_torque_impulse.
  • Contact points are not individual entities anymore. They're now included in the contact manifold. This means EnTT construct/destroy events cannot be used to observe collision events. Thus, new signals are provided for when contacts start and end and when points are added and removed (read more).
  • Hinge constraint limits, friction, bump stops, damping and stiffness (read more).
  • Point constraint friction.
  • Constant-velocity joint with bump stops, damping, friction and stiffness.
  • Cone constraint.
  • Rag dolls are now possible with the introduction of the CV-joint and cone constraint. Utility functions are provided to create generic rag dolls (read more).
  • Constraints can be disabled by assigning a edyn::disabled_tag to them.

Progress has been made to networked physics in the networking branch which should be merged into master soon, which is the missing feature for the coming v1.0.0 release.

Enjoy! 🚀

Edyn v0.2.0

18 Sep 05:13
Compare
Choose a tag to compare

Welcome to Edyn v0.2.0! This version includes a variety of fixes, improvements and a couple new features, the most relevant being:

  • Now using EnTT v3.8.0.
  • Improved collision detection with static triangle meshes, specifically concerning internal edge collision avoidance.
  • Ability to assign multiple constraints of different types to the same entity.
  • Ability to add an external entity to the entity graph and attach it to a rigid body using a edyn::null_constraint, thus making this entity always present in the same island that rigid body is in, then making it present in external systems.
  • Collision exclusion lists for fine tuned collision filtering.
  • Ability to get/set default global gravity acceleration.
  • Improved contact point persistence plus a new algorithm which further improves it for rolling objects.
  • Modify center of mass of a rigid body dynamically without affecting constraint pivots.
  • When a rigid body is destroyed, all constraints attached to it are destroyed automatically.
  • More accurate friction using two friction directions.
  • Rolling and spinning friction.
  • Solve position constraints instead of using Baumgarte stabilization for position correction (only in contact and hinge constraints so far).
  • Restitution solver which greatly improves shock propagation along sets of rigid bodies which are touching with non-zero restitution. The Newton's Cradle works correctly now!
  • Ability to specify combined material properties for pairs of materials identified by an unique id.

Check the User Manual for detailed information on the new features. Enjoy!

Edyn v0.1.0

13 Jun 23:17
Compare
Choose a tag to compare

Welcome to the first release of Edyn! The main features in this release include:

  • Multi-threaded physics simulation.
  • Discrete collision detection using SAT. Collision detection APIs can be used in isolation.
  • Shapes:
    • Box.
    • Cylinder.
    • Sphere.
    • Capsule.
    • Convex polyhedron.
    • Compound, which allows any of the above to be combined into a single shape, which can be concave.
    • Concave triangle mesh using Voronoi regions to prevent internal edge collisions. Can only be used for static entities such as terrain.
    • Paged triangle mesh which loads sub meshes on demand. To be used for large terrains.
  • Constraints:
    • Contact: the most important constraint which prevents rigid bodies from penetrating. They're created internally in the narrow-phase collision detection.
    • Distance constraint: keeps the distance between two points on the bodies constant.
    • Soft distance constraint: similar to distance constraint but it acts as a spring.
    • Generic constraint: allows individual degrees of freedom to be constrained.
    • Hinge constraint: constrains two bodies around an axis passing through a point.
    • Point constraint: constrains two bodies at a point.
    • Gravity constraint: applies gravitational force between two entities following Newton's law of gravitation.
    • Null constraint: a constraint that does nothing. It can be used to create an edge in the entity graph and ensure that two entities always live in the same island.
  • Sequential-Impulses constraint solver.
  • Ray-casting.
  • Soft contacts.
  • Collision filtering.
  • Collision events.

Enjoy!