Jump to content

Cloth simulation using babylon's physics engine


RaananW
 Share

Recommended Posts

Hi guys, 

I just finished a new tutorial about cloth-simulation using the new physics architecture. Thought you might like to read:

https://blog.raananweber.com/2016/04/03/cloth-physics-simulation-for-babylon-js/

If you have any questions or I missed something (or something is not clear), give me a shout!

demo-with-sphere.gif

Cheers!

Link to comment
Share on other sites

Good question. maybe I should have explained why it happens :)

This cannot be avoided. The problem is that the connection between the particles is a straight line, and the sphere is... round :) so the sphere goes "through" the cloth.

You can avoid this by:

1) setting lower zOffset in your material

2) making the sphere less round :)

3) setting subdivisions to a very high number (which will result in low performance).

4) understanding that this is somehow acceptable ;) 

The best solution would be to set the ground's subdivisions to a high number, but only setting impostors where you think the sphere will hit. But this is a complex task. If any of you want to do that, it would be great if you share a playground!

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...