Sandstorm

My third project is a sandstorm that sweeps across the environment, kicking up dust and debris, reducing the player's vision and enhancing the gameplay experience. 

The project was in collaboration with Level Designer Viggo Widell. He was responsible for core gameplay and level design, while I was responsible for the creation of the visual and technical aspects of the sandstorm. Together, we developed the system that controls the storm, going back and forth to make the effect suit our needs. 

For inspiration I looked at sandstorms in the Mad Max video game, as well as footage of real sandstorms.

Process & Workflow

Before making the effect, I analyzed the sandstorms and their behavior in both games as well as real life footage. This allowed me to break down the effect into three steps. 

  • The Initial Sandstorm Cloud: The large cloud forming and moving towards the player before colliding with the player 

  • The Transition: The moment where the player enters the storm, visually changing the effect. 

  • Inside the Sandstorm: The main effect where visibility is reduced and the storm is at its max intensity. 

The Initial Sandstorm

To make the initial storm more alive and natural, I used a flipbook texture that I made using EmberGen. This was then exported to Unreal Engine where it was then used in the Niagara System. View shader graph here

The Niagara system is divided into two layers, layer one creating the body of the storm cloud and layer two adding color and size variation. 

While making the initial storm, I worked iteratively with Viggo to make sure that the effect matched our overall vision. 

During this, we explored different solutions to create the transition between the storm phases, which sparked the idea of using a Material Parameter Collection. 

This allowed us to dynamically control each part of the effect as a whole, and was then applied to the Niagara system to get a smooth transition between each step.

The Storm Fog

For the dense fog inside the storm, I designed a volume shader in order to give the player a feeling surrounded by thick, moving dust. View shader graph here

The Sandstorm Debris and Dust

A major part of making the sandstorm feel alive was by adding flying debris and dust particles in Unreal Engine's Niagara system. These used rocks that I got from Quixel as well as small dust particles that I made using a Substance Designer. 

Additionally I edited the ground shader to include a subtle panning texture, creating the illusion of wind movement in the ground. View shader graph here

The Sandstorm System

To tie everything together, Viggo and I worked together in creating the system that handled the effect transitions. 

To get the transition correct we created a trigger box that moves towards the player and activates the transition event on collision. This made so that the sandstorm faded out and deactivated while activating the fog and spawned the debris.

Problems and Solutions

Problem 1 - Fog Details


After completing the Sandstorm fog, I got some feedback noticing that the fog lacked the grainy texture of a real Sandstorm. To resolve that issue I created a camera bound shader, using the 2D textures that I originally made for the volume textures and panned them in to create fast and intense movement.

This was then added to a large sphere, making the texture more subtle while still keeping the visibility. I then and added a depth fade in order to make sure it did not clip through the ground. View shader graph here

Problem 2 - Fog Quality and Square Artifacts 

While working on the Sandstorm fog I encountered two major issues. The first issue came with the quality of the noise that was made in the fog. The second issue appeared as blocky artifacts on the borders of my screen. It was through research that I discovered that the blocky artifacts came as a result of Temporal reprojection. 


This is a technique where Unreal Engine reuses the information of the previous frame and predicts the motion in order to smooth out the image without re-rendering the entire frame. In this case it struggled to accurately predict the motion and as a result of it came the blocky artifacts. To solve both issue one and two I used Unreal Engine´s console command to adjust the reprojection settings as well as the quality of the noise.

r.VolumetricFog.GridPixelSize 2
r.VolumetricFog.GridSize 128
r.VolumetricFog.HistoryWeight 0.5
r.VolumetricFog.TemporalReprojection 0

If I Had More Time


If I had more time I would refine the sand shader and add a ground dust movement, in order to give the player a stronger sense of anticipation before the sandstorm appears. Adding this would make the transition feel more natural as well as make the environment feel more natural.

Additionally I would also put some into experimenting with the volume textures and try to find a better way to integrate the volume textures into the material. This would give the fog a more detailed and realistic behavior as well as remove the camera bound shader as everything would be in the volume shader, as well as optimize performance as the shader would not use procedurally generated noise. 

Conclusion & Takeaways

Conclusion

Working on this project was exciting, as I not only enjoyed making environmental effects but also iterating on my work to fit a gameplay scenario. 


A valuable aspect of this project was discovering multiple alternatives to the same solution instead of following a rigid path. This allowed me to experiment with new techniques which led to better results as well as taught me new things, while giving me a deeper understanding of problem solving when certain approaches didn't work as expected.


Takeaways

This project taught me how to break down a visual effect into structured components and from there develop my own custom solution. I gained a better understanding of collaboration, learning how to effectively communicate not just my own vision and ideas, but also interpret and incorporate ideas from Viggo.


Working with Viggo was a great experience, we were able to communicate our expectations clearly, and through our collaboration find ways to make iteration effective, both on my sandstorm and Viggos level design.  Initially I didn't fully understand what I needed to consider when working on my effect. However collaborating with Viggo allowed me to learn how to align my work with the overall experience. I felt comfortable asking questions when I didn't understand certain aspects of his level or the gameplay design, which helped me improve in the way I approach collaborative work in the future. 


Additionally, this project taught me how to iterate on an effect based on core gameplay, ensuring that my effect felt immersive as well as impactful. This project also allowed me to gain more knowledge on volume shaders as well as how to combine multiple different components in order to get a cohesive environmental effect.