Compound Physics - Origin does not shift. #40340

Closed
opened 2014-05-24 18:14:03 +02:00 by Jacob Merrill · 11 comments

Compound_center_of_gravity_bug.blend

CompoundParentingPhysicsBug.blend

System Information
Any

Blender Version
2.7a

Short description of error
Origin does not shift on compound parent, and if a compound physics bounded item is parented to another compound, it leaves an invisible copy of the physics item of the child.

Exact steps for others to reproduce the error
press play

in example two the instructions are included in a text.

[Compound_center_of_gravity_bug.blend](https://archive.blender.org/developer/F90606/Compound_center_of_gravity_bug.blend) [CompoundParentingPhysicsBug.blend](https://archive.blender.org/developer/F90607/CompoundParentingPhysicsBug.blend) **System Information** Any **Blender Version** 2.7a **Short description of error** Origin does not shift on compound parent, and if a compound physics bounded item is parented to another compound, it leaves an invisible copy of the physics item of the child. **Exact steps for others to reproduce the error** press play in example two the instructions are included in a text.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JacobMerrill-1

Added subscriber: @JacobMerrill-1

Added subscriber: @raco

Added subscriber: @raco

In example two probably also another issue presents itself. In the Physics Properties both Cubes have 'Compound' checked. One is parented to the other, with 'Compound' checked in the Parent Actuator. This causes only the visible mesh to be updated. This is a different issue than the center of gravity bug. Just for your information.

In example two probably also another issue presents itself. In the Physics Properties both Cubes have 'Compound' checked. One is parented to the other, with 'Compound' checked in the Parent Actuator. This causes only the visible mesh to be updated. This is a different issue than the center of gravity bug. Just for your information.
Bastien Montagne changed title from Compound Physics - Origin does not shift, and if a compound physics bounded item is parented to another compound, it leaves an invisible copy of the physics item of the child. to Compound Physics - Origin does not shift. 2014-05-24 21:15:04 +02:00

Added subscriber: @Moguri

Added subscriber: @Moguri

In Bullet, the shape's transform matrix is it's "center." When adding objects to a compound shape, we don't adjust the parent's transform matrix. We could probably do this, but it requires digging through our physics code and possibly breaking games. A work around is to just create a small, invisible cube that you want to be your "center of gravity" and make it the root of the compound object. Any further objects added to the compound shape will be added relative to the root.

In Bullet, the shape's transform matrix is it's "center." When adding objects to a compound shape, we don't adjust the parent's transform matrix. We could probably do this, but it requires digging through our physics code and possibly breaking games. A work around is to just create a small, invisible cube that you want to be your "center of gravity" and make it the root of the compound object. Any further objects added to the compound shape will be added relative to the root.
Member

Added subscriber: @brita

Added subscriber: @brita

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Mitchell Stokes self-assigned this 2014-07-01 06:20:46 +02:00

Closing this as "Won't Fix". The supplied work-around I think is acceptable, and trying to "fix" this bug could just result in more physics bugs (and possibly breaking existing games).

Closing this as "Won't Fix". The supplied work-around I think is acceptable, and trying to "fix" this bug could just result in more physics bugs (and possibly breaking existing games).
Author

What about adding a command

joinCompoundObjects([list objects]) that does the for-mentioned

Get center of mass

Get Mass

Add compound object "Root"

Parent top of Hierarchy chain to root?

(or something smarter)

using a python function or class?

What about adding a command joinCompoundObjects([list objects]) that does the for-mentioned Get center of mass Get Mass Add compound object "Root" Parent top of Hierarchy chain to root? (or something smarter) using a python function or class?

I agree it would get too messy, but I don't think this work-around is perfect enough, let alone fitted to add as a function to the API. I don't think you can't even call it a work-around, because the result is far from perfect. There's still the collision mesh of the added 'parent' object to consider. Even if this would be cube as small as a grain, its vertexes would still interfere with collision. Here's a blend to illustrate this: Compound_centroid_work-around_flaw.blend

A solution for this maybe would be to add compatibility with Material Physics for Compound objects. Currently if the Compound parent would have a material with Physics disabled, this would cause all added geometry to have no Physics enabled as well. So if Compound parenting would also take into consideration the Materials of the children, then we could have a complete work-around.

I agree it would get too messy, but I don't think this work-around is perfect enough, let alone fitted to add as a function to the API. I don't think you can't even call it a work-around, because the result is far from perfect. There's still the collision mesh of the added 'parent' object to consider. Even if this would be cube as small as a grain, its vertexes would still interfere with collision. Here's a blend to illustrate this: [Compound_centroid_work-around_flaw.blend](https://archive.blender.org/developer/F96254/Compound_centroid_work-around_flaw.blend) A solution for this maybe would be to add compatibility with Material Physics for Compound objects. Currently if the Compound parent would have a material with Physics disabled, this would cause all added geometry to have no Physics enabled as well. So if Compound parenting would also take into consideration the Materials of the children, then we could have a complete work-around.
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
4 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#40340
No description provided.