Abstract
Due to the ubiquity of web browser engines and the advent of modern web standards (like HTML5), software industry tends to use web application as an alternative to traditional native application. Web app development commonly uses script language (like JavaScript, CSS), the low performance language which significantly hinders real-time execution of physics simulation. We design a new framework to achieve real-time physics simulation engine. The key novelty lies at: we choose native implementation for computing intensive functions in physics simulation, and bind native implementation with JavaScript APIs, then we only expose JavaScript APIs through web browser engine to developers but still calling native implementation. Based on this model, we build WebPhysics: the first 2D simulation engine targeting on real-time web applications, which is seamlessly compatible to both de-facto standard simulation engine (Box2D) and browser engine (Webkit). We also explore and implement a parallel rigid body simulation (Box2DOCL) in the context of web app framework to obtain further performance improvement. Our experiments show significant performance improvement in simulation time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Bender, J., Erleben, K., Trinkle, J.: Interactive simulation of rigid body dynamics in computer graphics. Comput. Graph. Forum 33, 246–270 (2014)
Tasora, A., Negrut, D., Anitescu, M.: A GPU-based implementation of a cone convex complementarity approach for simulating rigid body dynamics with frictional contact. In: ASME 2008 International Mechanical Engineering Congress and Exposition, pp. 107–118 (2008)
Harada, T.: Parallelizing the physics pipeline: physics simulations on the GPU. In: Game Developers Conference (2009)
Harada, T.: A parallel constraint solver for a rigid body simulation. In: SIGGRAPH Asia 2011 Sketches, pp. 22:1–22:2. ACM (2011)
Tonge, R., Benevolenski, F., Voroshilov, A.: Mass splitting for jitter- free parallel rigid body simulation. ACM Trans. Graph. 31, 105:1–105:8 (2012)
Box2D: A 2d physics engine for games. http://box2d.org
Box2DWeb: Box2d port to javascript. http://code.google.com/p/box2dweb/
Jones, C., Liu, R., Meyerovich, L., Asanovic, K., Bodik, R.: Parallelizing the web browser. In: USENIX HotPar, First NSENIX Workshop on Hot Topics on Parallelism, USENIX, pp. 124–125 (2009)
Tsuda, J.: Practical rigid body physics for games. In: ACM SIGGRAPH ASIA 2009 Courses. SIGGRAPH ASIA 2009, pp. 14:1–14:83 (2009)
Coumans, E.: Accelerating game physics. In: Game Developer Conference (2013)
Liu, F., Harada, T., Lee, Y., Kim, Y.J.: Real-time collision culling of a million bodies on graphics processing units. ACM Trans. Graph. 29, 154:1–154:8 (2010)
Kipfer, P., Westermann, R.: Improved GPU sorting. In: GPU Gems 2. Addison-Wesley (2005)
Gottschalk, S.: Separating axis theorem. Technical report TR96-024, Department of Computer Science, UNC Chapel Hill (1996)
Harris, M., Sengupta, S., Owens, J.: Parallel prefix sum (scan) with CUDA. In: GPU Gems 3. Addison-Wesley (2007)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Li, R.(., Brutch, T., Rong, G., Shen, Y., Shu, C. (2015). WebPhysics: A Parallel Rigid Body Simulation Framework for Web Applications. In: Bebis, G., et al. Advances in Visual Computing. ISVC 2015. Lecture Notes in Computer Science(), vol 9475. Springer, Cham. https://doi.org/10.1007/978-3-319-27863-6_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-27863-6_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-27862-9
Online ISBN: 978-3-319-27863-6
eBook Packages: Computer ScienceComputer Science (R0)