Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.
/ fire-simulation Public archive

🔥 WebGL fire simulator using THREE.js library, with customize shader on volumetric object.

License

Notifications You must be signed in to change notification settings

neungkl/fire-simulation

Repository files navigation

Fire Simulation

This is my original project for propose to 2110594 Computer Graphics and Physics Simulation class in Chulalongkorn University.

Fire simulation base on WebGL using THREE.JS library. Using volumetric fire technique for this implementation. Fully customizing on fire color and particle system in real-time. The simulator are run smoothly with 60 fps frame rate, optmized by object pooling method.

Demo

👉 Available demo : https://neungkl.github.io/fire-simulation/

Report

📄 You can read full PDF report in fire_simulation_report.pdf

Works

  • I starting with building a volumetric fire called flame ball, with customize vertex shader and fragment shader, the result look similar to below figure.

  • The flame ball part I using Perlin Noise algorithm for making the randomize texture of flame ball and apply the color depends on the deep of surface.
  • Combine each flame ball to a large fire using Interpolation for animation each frame of flame ball.
  • Add particle system for spark system.
  • Fully customization for fire color and spark color.
  • Renderer time scale included.
  • Optimized by using object pooling approach.

Usage

Run the simulator

  1. Enter following command.
$ npm install -g typescript grunt
$ npm install
  1. Run build script
$ grunt
  1. Change code in index.html
<!-- Change this -->
<script src="dist_github/app.js"></script>

<!-- To this -->
<script src="dist/app.js"></script>
  1. Open file index.html

Developement

$ grunt watch

Thanks

Reference

Tools

License

MIT © Kosate Limpongsa

About

🔥 WebGL fire simulator using THREE.js library, with customize shader on volumetric object.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published