Generic Rigid Body Constraint Bug #79954

Open
opened 2020-08-20 15:08:44 +02:00 by Zachary Litvinenko · 30 comments

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.
M0DJ38oWQo.mp4

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.
**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. [M0DJ38oWQo.mp4](https://archive.blender.org/developer/F8796708/M0DJ38oWQo.mp4) **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.

Added subscriber: @ZackMercury-2

Added subscriber: @ZackMercury-2

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

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.

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.

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

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Zachary Litvinenko self-assigned this 2020-08-21 10:40:57 +02:00

Changed status from 'Resolved' to: 'Archived'

Changed status from 'Resolved' to: 'Archived'

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

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

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'
[ZBlrg8C6TO.mp4](https://archive.blender.org/developer/F8803594/ZBlrg8C6TO.mp4)

how do I revive this report

how do I revive this report

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

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

Changed status from 'Resolved' to: 'Needs User Info'

Changed status from 'Resolved' to: 'Needs User Info'

In #79954#1000670, @ZackMercury-2 wrote:
how do I revive this report

I am not sure if you can.

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

> In #79954#1000670, @ZackMercury-2 wrote: > 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
bug twitching.blend

Oh sorry I forgot that There you go [bug twitching.blend](https://archive.blender.org/developer/F8839176/bug_twitching.blend)
Zachary Litvinenko was unassigned by Sybren A. Stüvel 2020-09-07 14:02:09 +02:00

Added subscribers: @ZedDB, @dr.sybren

Added subscribers: @ZedDB, @dr.sybren

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, @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 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, @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.

  2. 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:
bug twitching1.blend

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) 2. The bodies are placed too close to each other and a intersecting from the start. This will lead to general instability. 3. 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: [bug twitching1.blend](https://archive.blender.org/developer/F8850839/bug_twitching1.blend)

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
    PNLJs17GRj.mp4
    bug twitching 2.blend
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 [PNLJs17GRj.mp4](https://archive.blender.org/developer/F8889571/PNLJs17GRj.mp4) [bug twitching 2.blend](https://archive.blender.org/developer/F8889578/bug_twitching_2.blend)

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)

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
BFv90678qv.mp4

also I checked the file you sent and it looks like this [BFv90678qv.mp4](https://archive.blender.org/developer/F8891567/BFv90678qv.mp4)

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):
rec_30.mp4

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

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): [rec_30.mp4](https://archive.blender.org/developer/F8891846/rec_30.mp4) I can also still reproduce the general weird general constraint behavior. Thanks for providing a better test file!

@ZedDB How do you think this report should be classified? Bug? Known Issue?

@ZedDB How do you think this report should be classified? Bug? Known Issue?

@dr.sybren We can do it as bug atm.
We'll see if things get better after I have cleaned up the spagetti rigid body code in blender.

This might also be an issue with bullet itself. But it will be easier to tell after the cleanup.

@dr.sybren We can do it as bug atm. We'll see if things get better after I have cleaned up the spagetti rigid body code in blender. This might also be an issue with bullet itself. But it will be easier to tell after the cleanup.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Added subscriber: @pauanyu_blender

Added subscriber: @pauanyu_blender

In #79954#1022355, @ZedDB wrote:
This might also be an issue with bullet itself. But it will be easier to tell after the cleanup.

Do you have a task number for this, so that we can properly link them together?

> In #79954#1022355, @ZedDB wrote: > This might also be an issue with bullet itself. But it will be easier to tell after the cleanup. Do you have a task number for this, so that we can properly link them together?

@dr.sybren not yet, I talked to Brecht and Sergey about it and it seems like I should probably make a bigger proposal and design about this.

I could of course try to just make the current approach nicer, but I think maybe thinking ahead a bit and preparing for "everything nodes" here would be good.
This is so that I don't do a big rewrite and then we have to do an other big rewrite relatively soon after I'm done with it.

However I haven't had time yet to discuss this with Sergey as I would want this to work more like a modifier of sorts instead of having it be this special edge case as it is now.
(By modifiers are not allowed to touch the objects transform, so we have to do some more back and forth here).

@dr.sybren not yet, I talked to Brecht and Sergey about it and it seems like I should probably make a bigger proposal and design about this. I could of course try to just make the current approach nicer, but I think maybe thinking ahead a bit and preparing for "everything nodes" here would be good. This is so that I don't do a big rewrite and then we have to do an other big rewrite relatively soon after I'm done with it. However I haven't had time yet to discuss this with Sergey as I would want this to work more like a modifier of sorts instead of having it be this special edge case as it is now. (By modifiers are not allowed to touch the objects transform, so we have to do some more back and forth here).

Added subscriber: @Tiok

Added subscriber: @Tiok

broken_rigidbody_constraint.blend
0001-2758.mp4
System Information:
Operating system: Windows 10
Graphics card: NVidia GeForce RTX 3050 Ti

Blender Version:
Broken: 3.0.0

I found a lingering problem with the rigid body constraint as well.
A very simple scene consisting of 2 cubes and 1 "Generic" rigid body constraint.
I did 4 cases of a pendulum:

  1. Fixed center of rotation;
  2. Z-axis slack of 1 m;
  3. Z- and Y-axis slack of both 1 m, and;
  4. Small offset on the pendulum in the y-axis of 0.01 m.
    Complete detail is in the blend file and the video above. For the first three cases, everything was working well. For the fourth case, the small offset created an energy-gaining motion. I hope this helps pinpoint the origin of the bug. Thank you and cheers!
[broken_rigidbody_constraint.blend](https://archive.blender.org/developer/F12805396/broken_rigidbody_constraint.blend) [0001-2758.mp4](https://archive.blender.org/developer/F12805395/0001-2758.mp4) **System Information:** Operating system: Windows 10 Graphics card: NVidia GeForce RTX 3050 Ti **Blender Version:** Broken: 3.0.0 I found a lingering problem with the rigid body constraint as well. A very simple scene consisting of 2 cubes and 1 "Generic" rigid body constraint. I did 4 cases of a pendulum: 1. Fixed center of rotation; 2. Z-axis slack of 1 m; 3. Z- and Y-axis slack of both 1 m, and; 4. Small offset on the pendulum in the y-axis of 0.01 m. Complete detail is in the blend file and the video above. For the first three cases, everything was working well. For the fourth case, the small offset created an energy-gaining motion. I hope this helps pinpoint the origin of the bug. Thank you and cheers!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#79954
No description provided.