_xiaofang/xiaofang/Assets/Obi/CHANGELOG_rope.txt
杨号敬 bcc74f0465 add
2024-12-18 02:18:45 +08:00

526 lines
26 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Change Log
All notable changes to “Obi - Advanced ropes for Unity” will be documented in this file.
## [7.0.4]
### Fixed
- Bug that caused inactive particles to still be rendered by ObiInstancedParticleRenderer.
- Bug that preventing pin constraints' break threshold from working when using the Compute backend.
## [7.0.3]
### Added
- Object layer support for all renderers.
- New "Synchronous Fixed" solver synchronization mode, similar to Obi 6, offers tighter integration with rigidbody physics.
- New "Tangled Ropes" sample scene.
## [7.0.2]
### Fixed
- Solvers not placed at the scene origin would result in actors having incorrect motion blur in HDRP.
- Fixed issue when disabling all solvers and colliders simultaneously: ipon re-enabling them, the colliders would be ignored.
- Issue withe ElectricalSparks sample scene, ObiRopePrefabPlugger sample component may sometimes thorw an exception dependin on Unity's OnEnable call order.
- Rope would sometimes disappear when using aerodynamic constraints with zero wind in Burst, due to a math.project returning NaN. Replaced with math.projectsafe.
## [7.0.1]
### Added
- BakeMesh functionality to ObiRopeChainRenderer, you can now export baked chain meshes.
- Render layer mask support to all rope renderers and particle renderers.
### Fixed
- Sceneview mouse lookaround in flytrough mode (right click + drag) didn't work in the path editor in Windows.
- Having a ObiParticleRenderer with no material applied resulted in a exception in builds due GetInstanceID() returning 0 in editor but raising a nullref exception in the build.
## [7.0]
### Added
- Compute shader based GPU solver backend.
- More efficient solver update cycle, that also removes the need to have ObiUpdater components.
- Aerodynamic constraint support for ObiRope, ObiRod and ObiBone.
### Changed
- Rendering system is now fully multithreaded, integrated with the solver backend.
### Removed
- Native library based 'Oni' solver backend.
- ObiUpdater and all derived classes have been removed.
## [6.5.1]
### Added
- Support for holes in terrain colliders.
## [6.5]
### Added
- Improved constraint coloring, which results in much faster blueprint generation.
### Fixed
- Memory leak when using collision constraints in the Burst backend.
- Performance drop when using collision constraints in Burst >1.7
- Incorrect lighting on particles in the blueprint editor, when opening the editor without having previously opened any scene.
## [6.4]
### Added
- Support for configurable enter play mode (domain and scene reload disabling).
- Support for in-editor hot reloading.
- Numerical fields to edit control point position and tangents added to the path editor.
### Changed
- Better path editor integration using Unity's editor custom tool API.
- GrapplingHook sample scene now features a hook rope that extends over time, instead of extending instantly.
- Reduced memory allocation in ObiPathSmoother Decimate() method.
- Introduced a job handle pool to avoid runtime allocation of handles by both Burst and Oni backends.
- Constraint padding array in Burst solver has been turned into a member variable instead of allocating anew it every frame.
- Collision and friction batches are pooled instead of allocated every frame.
### Fixed
- InvalidOperationException when performing certain spatial queries with jobs debugger enabled in the Burst backend.
- ObiBone collision category was internally resetting to zero upon pressing play.
- Particle render mode in blueprint editor wasn't updated every frame under specific circumstances.
## [6.3]
### Added
- New ObiBone actor, creates a particle-based representation of a bone hierarchy and simulates it using rod constraints.
- Built-in support for applying solver gravity in world-space.
### Fixed
- Bug in attachments: prefab modifications were not being applied to the component.
- Slight reduction in solver memory allocation.
- Object disposed exception when using contact callbacks with a non-visible solver.
## [6.2]
#IMPORTANT: If updating from an older version, youll need to readjust collision filtering in your scenes.
Phase-based collision filtering has been replaced by mask/categroy based system.
### Added
- New spatial query API, that allows to perform efficient distance, overlap and raycast queries.
### Changed
- Collision phase filtering has been replaced by a category/mask system. If you upgrade existing projects to Obi 6.2, you will have to set up categories and masks appropiately.
## [6.1]
### Added
- RopeCutting sample scene, where screen-space line dragged by the user is used to cut multiple 3D ropes.
- Snake sample scene, where a snake-like character implemented using a rope can be controlled by the user.
### Changed
- Decreased minimum error in distance fields to 1e-07
### Fixed
- Bug in Oni backend: collision stickiness resulted in rapid particle separation from the collision surface.
- Bug that caused NaN velocity assignments to rigidbodies after removing all actors from a solver.
## [6.0.1]
### Fixed
- Bug in Burst backend, resulting in InvalidOperationException when enabling Burst safety checks.
- Bug in ObiSolver that caused particleToActor array entries to be null.
## [6.0]
### Added
- Optional simplex-based surface collion pipeline for more accurate collision detection/response.
- Predictive variable-step constraint solving that makes syncing Unity's physics no longer necessary when using substeps.
- Amount of CCD is now adjustable per-solver.
- Collision margin is now adjustable per-solver.
- Bend and bend/twist constraints now support plasticity.
- One-sided collision detection between particles. Particles with one-sided collision detection will always project penetrating particles to the side defined by their associated normal.
### Fixed
- Bug in dynamic particle attachments that would case colliders parented under a solver to lose their attachments upon enabling/reenabling a solver.
### Changed
- Contacts "particle" and "other" have been renamed to "bodyA" and "bodyB". bodyB might be a simplex or collider index, depending on the contact type.To access
particle indices from simplex indices, use the solver.simplices array.
## [5.6.2]
### Fixed
- Missed collisions using certain meshes for MeshColliders, due to a bug in bounding interval hierarchy generation.
- Corrected orientation error in the first particle of rods, when there's multiple rods in a solver.
- Corrected rendering error in rods, when there's multiple rods in a solver.
## [5.6.1]
### Fixed
- Bug in Burst backend: solver bounding box size was typically underestimated.
- Bug in Burst backend: when using volume constraints: "InvalidOperationException: The NativeContainer ApplyVolumeConstraintsBatchJob.particleIndices has not been assigned or constructed"
- Bug in Burst backend: not releasing native arrays when empty solvers -with zero actors in them- are present in the scene.
- Bug in Oni backend: volume constraints not working properly when multiple actors are present in the solver.
- Fixed crash when using ObiLateUpdater or ObiLateFixedUpdater with the Burst backend.
- Reduced GC allocation in dynamic particle attachments.
- Fixed bug in Skin constraints, that caused them to fail restricting particle movement in certain circumstances.
### Changed
- Updated Oni iOS library to XCode 12.1. Make sure to use XCode 12.1 or up to build for iOS when using the Oni backend.
- ObiKinematicVelocities component has been removed. Its functionality is now built into the engine, and automatically used for kinematic rigidbodies.
### Added
- Sample ObiContactDispatcher component, that will call custom enter/stay/exit contact events.
- Support for multiple solvers in sample script in ObiContactGrabber.
- Added util LookAroundCamera component.
## [5.6]
### Added
- Faster SDF generation.
- New sample scene.
### Fixed
- Bug that causes out of bounds access when dinamically adding/removing colliders at runtime.
- Bug that prevented stitch constraints from working first time they were enabled.
- Offset in particle selection brush on high density screens.
### Changed
- Constraint batches of multiple actors are now merged together. This greatly reduces the amount of dispatched jobs and improves performance on both backends.
- Colliders no longer have a "use distance fields" boolean value, they will always use the SDF as long as they have one.
## [5.5]
### Added
- Backend system: abstracts the underlying particle-based physics engine used. To the native, built-in engine (Oni), we have added a Burst-based implementation that
will run on all platforms supported by Burst.
### Changed
- Improved path smoother, line and extruded renderer performance.
## [5.4]
### Fixed
- Bug that caused a crash when using Obi in conjunction with Mirror networking system (NetworkIdentity component).
- Bug that could cause a crash when disabling an actor under a disabled solver.
- Bug that prevented self-collisions to work correctly between particles created at runtime by a ObiRopeCursor.
### Changed
- Recompiled iOS libraries using XCode 11.3.1, to circumvent bitcode compatibility issues now that XCode 11.4 and up have a bug that cause linking against Obi to fail.
## [5.3]
### Added
- Added adaptive rendering decimation to ObiPathSmoother, controllable using a curvature threshold.
- Greatly increased numerical precision for rigidbody interaction when solvers are far away from the origin.
- 2D colliders now span infinitely in the Z axis.
### Fixed
- Issue in the ObiStitcher editor that picked up incorrect particles when adding stitches.
- Issue that caused a 1-frame delay for collider geometry parented inside a solver.
- Issue in ObiParticleDragger that caused incorrect behavior with multiple solvers.
- Bug in particle advection, that assumed diffuse particle positions to be expreseed in world space. Now advection works correctly
for solvers not positioned at 0,0,0.
## [5.2]
### Added
- Rope tear callback (cloth.OnRopeTorn)
- Function to reset particle positions orientations and and velocities in an actor (actor.ResetParticles())
- Added support for ObiRopeLineRenderer in SRPs.
### Fixed
- Issue with inertia rotations, that caused wrong inertia tensors for complex compound colliders.
- Issue in particle attachments, that forced to call Bind() manually after changing their target or particle group at runtime.
## [5.1]
### Added
-Smooth initial overlap resolution by using clamped depenetration velocity.
-Actors now automatically create a solver root when editing them in prefab mode.
-Brought back rope mesh baking.
### Fixed
- Bug that caused solvers with no actors in their hierarchy to freeze Unity when updated by a fixed updater.
- Bug that prevented multiple colliders in the same object to be notified of transform changes.
### Fixed
-Fixed bug that caused null ref when attempting to edit a rope with no blueprint.
## [5.0]
#IMPORTANT: Youll need to re-create all your 4.x ObiRope components. Data serialization and workflows are significantly different from previous versions.
### Changed
- Introduced blueprints: particle/constraint object representations are now stored in assets called "blueprints" (as opposed to being stored in the actor itself, as in previous versions). This improves
memory consumption, editor performance, completely separates data from the runtime components that operate on it, and enables easier and faster workflow.
- Non-linear, non-destructive rope editing with instant feedback.
- Simplified underlying engine, constraints are grouped in batches using graph coloring for optimal parallelism.
- Unified handles and pin constraints as "attachments".
- Pin and distance constraints now correctly report forces in Newtons.
- Unitless "Stiffness" parameters have been replaced by "Compliance" parameters in most constraint types, expressed in Newtons/meter.
### Added
- Support for multiple cursors in a single rope.
### Removed
- World space/local space simulation. Simulation is now always performed in solver space.
- Solvers no longer have a maxParticles attribute. They dynamically change their capacity at runtime.
### Fixed
- Crash in certain iOS devices using the A12 cpu.
## [4.2]
### Added
- Remade all sample scenes to work in Unity 2019.1 and above.
## [4.1]
#IMPORTANT: Youll need to re-create all your 3.x ObiRope components, as internal data layout of previous versions as well as serialized GameObject data from previous versions is not compatible with 4.x.
### Added
- Now you can bake the rope mesh anytime, saving it as a new mesh asset in your project. Useful for set dressing and generating static geometry. Only works for ObiRopeExtrudedMeshRederer and ObiRopeMeshRenderer.
- More accurate collision/contact model, using staggered projections.
- Approximate shock propagation for particle contacts. This makes particle stacking easier and stabler. A new parameter has been added to the solver that controls the amount of shock propagation.
- Split material friction into static and dynamic friction.
- Added rolling contacts w/ rolling friction. These are slightly more expensive than regular contacts. Can be controlled on a per-collision material basis.
- Added ObiInstancedParticleRenderer, allows to draw particles as instances of an arbitrary mesh (requires GPU instancing).
- Particle-particle collision callbacks (solver.OnParticleCollision)
### Fixed
- Bug that caused mesh colliders with negative thickness to crash.
### Changed
- More reliable, higher precision algorithm for distance field generation. Specially noticeable in sharp corners/crevices.
## [4.0.2]
#IMPORTANT: Youll need to re-create all your 3.x ObiRope components, as internal data layout of previous versions as well as serialized GameObject data from previous versions is not compatible with 4.x.
### Changed
- Switched the Windows compiler to Clang/LLVM, resulting in a huge performance improvement.
### Fixed
- Null ref exception when copying a ObiCloth component.
- Issue with pin constraints overshooting when solver set to world space mode.
- Issue that prevented pin constraints being torn.
## [4.0]
#IMPORTANT: Youll need to re-create all your ObiRope components, as internal data layout of previous versions as well as serialized GameObject data from previous versions is not compatible with 4.x.
### Added
- New ObiRod actor: advanced rope that models torsion, as well as anisotropic bending and shearing.
- Added 3 new constraint types: Shear/Stretch, Bend/Twist and Chain.
- Achieved zero garbage generation trough the use of new Unity API for camera frustum planes.
### Changed
- All particle buffers (positions, velocities, etc). are now shared between C++/C# using pointers to aligned memory. This completely eliminates the need for copying data back and forth, simplifies the API
and improves performance. The entire Oni.Get/SetParticle* family of methods has disappeared, now you can work with the particle buffers directly.
- Rope rendering modes have been replaced by ObiRopeRenderer components.
### Fixed
- Null ref exception when initializing a disabled actor.
- Bug that caused XPBD to be time step dependent.
## [3.5]
### Added
- Support for 32 and 64 bit Linux architectures.
- Two-way rigidbody interaction for local-space solvers.
- Added world inertia scale.
- ObiCollider now takes a reference to a Collider, enabling the use of multiple colliders in the same GameObject.
### Changed
- Separated world velocity scale into linear and angular components.
- World velocity scale is no longer specified per-actor, but per-solver.
- Better ObiProfiler: it now shows a per-thread pyramid diagram of internal jobs, with more human-readable names.
### Removed
- Solvers no longer have a Collision Layers property. All solvers share the same colliders. Note that you can still use phases to ignore collisions with certain colliders.
- Local space solvers no longer need their own copy of each ObiCollider in the scene, they can all share the same colliders. This results in much higher performance for multiple local-space solvers.
### Fixed
- Added (float3x3) typecast to particle shaders, to be GLES friendly.
## [3.4.1]
### Added
- "Thickness from particles" now works in Custom Mesh render mode.
- Custom Mesh mode now has a "volume scaling" parameter that squashes and stretches the mesh together with the rope.
## [3.4]
### Added
- Perspective-correct particle rendering.
- ObiParticleRenderer now supports custom shaders for rendering.
### Fixed
- Bug that required to disable and re-enable ObiParticleRenderer when moving the actor to a new solver.
- Bug that caused twitching when performing more than 1 physics step per frame when using handles.
## [3.3.1]
### Fixed
- Removed unused variable warnings introduced in 3.3
- Fixed null ref exception when creating a new distance field asset.
- Fixed crash when using multiple solvers in different update modes.
- Fixed some sample scenes lacking collision due to missing distance field.
## [3.3]
### Added
- Support for 2D rigidbody coupling has been brought back.
- Added substepping to the core solver. This allows to update each solver at a different effective frequency, and decouple the Obi
physics loop from Unitys.
- New implementation of fine-grained parallel tasks in core solver, that boosts performance up to x1.5.
- Support for a new type of rope rendering, that can deform any mesh to follow the rope curve.
- Support for a new collision primitive: distance fields.
- Support for per-particle coloring of rope.
- ObiCollider automatically creates ObiRigidbody component if needed when reparenting it.
- Helper script (ObiKinematicVelocities) that calculates angular and linear velocities for kinematic rigidbodies that are transformed around. Useful for continuous collision detection and friction effects against objects that are being moved around using their transform instead of forces.
### Changed
- Near-zero garbage generation for OnCollision and ObFluidUpdated solver events.
- Near-zero garbage generation for rope rendering.
- Constraints.GetBatches() now returns an IEnumerable. This means it cannot be accesed by index. Theres a helper method GetFirstBatch() that returns
the correctly typed first batch, or null if theres none.
### Fixed
- Null reference exception in pin constraints when visualization is enabled.
- Bug that caused asleep particles to miss collisions upon reactivation.
- Bug that caused copying a rope to “steal“ the mesh from the original one.
## [3.2]
### Added
- Support for CapsuleCollider2D.
### Changed
- Rope is still rendered (though not simulated) when the ObiRope component is disabled.
- Colliders/rigidbodies are no longer copied over to the C++ library each frame. Instead, only colliders that have their transform or any collision-related property altered are copied to the solver. This greatly improves performance when many colliders are present, and greatly reduces memory allocation and GC activity.
- AllocateParticles() and FreeParticles() have been merged with AddActor() and RemoveActor() respectively. A new per-particle array “particleToActor” makes it faster and easier to know which actor a particle belongs to.
### Removed
- ObiCollisionGroup has disappeared. It is no longer necessary to manually add colliders to a group, instead each ObiSolver automatically picks up all ObiColliders in a given layer.
- MeshColliders are now always treated as two-sided thin concave meshes. Solid and one-sided modes have disappeared.
### Fixed
- Android issue that prevented some devices from finding the Oni library.
- Removed redundant menu items.
## [3.1.1]
### Added
- New “Line” rendering mode for ropes. This will render the rope as a camera-oriented quad strip, similar to what Unitys LineRenderer does. This is useful for lightweight rendering and 2D games.
- Particle renderer is now much faster and also allocates less memory.
- New “hierarchical” method to generate tether constraints: this method generates more constraints than the traditional “anchor to fixed” approach, but works in the general case even if there are no fixed particles.
### Changed
- Installation is no longer required. Obi now works right out of the box, so the installation window has been removed, and the “Editor default resources” and “Gizmos” folders removed.
## [3.1]
### Added
- You can now choose where should the solver be updated: FixedUpdate, AfterFixedUpdate, or LateUpdate.
- Rope rendering now supports variable thickness, based on particle radii. Enabled by default, disable “thickness from particles” to get uniform thickness regardless of particle radii variations.
- Edit-time preview of “smoothness” rope parameter.
- Utility method to calculate actual rope length.
- Support for triggers. A trigger collider will generate contact constraints, but won´t enforce them.
- Contact structs returned by the OnCollision event now include the contact tangent and bitangent vectors.
- Added per-particle layer properties, for finer collision control.
### Changed
- Faster and more accurate rigidbody impulse application, which results in better collision resolution.
- Greatly improved pin constraint stability for large mass ratios.
- ObiColliderGroups Colliders and Colliders2D properties are now plain arrays: “colliders” and “colliders2D”.
- Memory allocation for rope mesh generation has been reduced by 90%.
- ObiParticleRenderer memory allocation has been greatly reduced, and its performance improved.
- Pin constraints are now always drawn in particle edit mode, not only when the particles are selected.
### Fixed
- Got rid of warnings related to obsolete platform enums in sample scripts.
- Potential bug in GCHandle deallocation affecting upcoming Unity versions (thanks to the guys at Unity for pointing me at this)
- Tearable pin constraints now work correctly.
## [3.0.1]
### Added
- Support for iOS simulator.
- Faster collision contact generation.
### Fixed
- Crash in Crane scene due to a bug in pin constraints.
## [3.0]
#IMPORTANT: Youll need to re-generate all your ropes as internal data layout of previous versions is not compatible with this update.
### Added
- Welcome window with automatic installer.
- Upgraded constraint projection to XPBD (extended position-based dynamics). This decouples stiffness and damping from the amount of iterations, resulting in more realistic simulation.
- Solver constraint enforcement order can now be changed. This allows to change the relative importance of constraints.
- The solver now uses a task-based threading system which allows to exploit parallelism between multiple solvers.
- Custom multithreading profiler, that allows to fine-tune performance.
- Optional local-space simulation, for better numerical accuracy in large-scale worlds and greater control.
- ObiStitcher component allows to stitch together separate ropes.
- Added pencil paint mode to particle editor.
- Automatic self-collisions disabling for particles that intersect in rest pose. This allows to set larger particle radii
to ensure better self-collisions, without worrying about constraint fighting.
- Breakable pin constraints.
- Ropes are now tearable, and custom prefabs can be instantiated at both sides of the tear.
- Rope length can be changed at runtime, using the ObiRopeCursor component.
- Procedural curve geometry smoothing.
### Changed
- Actor particle limit is no longer 16384 but 65536, matching Unitys own vertex limit.
- Particle editor paint brush falloff has ben changed from linear to gaussian.
- Distance constraints compression stiffness has been replaced by a slack percentage.
- Performance improvement in mesh colliders and edge colliders.
### Fixed
- Bug in collision detection against terrains.
- Crash in 32-bit windows systems due to memory misalignment.
- Bug that caused slow convergence and excessive jittering for particle-particle sequential contact resolution.
- Bug in hierarchical grid update that caused a crash in some cases when a hash key collision happened.
- Bug in continuous collision detection that caused particles to be pushed to the other side of very thin objects.
- Bug in ray/bounding box intersection test caused by non-IEEE754 compliant SSE division by zero.
- Bug that caused ObiParticleRenderer to ignore camera culling mask, and render in all cameras.
- Bug that caused a crash under certain conditions in 32 bit systems.
- Bug that caused particle property value field to reset to the value of the last particle when painting.
- Fixed collision stabilization bug that caused particles to sink slightly when over a dynamic rigidbody.
## [1.2]
### Added
- Android support.
- Upgraded constraint projection to XPBD (extended position-based dynamics). This decouples stiffness and damping from the amount of iterations.
- Solver constraint enforcement order can now be changed. This allows to change the relative importance of constraints.
- Welcome window with automatic installer.
- Resolution-preserving method to change rope length dynamically.
- Added pencil paint mode to particle editor.
- Optional local-space simulation, for better numerical accuracy in large-scale worlds and greater control.
- Custom multithreading profiler, that allows to fine-tune performance.
- Better particle visualization in editor.
- Breakable pin constraints.
### Changed
- Actor particle limit is no longer 16384 but 65536, matching Unitys own vertex limit.
- Particle editor paint brush falloff has ben changed from linear to gaussian.
- Distance constraints compression stiffness has been replaced by a slack percentage.
### Fixed
- Bug that caused an index out of bounds exception when initializing rope with zero resolution.
- Bug that caused an error message regarding MeshFilter destruction when entering play mode with a rope selected in the hierarchy.
- Bug that prevented the particle editor window from appearing on retina displays.
- 1-frame delay between particle and rigid body physics, which affected pin and collision constraints.
## [1.1]
### Added
- MeshColliders are now fully supported.
- Support for 2D physics, Box2D, Circle2D and Edge2D colliders.
- Chain rendering.
- Sleep threshold that keeps particles fixed in place when their kinetic energy is low.
- Chain constraints, that allow for 100% inextensible ropes.
- Rope thickness, twist, cap sections and section shape can now be changed without the need to re-initialize the rope.
- Required constraint components are automatically removed from the object when removing the rope component in editor.
### Fixed
- Issue with box colliders, that caused incorrect contact generation in corners when using contactOffset.
## [1.0.0] - 2015-07-16
- Initial release.