found work around for compound assembly issues, #42400
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#42400
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?
when assembling a compound body inside a function the objects physics bound was incorrect, also the objects physics bound (child) was left where the object was when assembled,
a work around was to do
(calculations for assembling)
assembling function (center of mass etc)
function(create mesh libNew and parent children and assign mass of "centroid")
for all parts in assembly
removeParent()
disableRigidBody()
suspendPhysics()
setParent(centroid libNew host)
however after doing this, once the object is removed from the assembly with "removeParent" it still had the complex compound shape bounds in physics,
so
for removed objects:
add new copy of object
set properties
end old object
works around all issues.
Changed status to: 'Open'
Added subscriber: @JacobMerrill-1
https://www.youtube.com/watch?v=EZFewOI_nCY
working assembly system in game
Added subscriber: @mont29
I can’t I understand what’s the issue nor topic really here… is it about GE? Blender itself? Is it a bug report? something else?
Please follow our submission template and instructions, it really helps sorting things out…
There was a bug in the game engine, "ending object crashes game engine" that was related to ending the child of a compound object,
another bug, related to this was about the shape bounds not moving when a object was assembled (it left the physics bound of the child where it was when parented)
I found workarounds for both of these issues,
ending compound object child not crashing game
object.removeParent()
object.disableRigidBody()
object.suspendDynamics()
object.endObject()
as for the shape bounds,
I did a similar thing
for objects in new assembly:
object['Root']=parent
object.removeParent()
object.disableRigidBody()
object.suspendDynamics()
object.setParent(object['Root'],1,0)
so, this updated bullets shape bounds on the compound object right after assembly.....
basically I found my own problem and it was related to rigid body assembly, incorrect shape bounds, "ghosts" of objects physics bounds,
and when a object was disassembled it would have "ghosts" in it's physics bounds....
issues I found and worked around
1.in physics visualization shape bound was not correct for my rigid body assemblies
if you ended a child of a compound shape/rigid body it crashed the engine
if you removed a compound assembly object it carried with it "junk" (it could not be moved but could rotate....)
solutions
1 = reparented same objects after disabling rigid body and dynamics (after initial assembly)
2 = remove parent remove rigid body remove dynamics then remove object
3= add in new copy of component , copy properties from old object - end old object
Thanks for the clarifications.
Added subscriber: @JorgeBernalMartinez
Jacob, we need blends for the both issues that you commented. This way we can check the possible bugs.
thanks.
ok
File
Assemblysimplified(1) {F179643}= Problem (press P, then press space) see the floating white cube?)
AssemblySimplified2 = work around
turns out it has to do with applyMovment + setParent in the same frame.
setParent then apply movement does not update the physics of the child shape bound.
(I lost most of my old files so I don't know if the other problems I ran into were user error or?)
AssemblieSimplified2.blend
https://youtu.be/fpS9mygynRk
video of exposing the undesired activity,
and the work around,
1 when a object is compound parented, if it is moved after parenting, it leaves the physics mesh, and only moves the graphics mesh.
2 If applyMovement is done, in a frame before parenting, the movment never happens (at least in this case)
a work around for number 2 = use object.worldPosition, and get the world vector you need for local movment using
desired=object.worldPosition+(object.worldOrientation*Vector([x,y,z]))
Closed as duplicate of #40427