Firework Studio Computer Science Final Year Project 2002/2003 Project Team ( BR1 ): Chan Wai Wa ( Raymond ) Cheng Fun Hop ( Brian ) Ng Yat Wah ( Fat ) Advisor : Dr. Michael S. Brown
Overview of Presentation Introduction Design & Implementation Results Conclusion Q&A
Introduction Project background Originated in ancient China Joy & happiness in celebrations events Motivation Commercial Design & testing efficiently Firework enthusiasts Free creation and design Safe and legal (in HK)
Introduction Description Software for designing fireworks/ fireworks shows Challenges Realistic results Real time performance Easy to use Diversified design
Architectural Overview Design Pattern Model-View-Controller (MVC) − Advantage: Clarity of design, ease to growth... System Design Model Controller View Model Controller View Components Simulator Viewer Composer Sound System Composer Viewer Simulator Sound System
Components Simulator Core part Based on Particle System contains all calculations Viewer For showing simulation Composer Graphical User-Interface (GUI) Sound System API for generating sound Eg: explosion sound effect, background music
By Newton ’ s 2nd law : F = ma i.e. a = F/m v(t n ) = a(t n ) + v(t n-1 ) x(t n ) =v(t n ) + x(t n-1 ) x v f position velocity Force accumulator Particle System t1t1 t2t2 t3t3 t4t4 External force t5t5 t1t1 t2t2 t3t3 t4t4 t5t5 t 1 – t 4 : f 1 =f 2 =f 3 =t 4 =Gravitational force -> the velocity changes t 5 : Collision – > f 5 = f 4 + external force f : for update position & velocity Modified Particle System Assumption : No collision among firework particles Force acting on particles : Gravitational force ONLY By Newton ’ s 2nd law : F = ma i.e. a(t) = F(t)/m = constant = a v(t n ) = a + v(t n-1 )v(t n ) = a + v(t n-1 ) = a + ( a +v(t n-2 ) )v(t n ) = a + v(t n-1 ) = a + ( a +v(t n-2 ) ) =... = at n + v(t 0 )v(t n ) = at n + v 0 where v 0 is initial velcoity x(t n ) =at n 2 /2 + v 0 t n + x(t 0 ) Initial position Initial velocity v0v0 x0x0 x(t n ) =at n 2 /2 + v 0 t n + x0where x0 is initial position Constant Advantages : System can be updated at any timer value preview firework at any timer value
Data structure Design time Run time Scene Firework Firework template Emit action Particle template Scene Particle Group Particle
Explosion - Create particles - Make differences for a firework design
Explosion types example
Firework Trails
Implementation Simulator (simulation engine) VC++ Viewer OpenGL SDK Composer (GUI) OpenGL User Interface (GLUI) Sound System OpenAL
Performance Configuration Computer AComputer BComputer CComputer DComputer E CPUPentium GHz Pentium 3 1 GHz Intel Celeron 600 MHz Pentium MHz Pentium MHz Memory512 MB Ram256 MB Ram 512 MB Ram256 MB Ram Video CardNVIDIA Geforce 2 MX/MX 400 Intel(r) Graphics Controller NVIDIA Geforce 2 MX/MX 400 On board S3 Graphic Inc. ProSavage S3 Graphic Inc. Savage4 FPS result of different scene on each computer ABCDE A empty scene A complex scene (texture disabled) A complex scene (texture enabled) A normal scene (texture disabled) A normal scene (texture enabled)
Conclusion Summary Realistic simulation Easy to use Real time result Possible Future Extensions Ranged parameters Movie export Customization Demonstration