Samuel Girardin Posted September 30, 2015 Share Posted September 30, 2015 Hi , I'm back with a new cool experiment. I'm actually porting an open source cpp physic engine library to js/typescript with emscripten/asm.js (it's not not bullet) . I'm on it since 5 days and here is my first result. It sounds promising, So here is a short video preview. Online demo soon ! I hope ... https://www.youtube.com/watch?v=c-qPc61BmqY sam A new one : https://www.youtube.com/watch?v=BILt4V3CPJM above the 2 first working demo Dad72, Wingnut, gryff and 5 others 8 Quote Link to comment Share on other sites More sharing options...
RaananW Posted September 30, 2015 Share Posted September 30, 2015 It does look promising! Can't wait for the live demo. Quote Link to comment Share on other sites More sharing options...
gryff Posted September 30, 2015 Share Posted September 30, 2015 Sam, as usual, I don't have much of a feel for the coding involved ... but watching the videos reminded me of an arcade game : Coin Pusher Your coding could lead to a nice game. cheers, gryff Quote Link to comment Share on other sites More sharing options...
Temechon Posted September 30, 2015 Share Posted September 30, 2015 It looks totally awesome ! A new default physics engine maybe ? Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted September 30, 2015 Author Share Posted September 30, 2015 Thanks guys ! @temechon : Maybe, maybe not ! It's really the very beginning.For the moment I have only spheres and boxes working ! I think I did only 5% of the work. Another good thing, the js produced by emscripten is only 470 ko which is not too bad (for the whole framework).I Come back soon with new videos ! jerome 1 Quote Link to comment Share on other sites More sharing options...
davrous Posted September 30, 2015 Share Posted September 30, 2015 Very, very, very interesting! I love this topic.Great job as always. I was thinking about doing something similar for a long time in order to compare the performance of the C++ lib ported via asm.js & our current oimo & cannon JS libs. I would be very interested in a direct comparison between a scene using oimo & your C++ lib on the performance level. I'm also curious about the final size of the lib produced by EMScripten and also the performance on non asm.js browser (Chrome & mobile browsers). Indeed, only Firefox & Edge are currently supporting asm.js. Are you using simd.js also in the output generated? It could be very useful for the performance also. Samuel Girardin 1 Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted September 30, 2015 Author Share Posted September 30, 2015 For the moment edge (asm enable) is between 10 and 20% faster than chrome (asm part). I did a simulation during one minute. Edge is at an average of 8ms per frame, chrome at 10. About simd.js I read that emscritpen is not really ready yet, asm simd code seems to be still slow. And the c++ lib I port doesn't use parallelism. As I said my lib file is 493ko (not sure, but it will stay like this, all the c++ file are already compiled). For a test it would be interesting, even if we can t reproduce the exact same test scene. New demo soon, testing joint-hinge now ! Quote Link to comment Share on other sites More sharing options...
Hazardus Posted September 30, 2015 Share Posted September 30, 2015 Ooh la-la, very nice. Out of curiosity, what are the hardware specs on the system you're testing with? Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted September 30, 2015 Author Share Posted September 30, 2015 I5 desktop @3.2 and a gtx 960 . Physics run in a thread and it's only processor dependent. Those videos are kind of stress test to help me to detect memory leaks, etc... Chrome is very nice with bad memory management. Thanks to FF and Edge I detect some awful mistakes. Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 1, 2015 Author Share Posted October 1, 2015 Basic joints work now. Seven more to wrap ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted October 2, 2015 Share Posted October 2, 2015 It will be truely awesome, I know it ! Quote Link to comment Share on other sites More sharing options...
gri Posted October 2, 2015 Share Posted October 2, 2015 Really hot Thing ! Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 3, 2015 Author Share Posted October 3, 2015 Hi, Promise ! This is my last video post ! I'm really having fun with this lib.. In fact I waste time by playing with it. It works very well, even if you need a good processor when you try to simulate a lot of object (>500). @david my lib is now 570 ko (100 ko more..). So next time it will be live demo ! https://www.youtube.com/watch?v=nLYuYuGOaLg https://www.youtube.com/watch?v=G22VO5r3oSY&spfreload=10 Vousk-prod. and Dad72 2 Quote Link to comment Share on other sites More sharing options...
iiceman Posted October 3, 2015 Share Posted October 3, 2015 Awesome indeed! O_o Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 3, 2015 Share Posted October 3, 2015 Really excellent this new physics engine. Is you creating the plugin to use in Babylon? I think he could be the new physics engine by default. Quote Link to comment Share on other sites More sharing options...
Ahiru Posted October 4, 2015 Share Posted October 4, 2015 Can't await to play around with it - especially to try out functions to apply forces and how it reacts to higher end-speeds - both things neither Oimo nor Cannon are convincing yet. Does it have atmospheric pressure, so things on a planet surface would react like you expect them to do (loosing speed when moving, flying curved lines when spinning etc.)? Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 4, 2015 Author Share Posted October 4, 2015 The only thing I know, this engine has much more features than oimo or cannon. You know I'm only the guy who ports this c++ engine to js/ts. I'm not the guy who wrote it. But you might have fun with it ! Dad72 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 5, 2015 Share Posted October 5, 2015 What is the original C++ engine you are talking about please ? adam 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 5, 2015 Share Posted October 5, 2015 Hi guys. I vote that we NEVER have a "default" physics engine. I prefer keeping it open... always, if possible. ok bye. Quote Link to comment Share on other sites More sharing options...
Ahiru Posted October 5, 2015 Share Posted October 5, 2015 Hey Wingy - you don't like it like it is at the moment, that you can switch the physic engines, but if you leave it blank it's Oimo? Why not suggest one for beginners, but keeping it open for more - kind of how it is now? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 5, 2015 Share Posted October 5, 2015 That's fine, of course, as long as it remains that way. I just don't want to commit to one, at the cost of forsaking any others or any future systems. I saw two comments in this thread mentioning "new default"... and I don't think that should be a concern. Maybe YOU can tell ME why those two posts showed up. Apparently there is some kind of concern about which physics engine "wins" the coveted "default" title/position? Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 5, 2015 Author Share Posted October 5, 2015 That's just an experiment ! I never talked about a plugin for bjs, Just testing and trying things ! Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 5, 2015 Share Posted October 5, 2015 Hi guys. I vote that we NEVER have a "default" physics engine. I prefer keeping it open... always, if possible. ok bye. A one single line message !!? Come on Wingnut, are you sick or something ? :lol: Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 5, 2015 Share Posted October 5, 2015 No plugin? Wingunt, whether a motor default or not, This does not really matter, it's just to make sure Babylon uses the best physics engine by default. This is of course not a major concern. what would be really great is the plugin. So we shall see not integrate into Babylon if Samuel does not create the plugin of integration Babylon. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 5, 2015 Share Posted October 5, 2015 Sam, I wasn't talking about you. All you did is show us some experiments and tests you are doing. It's the pile of hoopla that happened afterwards... that caught my attention. If I/we could harness that "parade" and use that energy to get either/any of our current physics engines... to work on heightMaps/terrains, I would be tickled to death. Am I wrong? Which PE's are currently doing heightMaps? Oimo and Cannon. Which webGL framework has never had a heightMap physics demo? BabylonJS. (It is my opinion that we lose TONS of fans... to "the other guys"... just because we can't do heightMap physics.) I'm hoping... that once this parade of "let's change physics engines" gets done, someone can start working-on activating the physics features that we ALREADY HAVE and are not using/implementing. If I'm being out-of-line, someone set me straight, I can take it. Feel free to use The Wingnut Chronicles if you want to avoid derailing Sam's thread. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.