Arvutiteaduse instituut
  1. Kursused
  2. 2017/18 sügis
  3. Arvutigraafika (MTAT.03.015)
EN
Logi sisse

Arvutigraafika 2017/18 sügis

  • Main
  • Lectures
  • Practices
  • Projects
  • Exam
  • Results
  • Links

Volumetric Fire 🔥

by Jaagup Kuhi, Siim Raudsepp and Andri Poolakese

The aim of this project is to visualize volumetric fire generation in Unity using raymarching. Repository is located at https://github.com/jaagupku/volumetric-fire

Demo

Final report

Project description

The aim of this project was to create realistic looking animated fire without using prerendered fire textures. This was achieved using a tehnique known as raymarching. Raymarching casts a ray into each pixel of the screen which then collides with the defined volume and upon collision samples the noise at that point in the volume. After that the ray is extended a set amount and the process is repeated, adding the next points color and alpha to the previous until the ray penetrates the volume, the alpha value reaches 1 or the predefined max amount of steps is reached. For the noise we used simplex noise and animated it with time.

Tools

We used only Unity to make this project.

Difficulties

At the start we had some problems getting the noise to be shaped like fire. After we had some initial progress, we noticed that there is some color banding while viewing the fire from certain angles. This was fixed adding some random length to the start of the ray.

References

  1. http://magnuswrenninge.com/productionvolumerendering
  2. https://github.com/mattatz/unity-procedural-volumetric-fire
  3. https://startupfreakgame.com/2017/01/15/screen-space-gradient-shader-with-dithering-in-unity/
  4. https://github.com/ashima/webgl-noise

Progress


Some initial noise and raymarching



Changed per particle alpha

Final product with added smoke and some noise change

Fire from noise


Sum of 2 low frequency 3D simplex noise

Higher frequency 4D ridged noise, 4th dimension is time

Low frequency simplex noise distorted with ridge noise

Less flames up

Area where there should be a lot of fire

Raymarching 3D simplex noise

Subtract "less flames up" gradient

Add area where there should be a lot of flames

Subtract ridged noise

And add color
  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Tartu Ülikooli arvutiteaduse instituudi kursuste läbiviimist toetavad järgmised programmid:
euroopa sotsiaalfondi logo