Repository navigation
Angular velocity, HLSL mesh transforms, collision mechanics - #5
WrathfulSpatula wants to merge 1202 commits into
Conversation
|
The collision mechanics are experimental, and that part I only present as such. Working on them more, I'm catching physical logic errors, but they are at least relatively stable between low player velocity and player velocity close to the speed of light. (That is, they at least naturally don't "bug-out" by deflecting a rigidbody at close to (or past) c, if that wouldn't make qualitative physical sense.) I will do more on collision. Perhaps the game lab can run with this. The angular velocity handling in the shaders works by calculating a tangential velocity due to object rotation, and it relativistically adds the tangential velocity to the center-of-mass translational velocity to find a total velocity for each vertex. This component is physically simpler than collision and easier to verify, but the corresponding code could be easily commented out or removed, while keeping the new mesh geometry shader and various added shader optimizations. |
|
I know there's a huge amount of work to review here, but I'm getting to the point where I'm ready to use this in my own game, so my commits are going to slow down. This fork is the product of combining your OpenRelativity engine with non-overlapping features from my own special relativity engine, which was codenamed "Tachyoid." In brief, here are the major additions: -Rigidbody and collision mechanics. -Accelerated frames and "gravity" (i.e., applied Newtonian fields with Einstein equivalence principle) -Relativistic collider mesh transformation -General optimization and housekeeping Hope you get some mileage out of it. I was educated in physics, and I work as a software developer, and I already had a special relativity engine project with almost no overlap with yours, so it just made sense to combine the two engines for my own games. Thank you for your insightfully designed, clean, and awesome engine! |
|
(Just realized I introduced a "pop" in the shader on the last commit, but I'm fixing it right now. I do have a version of your shaders working on Google Cardboard.) |
|
As this PR hasn't been closed, I want to apologize for not knowing what I was doing with Github, back when I opened this. Without branches, I basically blew the opportunity for systematic code reviews. However, whether the original OpenRelativity project does anything with the large amount of work I added to it, for which I'm maintaining the MIT license, I'm available to go over anything and everything in my fork, piece-by-piece. Thanks again! |
|
Closed in favor of #15, and thanks again! |
As per email exchange, here is a fork that adds angular velocity support to shaders, includes a compute shader for up-pipeline mesh transformations, and attempts basic collision mechanics. (In addition to general housekeeping.)