Temechon

Physic test - Oimo.js

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 !

Share this post


Link to post
Share on other sites

Me that interest me greatly. Thanks Temechon. This is a super new and I wish you good luck with the plugin.

It seems much better with Oimo. the comparisons is huge visually and in performance.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

That's too bad that it wont do complex shapes. I'm just going to have to make a grid for my game of acceptable Y locations by X,Z coordinates. Should be faster as a lookup than a physics calculation anyway.

Share this post


Link to post
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...

Share this post


Link to post
Share on other sites

I won't work at all on the 3DS plugin, but as it is a physicpolugin, all methods used by babylon will stay with the same name, so I guess it will work. Only the underlying logic will be linked to Oimo.js.

 

@reddozen : I tried the ammo benchmark, and I run at 15 fps with 750 boxes... Not so great :(

Share this post


Link to post
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.

 

 

Share this post


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.