Jump to content

Recommended Posts

Hi,
Is there any way to enable debuging cannon.js physics collision?

I would like to know if ball fall through model somewhere if  there is a problem with model or physics (mesh/sphere collision).

Is there any tool/way to check or validate model if it is ok or optimal ok for physics collision in game engine(babylon.js).

For me it is strange that ball fall through model every time on same place. If I play slowly on that place ball also fall through model.

On that place there is no special things (more vetrexes or double faces strange edges or normals model is bake-ed rotation and scale...) everything looks ok with model.

Sometimes I remove this section of model and replace it with another and after that physics works well on that place of model.

I think that there is a problem with blender or addon exporter for babylon.
 

Is there any tool or how can I validate model if it is ready and OK for game engine and mesh collision ???

Is there any way to enable physics collision (cannon.js) debugging (in babylon)?
Is there any advice what is the best way how to develop model and ball they works the best with physics collision???

greetings

 

Link to post
Share on other sites

Oh man, @ian, those are EXCELLENT questions, and you did very good tests (replace mesh section idea...superb!)

When you have a moment, take a look at this Google search about "fall through".  Everyone is having SOME problems with wall/floor fall-thrus in almost ALL the physics engines.

I know this is not the answer you hoped-for. 

I read SOME of those links, and there is some talk about "scaling-up".  Essentially, make everything in your scene... bigger.  Try creating the ball bigger, AND/OR scaling it bigger [ maybe with ball.scaling(2,2,2) ].  It's worth some tests, right? 

Yes, we are in need of physics testing tools, aren't we?  I have wanted a "physics workshop" to happen for BJS for a LONG time.  An energetic user named @Pryme8 looked like he was on a path to a physics testing playground... but then he said something about creating a scene editor, and we haven't seen him since.  We don't want that to happen to you.  :)

Yep, not very many of our forum users are experts at using our third-party physics engines.  Maybe you will become an expert.  I think there is an update speed or step speed that is pertinent to the pass-thru problem. 

I noticed that Unity has something called Minimum Penetration For Penalty... a phenomena that we have been dealing-with on a project by @Steffen... still not solved.  (auto-sleep problems)

But... too much work, not enough people working on it.  Did you do a forum search for "through floor" and "through wall"?  I bet you'll get a substantial amount of returns.  The physics "thru" problem as been with us for some time, and few solves are on the horizon.  Teach us what YOU learn, okay?  We need all the assistance we can get. 

Have you tried both engines... Oimo and Cannon?  Both are available to us.  Oimo is faster but simpler.  Cannon is better equipped but a bit slower, I hear.  Use our playground search to search for "physics" and "cannon" and "oimo", as wanted.  You'll get some returns... but maybe no solutions.

Certainly nothing "easy" happening here, eh?  *nod*  Help us make it all easier, if you can.  Thanks.  Others will have some comments, I'm sure.  (I hope).  You ask very good questions, Ian, and I offer very bad answers in return.  Sorry.  hmm.

Link to post
Share on other sites

everything you say is OK.
I search and study if can find any good info or tip how to design model it will be very good "equipped/prepared" for game angine physics in real time. :)
For blender I find this. (as I know we shoul always do ctrl+a to scale and rotation on all objects, before exporting to bayblon)
https://www.blender.org/manual/modeling/meshes/cleanup.html
and find tool 
http://meshlab.sourceforge.net/ (meshlab). But I did not hava time to study this application/trool. 

If anybody know how to analyze mesh with mashlab to preprare model to be OK or optimal for physics collision in game engine I'll be thankful. Maybe we don't have to know everyting about mashlab for this.

I try physics settime only 2.4 bete have this options.... But default settings was the best. If I put more time to physics engine, ball still fall over on same place as before.. :) I think it's not a physics problem but model problem, or blender bug or export to babylon.js problem. But I have to prepare some Example model and show you , so you can try it to see. Meybe someone will find thrue problem with this topic..
 

I can't try both engines because I use Mesh colider an Sphere which only cannon support it.

As I know RaanaW is specialist for cannon mesh physics. And Supermitch for modeling (as I see and read...)

Maby Supermich can say anything about modeling and and physics relation. And RaanaW about physics. 

The problem is I have dynamic model with mesh and sphere. It is true that physics works very well (just sometimes this problem with model I mention it here.....) 98% works very well! :)

(I'm preparing some kind of "sandbox"  for testing this kind of problem modle-physics relation).

greetings

Link to post
Share on other sites

Hi Ian,

if cannon allows it, you can enable it. 

Babylon doesn't have physics debugging yet, which will come in future releases. Until then, it is (sadly) trial and error - check your mesh, throw a ball at it, make sure it is colliding :) .

There are, of course, many helpful functions that can be used in that case. registering a collision callback and checking when it is called will be one of them. You can also lower the time step of the physics engine to "slow down" the entire physics' calculations, and this way understand better what's happening in your scene.

Link to post
Share on other sites

The ball falling through your mesh I can almost guarantee is because the model is flat (ie one sided) and has no volume, so the physics engine is calculating only a single point for the collision not the mass of the model.

Work around would be to make your collider have volume or increase the number of calculations per frame

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...