Compound Collision "Splitting" Problem [SOLVED]

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Compound Collision "Splitting" Problem [SOLVED]

Postby MeltingPlastic » Wed Aug 15, 2018 12:56 pm

Hi Julio,

I am working with compound collisions trying to get compounds to work with my scene hierarchy.

In the following video, multiple "Nodes" each with rigid body and collision shape components are parented to each other in a single branched "tree". I have made each shape a cone to indicate that is "points" to it's child.

When the nodes are attached to each other the engine finds the most root node and dynamically rebuilds a new body with a compound collision recursively using all it's children's collision shapes.

When this "body rebuild" function is run the blue and red orb is shown on the body that is being rebuilt.

I am running into a bug that I cant explain and after a numerous re-writes still is an issue for me. When ever I separate one of the children and set is as a new "root" node. It is rebuilding with its children fine. and the previous tree is was attached to is rebuilding fine. but an old tree that is not even connected during the action loses all collision with the ground and passes through:
https://youtu.be/GmErecb-Q7g

At this point where I right click - I have debugged and I am not messing with the old tree in any way.

As far as I can tell every root node in the scene is its own rigid body and every compound that they build is a new instance that is bound to that rigid body.

Any Ideas on something fundamental I could be doing wrong?

Here is a debug build of the demo:
https://drive.google.com/open?id=16acZXCRfa6D9A10oBM4sfo35C0qx-pni
Thanks in advance!
Last edited by MeltingPlastic on Mon Sep 03, 2018 11:46 am, edited 1 time in total.
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Thu Aug 16, 2018 11:17 am

that seems weird, I check this weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Wed Aug 29, 2018 7:56 pm

Is there a function call I could put a debug in that would help catch this problem? What are possible causes for a body to fall through scene collision?
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Wed Aug 29, 2018 11:39 pm

O could not check that bug last week with the forum down, I will try this weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Fri Aug 31, 2018 3:57 pm

Thanks for taking the time to look at it. I just pulled from master and made a new demo as well that has a new crash that must have been introduced. The demo is very simple - It just spawns the ground floor with nothing else (you can spawn objects with the middle mouse button if you want to):

commit: 490a0e84f84f24a163e8fbe5e108b8f0a2c59f70 ("added final collision optimization"):
https://drive.google.com/open?id=1CwQaFN5Rw51u6lyRCIgR3McKGM-tD1qX

Let me know if you want a newer demo with the compound but this error always comes up first no matter what so I thought it would be better to tackle it first.
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Fri Aug 31, 2018 5:23 pm

I expect there can but some bug yes, thank for testing I will try fix tonight
is that link a repro demo?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Fri Aug 31, 2018 5:49 pm

Yeah thats a debug build of the demo with dlls.
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Sat Sep 01, 2018 2:55 pm

ok that bug is fixed
https://drive.google.com/open?id=1CwQaF ... cKGM-tD1qX

can you sync and try to make a repro for the compound collision bug, I am no sure if the original still works.

edit:
never mind the original repro still works, I did no knwo who to cut the shape.
it seems a very strange bug, let me see what it is.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Sat Sep 01, 2018 4:50 pm

Awesome, I just did a test with the basic floor only build with the latest newton commit and the initial error related to sleep sanity is fixed.

However now if you try pressing the middle mouse button directly after spawning you get another Assert on dgIntersections.h: line 145
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Sat Sep 01, 2018 5:42 pm

ah, that was and actual real bug.
thanks for the repro, it is fix it now.

however I see you are setting your object to be in continue collision.
I will ask not to do until I get there, the latest optimization do no cover CCD yet, if you set a very high velocity I do not knwo what will do but it will malfunction.

I will get ther afte I go over the feature list, that has no been update to work withe the latest changes.
but that was a very good catch.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Sat Sep 01, 2018 7:18 pm

ok - I actually forgot I had continuous collision set to on on that.
I built another repro based off of commit cc6544039239c9af7dab37ac9aa49d2060df9aee.
This time continuous collision is off. still no compound just a blank scene. However I fin that if I press the middle mouse button successively and spawn many object I get the following assert:
dgPhysics/dgBroadphase.cpp: line 1621 (contact->m_maxDOF):

https://drive.google.com/open?id=1Tu-x-tUZe15GSSaQ2vyuwAcgtOF9JhcR
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Sat Sep 01, 2018 9:39 pm

ok I believe both those are fixed now.
Thanks for the repro, those where is fact important bugs. :D
now go ahead make me proud. 8)
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Sun Sep 02, 2018 11:18 am

Getting there! Should be a really good physics integration for Urho3D. I can really easily create physics demos and such now with the API.

After updating to commit 2a31198994151cf7790d886dff9f78b7d235cc9c, I still get the assert on dgPhysics/dgBroadphase.cpp: line 1621 (contact->m_maxDOF)
Also as you are probably already aware. I am getting some non colliding bodies every once in a while - its usually easy to see after spawning alot of objects with the middle mouse button.
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Re: Compound Collision "Splitting" Problem

Postby Julio Jerez » Sun Sep 02, 2018 11:43 am

MeltingPlastic wrote:2a31198994151cf7790d886dff9f78b7d235cc9c, I still get the assert on dgPhysics/dgBroadphase.cpp: line 1621 (contact->m_maxDOF)

oh sorry I had the fix on a separate branch and I forgot to merge before committing the compound bug. It is committed now.

MeltingPlastic wrote:Also as you are probably already aware. I am getting some non colliding bodies every once in a while - its usually easy to see after spawning alot of objects with the middle mouse button.

yes I know, I have not worked on getting that fixed yet. I was solving some of the reported bugs first.

That new optimization is remarkably faster but in doing that I believe I discovered a way that makes the entire scanner obsolete and can be done away with.
I think I will disabled the optimization sometime today until I work on paper the new algorithm that allow to generate the pairs incrementally and then we can compare both.

I will work on that today and see what the result it.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound Collision "Splitting" Problem

Postby MeltingPlastic » Sun Sep 02, 2018 12:35 pm

Sounds Exciting! Compound bug is fixed now thank you!
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 8 guests