-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joint Solver Incorrectly Bends Certain Characters (Bug Bounty) #9
Comments
My first observation is that the problem is more or less apparent with all limbs. My second observation is that, with the default character limb, the angle between the initial shoulder-elbow vector and the elbow-wrist vector is a lot wider than that of the other limbs. My guess is that this angle has an effect on the final result. In the solver function, adjusting Z-angle of the My solution is to offset the elbow angle with this initial shoulder angle. This way, limbs with shallower shoulder angles are corrected less, while wider shoulder angles are corrected more. Applying the full angle appears to correct it too much, so a separate factor is included to reduce the impact. A factor of 0.5 seems to work best. Here is an example, and an updated demo: The lower row is the original solver, and the upper row is the new solver with the elbow correction applied. |
The obvious problem is that the elbow has too many degrees of freedom. It's meant to be a hinge, and the shoulder and wrist are basically ball&sockets. It also doesn't take into account the relative orientations of the joints. Doing this properly would require a more advanced solver that simulates proper joints with limits. Thinking about it this way, it occurs to me that implementing these things would be redundant. Why do this when Roblox already has a working IK solver with all the needed constraints? In fact, Roblox's animation plugin utilizes the solver by temporarily connecting preconfigured constraint objects to the model. These constraints could be ripped right out and applied to the VR model. Unfortunately, the problem then is that the solver is limited to plugins only: The other option is to try to run them with actual physics. This seems like it could be possible without too many artifacts. I don't have VR, so I can't know how well it works in practice. Regardless here's a demonstration, using the constraints provided by the animation plugin: Driving the character's hands directly with the hand controllers is pretty much a disaster. Instead, separate "control" parts are driven directly by the hand controllers, then the character's hand's are approximated to these using AlignPosition and AlignOrientation. OneAttachment mode could be used here instead of parts, where the hand controller's CFrame directly sets the corresponding align constraints. |
Relying on physics with constraints is an interesting idea but risks breaking compatibility with certain games. Having a character model go from An interesting hacky workaround would be simulating the limbs on a ghost model and replicating the changes to the character. Without trying it out, it seems like it would be 1 frame behind for rendering though. |
Hey! After tinkering around for a few hours, I came up with a solution that might just be the one. I added the argument |
I honestly do not know why that occurs, but an issue like that was bound to happen. |
Would this be a proper solution? I made it revert to the old solver if Peek.2022-07-04.10-27.mp4It will snap to it which is kind of a downside, but this is the best I can do off the top of my head right now |
It is better but I don't think I want to accept the solution if it results in that for that body type. |
The bounty is in limbo now with the |
Not sure if it's of any use but, here's a decent lead: I don't think a proper solution is possible through a single iteration like the one that's currently in NexusVR - most IK systems in other leading engines, and general 3D software (Unity & Blender are good examples) also uses iteration-based solutions. |
Do you figure that's related to the new SimHumanoidPhysics FFlag, and Humanoid seemingly getting a ControllerManger in the future? I'm optimistic about what this could bring I've been eagerly watching changes to PlayerModule scripts waiting for some clues on this. Yesterday I was trying to work out some camera issues integrating Nexus VR Character Model with a modified EgoMoose wallstick controller, and noticed CameraModule.VRCamera got a bunch of changes tied to FFlagUserFlagEnableVRUpdate3 I'm hoping might help with VR BillboardGui orientation later. (FFlagUserFlagEnableVRUpdate3 still = false, so will worry about that another time) The new API has Instance classes for AirController, ClimbController, GroundController, and SwimController. I've been working on a game that really requires local gravity vectors and magnitude as well as client-specific camera UpVector. It's been a frustration that the underlying character movement behavior is a total blackbox behind Player.Move/Humanoid.Move forcing us to work around hard coded side effects like
I'm happy the recent roloxapi changes show the new AirController has a CancelAirMomentum bool which solves one of those problems. The ControllerManager has a Vec3 FacingDirection and MovingDirection which could solve the rest? I'm not stoked that the old black box C function is being replaced by more complicated hard coded behavior that can't be replaced by lua. I'm fully expecting roblox to ignore the facing vector for detection of climbable surfaces. The new classes were not browsable in studio yesterday, but after I updated studio today, they are. (ControllerManager, GroundController, etc) If anyone has any insight on where this and the character IK is heading, I'd love to know! |
From what I heard from several engineers, this sounds correct, but not much is public yet and only the |
Turns out I misspoke before - it is |
The Issue will be closed once a new release is created with |
Single question, have you found a solution to make the elbows bend properly so far using |
From my tests on the latest (NOT second-latest) release, it works just fine. Issues you notice should be posted on the announcement thread. |
Heads up: I am pulling the bug bounty on February 28th, 2023 if no one claims it. |
The new IKControl constraints beta seems like it may be the solution to this. It takes some time to tune constraints and they still aren't quite right. We'll see if this can replace the current math when it exits the beta. RobloxStudioBeta_MnPbBwz2GS.online-video-cutter.com.1.mp4 |
Roblox's new |
Version 2.7.0 is up with |
A long-standing flaw of Nexus VR Character Model since version 1 is how limbs are calculated. Version 1 worked well for the default package, but not for custom packages. In the case of version 2, this is the opposite. It works mostly fine for custom packages:
But with the default character, it causes the arms to bend at the elbows:
The effects in V1 of the math not being optimal resulted in no graphical issues but the position of the hands was off. In V2, this leads to the default character looking ugly for everyone. Those who want to tinker with this can do so with the following test file:
ArmMathDemo.zip (place files not supported for upload on GitHub)
I have spent a lot of time on this issue with no success on improving the situation. The current code works but leads to graphical issues, which has resulted in a lot of players reporting this bug. However, this bug has existed since the start of V2, which was released over a year ago. I want to get this resolved, and I am putting a 100,000 Robux bounty on a Pull Request that gets this resolved. The provided test file can be used as a base with final changes put in the Appendage.lua file. For the bug bounty, I am only looking for a successful demo with complete code or a pull request with the working code. Ideas can be discussed but won't be accepted unless someone acts on it.
The text was updated successfully, but these errors were encountered: