A visualization of Aurora Borealis using fluid simulation. Made for a course at KTH DH2323 VT25 Computer Graphics and Interaction.
During my exchange semester in Sweden, I've had the chance to explore a lot. One of the highlights was a trip to Kiruna, which is inside the Arctic Circle. One of my dreams since childhood was to see the Northern Lights. That was one of the main reasons I decided to go on that trip.
So, I went there, and I saw them. It was one of the coolest things I’ve ever experienced. Below you can see some pictures my friends and I took.
And this is basically how I came up with the idea for a project. I want to replicate something beautiful.
After getting a rough idea of what I wanted to achieve, I began outlining a plan for implementing the Aurora simulation. It quickly became clear that the task was more complex than I initially anticipated.
I realized that, in order to replicate the Northern Lights, there were two main challenges: first, creating the shape and movement of the aurora, and second, designing an appealing way to shade and render it. While preparing the project specification for my course coordinator, I recognized that tackling both of these aspects simultaneously might be too ambitious and difficult for the scope of the course. As a result, I decided to narrow my focus to the animation of the aurora itself, leaving the shading for later. I hope to later enhance the simulation by integrating existing shaders to improve the visual appeal. For now, I'll prioritize perfecting the fluid simulation and the movement of the aurora, and will revisit the shading aspect once the core simulation is solid.
When working on the aurora animation, I discovered that auroras come in various shapes and sizes. To better understand how they form and what influences their shape, I did some research.
Examples of different types of auroras from the Oslo Aurora THEMIS (OATH) dataset (2018).
As I learned more about how auroras work, I realized that their dynamics are quite complex. As a result, I decided to focus on the visual aspect rather than an exact physical representation. But I still wanted to incorporate some physics into the animation.
During my research on the different types of auroras, I was particularly intrigued by auroral folds, curls, and spirals. At first, I simply liked how beautiful they looked. But later I also found that they could be roughly described using the Kelvin-Helmholtz instability (KHI)—a phenomenon commonly seen in liquids and fluids! It actually can also occur in plasma and influence the nother lights.
This was a happy accident! As it turns out that my idea of animating auroras using fluid dynamics had some scientific basis behind it.
T.J. Hallinan actually described a theoretical model of the formation auroral spirals. Below is a figure on how the auroral curtain is shaped by currents going into separate directions and with some circular petrubations cause a fold and then a spiral to appear.
Simulation phases (top to bottom): arc, initial fold, distorted fold, spiral array. (Adapted from T.J. Hallinan, Auroral Spirals 2. Theory, J. Geophys. Res., 1981.)
As I said in the previous post I decided to implement the auroral folds and curls using Kelvin-Helmholtz instability. As a base for my simulation I decided to use Euler fluid equations. I debated using Navier-Strokes equations method, which are considered more physically accurate. But then decided not to, since my simulation is not aiming for percise physical accuracy, rather on an interpratation.
And with a solid plan and math in hands I turned to coding. These tutorials were extremely useful and helped me not get stuck: Create Your Own Finite Volume Fluid Simulation (With Python) by Philip Mocz, and How to write an Eulerian fluid simulator with 200 lines of code by Ten Minutes Physics on YouTube.
A few errors and bug fixes later, I got my first auroral fold spiral animation. I was extremely happy by the result, because it was the first time I was able to see something roughly similar. Green fluid dye was used purely for aesthetic purposes. Later when I will switch to shading, I plan to animate it in white, so that color is added on top with shaders.
Next I decided to try to simulate not just one fold, but a longer sheet. I added some noise to the vertical petrubation, so that the whole sheet looks more organic.
Now that the 2d image plate is complete, it's time to render the result and give aurora it's signiture curtain vertical shape. I planned to render the aurora in Blender, since it's an environment I'm famililar with.
At first I wanted to render a single framee - make sure that I like the shading before render my whole animation. Below you can see an animation frame I used and a final result in Blender.
Animation frame used for rendering(top left), Aurora Render from space view (top right), Aurora Render from ground view(bottom).
And next I tried to render the whole sequence, that was generated previously. I also added some hdri texture, so that the night sky is present as well.
This project was both a technical challenge and a creative journey. What started as a personal experience (witnessing the Northern Lights in Kiruna) evolved into a full-fledged simulation and rendering pipeline inspired by fluid dynamics.
I learned a lot during this process - about fluid dynamics, aurora, about more coding in python... And also how to try and combine scientific ideas and artistic goals. There's still plenty of room for improvement, both in terms of refining the simulation and making the workflow more efficient and accesible. I'd also love to explore more physically accurate rendering techniques in the future.
That said, I'm genuinely proud of what I've achieved so far.
Frames from resulting fluid simulation (left), rendered aurora from the same angle(center), rendered aurora from different angle (right).