motor constraint isn't working #113234
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#113234
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.99
Blender Version
Broken: version: 4.0.0 Beta, branch: blender-v4.0-release, commit date: 2023-10-01 16:56, hash:
4d3534401060
Broken: 2.91.0
Worked: 2.90.1
Caused by
1aa54d4921
Short description of error
motor constraint has no effect
Exact steps for others to reproduce the error
open attached blend file and press play. Move the cone empty on the x axis to change the speed of the tanks back wheels which are driven by the motor constraint. The empties are aligned so the x axis oriented correctly with rotation as described in the user manual.
Can confirm, will check
Pretty sure this was caused by
1aa54d4921
OK, so while there are a couple of dependency cycles detected, (such as the following), it was still somewhat working prior to above commit :
So #87085 is related (as is the fix for forcefields
f4d8382c86
)And in a bold move to rectify this, if I up the
Target Velocity
&Max Impulse
in the motor constraint by a factor of 81 (see #87085 for the reasoning), I am getting comparable results.Tempted to set this to High prio for a bit, to get input from @ZedDB and @LukasTonne to see if this is something that can be fixed easily. Situation now (that the influence
Target Velocity
&Max Impulse
have on the simulation depends on the substeps) is pretty much broken.Of course feel free to lower priority again (since this area is not well maintained -- and it is quite an old bug)
I can't even run 2.90 on my linux work machine any more, hard to tell what this would actually look like before 2.91. I don't intend to spend much time on this, but likely that motors also have some kind of update that needs to be repeated each substep, similar to force fields.
I'm not sure if it's any use, but here's a much simpler version. In this one the motor does begin to work, but after a few iterations it causes all constraints to just explode. I've checked all the margins are small enough, and also increased the steps and substeps quite high. Without the motor constraint no explosions happen. Could it be a conflict of some type between the spring code and the motor code? There are no dependency cycles in this one.
I'm pretty sure the instability in the car example is caused by a known issue with the "Generic Spring" (aka 6DoF) constraint: When the angle reaches 90 degrees it goes into gimbal lock and becomes unstable.
https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=12159
I attached a modified version that uses simpler hinge constraints and works just fine.
Thanks @LukasTonne that's cool but no suspension. I think i've found the cause of the bug though, it works fine if you add the constraints via the object menu, but not when adding them manually. I guess some bit of necessary code is present in the object menu implementation but not when adding the constraints from the empty's physics tab?
Here's the working version created by selecting the wheel then the car body, going to the object -> rigid body -> connect, and choosing spring generic with location selected. The motor was also added from the object menu.
actually, scrap that, I've found the issue is the spring constraint only works if it's y axis points backward or forward, and it's x axis aligns with the wheel rotation as shown below. I'm not sure why that would be, and the manual doesn't suggest it's necessary: