Page MenuHome

Generic Rigid Body Constraint Bug
Needs Information from User, NormalPublic

Description

System Information
Operating system: Windows 10
Graphics card: Radeon RX 470

Blender Version
Broken: 2.83.0
Worked: Unknown if it ever worked

Short description of error
Angle limit not only doesn't work but causes weird neverending twitching back and forth
UPDATE:
Twitching happens for both cases when both rigid bodies are active and when one of them is passive.

Exact steps for others to reproduce the error

  1. Add 2 rigid bodies, 1 active, 1 passive animated
  2. Position them active on top, passive on the bottom
  3. Add an empty in between them, add a rigid body constraint to it, select the 2 rigid bodies in its settings, uncheck disable collisions.
  4. Change the joint type to Generic, limit location to 0-0 on each axis.
  5. Play. Now it works, once you select the passive RB and move it it should behave normal.
  6. Undo. Check angle limit on Z and choose some angle range (I had it set to -30 to 30).
  7. Play. Move the passive RB and watch it breaking.

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Needs Information from User.Aug 21 2020, 6:13 AM

Can you check if this happens in latest development build? https://builder.blender.org/download/

If there is bug still, please upload simple example file.

Ok it works in latest development build blender-2.90.0-05e1ccf10836-windows64! I'm sorry for being lazy to check it at first.

Zachary Litvinenko (ZackMercury) changed the task status from Resolved to Invalid.Sat, Aug 22, 4:34 PM

Ok so I didn't have this problem in the simpler setup I described above, but when I added a more complex setup the twitching returned

Zachary Litvinenko (ZackMercury) changed the task status from Invalid to Resolved.Sat, Aug 22, 4:35 PM

the only thing I want is to have shoulder joint, so that it can move around but can't twist... or be able to twist with a certain threshold

Richard Antalik (ISS) reopened this task as Needs Information from User.Tue, Aug 25, 4:06 AM

how do I revive this report

I am not sure if you can.

Please upload example file, otherwise I can not confirm the issue.

Oh sorry I forgot that
There you go

The bug report describes only two bodies and an Empty. The uploaded file is much more complex, even with an armature and bone constraints. Following the comments, it looks like the steps to reproduce in the task description don't reproduce the issue.

Having said that, @Sebastian Parborg (zeddb) is working on an improved integration with the Bullet library (which manages the physics simulation). It could very well be that this twitching will be gone then as well.

The twitching issue is not solved with my update.

The issue here stems from multiple issues:

  1. The rigidbody world seems to have been broken/corrupted somehow.

If you remove all the constraints and move the bodies so that they are well away from each other, they will still twitch around or go flying.

This can be solved by removing the rigidbody world and re adding all of the bodies again. I wonder how it go into this state. The file is kinda messy so it is hard to tell.
(There seems to have been multiple worlds and rigidbody setups done in it)

  1. The bodies are placed too close to each other and a intersecting from the start.

This will lead to general instability.

  1. The "generic" constraint type doesn't seem to play nicely in this scenario.

The hinge constraint works much better.

Nr 1 I need to know the steps you did to manage to break the world simulation to be able to fix.
Nr 2 I can't fix, you just have to space them out properly so they have enough room.
Nr 3 will need some more research before we can tell if it an issue with blender or with bullet.

Here is as test file with the changes I did to make it stable:

Hello again. I recreated a similar setup in a new clean file.

  1. now the file is clean and has only 1 rigid body world. I did nothing in it besides adding a few boxes and empties between them.
  2. they are not intersecting at the start anymore


apparently the z angle limit doesn't work either since you can see them turning freely way more than 30 degrees (since my angle limit was -15 to 15)

also I checked the file you sent and it looks like this

You probably are using an older blender version. You need to use a build from the 2.91 branch to get my example file to behave better.
(And also increase the new "Substeps per frame" in the world settings to 10 or so):

I can also still reproduce the general weird general constraint behavior.
Thanks for providing a better test file!