Jump to content

Physic test - Oimo.js


Temechon
 Share

Recommended Posts

Hey guys ! 

 

I really wanted to try to use Oimo.js with Babylon, so I made a quick test here : http://pixelcodr.com/oimo/index.html (Maybe for a new tutorial, who knows ? :) )

The thing is: it works reaaally well ! In my scene, I create 1000 spheres, and no problem at all.

 

You can compare with cannon.js here : http://pixelcodr.com/oimo/index_cannon.html

With cannonjs, i can see a lot of sphere are going through the ground, and the fps is not very high.

 

I may work on the plugin creation if you are interested.

 

Cheers !

Link to comment
Share on other sites

Oimojs is not very developer-friendly... No documentation, only 3 or 4 examples...

I'm reading the source code of Oimojs, and there is no way to create a pixel perfect impostor, only a composition of box, cylinder and spheres are possible. Is is ok for you guys ?

 

EDIT : In CannonJs, no pixel perfect mesh impostor, but at least the system creates a ConvexPolyhedron automatically for your custom mesh. It will certainly be a limitation for Oimojs.

Link to comment
Share on other sites

Only one plugin can run at a time in a scene.

But you can create your own plugin linked to several physics engine :) I guess it will be very CPU intensive

 

That wouldn't be worth it... If it came to that you may be better off only pulling out the parts of each engine you need into your own little micro engine that only had the functions you use. I'll probably just end up using as little physics as possible or none at all. I may just end up calculating the couple small things in need server side and forcing results into the client...

Link to comment
Share on other sites

Ah yes indeed, with 500 boxes, I am a 42 fps and with 1000, I am a 25 fps.

 

Oimo is one that has better performance. But it is true that it is a pity for complex objects. but this physics engine is further developed, compared to cannon.js which is abandoned. May be that Oimo.js will evolve in this direction and we could also evolve the plugin here with Oimo.js developments.

 

I think that is your idea Temechon, if Oimo evolves, you would continue the plugin with new imposters.

 

 

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...