You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement restitution and friction (might make sense to implement physics materials at this point unlike what I initially thought)
Implement torque and angular velocity in components and add them to integration systems
Implement contact points on collision
Implement solving for collisions with rotation
Detour
Upon discovering that XPBD is patented by NVIDIA, it may be a good idea to change our solver at this stage. In Erin Catto comparison of multiple solvers in Solver2D, TGS Soft seems to be a good bet. We should look more into it before doing anything else.
Divide physics material friction into static and dynamic
Look into how we can make fully elastic collision (even with bounciness at 1 bodies will loose some energy, this may require messing with damping on integration)
Docs
Improve documentation with use examples (and tags).
Other known issues
Applying impulses without delay on physicsApplyForcesTag does not work (essentially on first frame)
Decide how to represent infinite mass (and inertia) for bodies.
Currently the bodies rotate if falling straight into the ground, which shouldn't happen, warm-starting and contact cashing could solve this, but it's yet to be seen.
Look into rapiers way of applying friction in 3D.
Currently bodies behavior still looks a bit weird, we should look into this, particularly, soft constraint parameters
Problem
Currently our physics engine completely disregards rotation.
Checklist
Detour
Upon discovering that XPBD is patented by NVIDIA, it may be a good idea to change our solver at this stage. In Erin Catto comparison of multiple solvers in Solver2D, TGS Soft seems to be a good bet. We should look more into it before doing anything else.
Constraints
Rigidbody Physics v0.1
PhysicsForce
andPhysicsImpulse
components to handle rotation #865Stability and Optimization
Rigidbody Physics v0.2
Docs
Other known issues
Problem
Currently our physics engine completely disregards rotation.
References
Overall solver stuff:
High level description of the solver:
https://box2d.org/posts/2024/02/solver2d/
Solver2D implementation:
https://github.com/erincatto/solver2d/blob/main/src/solve_tgs_soft.c
Box2D v3.0 implementation, only got restitution from here at this point:
https://github.com/erincatto/box2c/blob/1d7d1cf14722a06f6a7b1c3b0850e70bcbec8558/src/contact_solver.c#L347
Iterative Dynamic Paper, not the easiest to read, can't remember exactly what I got from here:
https://box2d.org/files/ErinCatto_IterativeDynamics_GDC2005.pdf
Sequential Impulses, very relevant:
https://box2d.org/files/ErinCatto_SequentialImpulses_GDC2006.pdf
Soft Constraints, also very relevant:
https://box2d.org/files/ErinCatto_SoftConstraints_GDC2011.pdf
Formulas for collision response, where I got the separation impulse formula without the rotations:
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/physicstutorials/5collisionresponse/Physics%20-%20Collision%20Response.pdf
Allen Chou post on the matter:
https://allenchou.net/2013/12/game-physics-resolution-contact-constraints/
Only Friction:
https://www.gamedev.net/forums/topic/613945-sequential-impulse-bias-velocities/
https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=8658
https://www.gamedev.net/forums/topic/673822-contact-tangents/ (what I meantioned on github)
https://gamedev.stackexchange.com/questions/179606/how-to-calculate-plane-corner-vertices-from-plane-origin-point-and-plane-normal (find tangents for friction)
Angular Motion:
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/physicstutorials/3angularmotion/Physics%20-%20Angular%20Motion.pdf
Manifolds and collision points:
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/previousinformation/physics5collisionmanifolds/2017%20Tutorial%205%20-%20Collision%20Manifolds.pdf
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/physicstutorials/4collisiondetection/Physics%20-%20Collision%20Detection.pdf
Also used the structures to hold the date in Box2D/Avian for reference
Code: https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/previousinformation/csc8503coderepository/
Collision Response:
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/physicstutorials/5collisionresponse/Physics%20-%20Collision%20Response.pdf
Box2D/Avian/Box2c
The text was updated successfully, but these errors were encountered: