Developer diaries #54
[p]This time, we're diving a bit deeper under the hood-or more precisely, under the wheels. Our goal was to make the roads in the game feel truly alive: dry dirt roads kick up light dust, rain-soaked trails fling mud in all directions, and puddles explode into spectacular sprays. And it’s not just visual noise-this is the result of a complex system we’re excited to show you today.[/p][p][/p][previewyoutube][/previewyoutube][p][/p][p]Particle System[/p][p]When developing the under-wheel particle system, we had a few key goals in mind. First, we wanted the effects to feel believable and consistent with real-world behavior. Second, it was essential to maintain high performance across the board.[/p][p]We used Niagara, Unreal Engine’s advanced particle simulation system, to bring these effects to life. Niagara is incredibly flexible and capable of producing highly optimized visual effects. Most of the calculations in Niagara are processed on the GPU. While this brings some limitations, it allows us to hit impressive performance targets without compromising on visual quality.[/p][p][/p][p]Realistic Contact Patch Simulation[/p][p]At the core of the particle system is a realistic simulation of how the tire interacts with the surface beneath it. As we mentioned previously, we work with detailed information like the surface's physical material, the wheel's slip percentage, and the power output at the contact patch. This data is used to determine what kind of particles should be generated-and how they should behave.[/p][p]For example, if you’re driving on a dry dirt road with minimal wheel slip, the particles will be mostly light and dusty, slowly settling in the air. On the other hand, if the wheels are slipping significantly, you’ll see heavier particles being ejected more forcefully from the tires.[/p][p]Mud behaves similarly, but here surface moisture becomes a major factor. Hit a muddy rut, and you’ll see a lot more thick clumps being thrown up from the wheels.[/p][p][/p][p]Moisture Map[/p][p]To give particles more dynamic and predictable behavior, we implemented a moisture map system. Drive into a puddle or rut, and you’ll instantly notice an explosion of splash effects. Enter a tunnel or dry patch, and those splashes will disappear accordingly.[/p][p]On a dry dirt road, your tires will kick up light dust-but in the rain, expect slinging mud instead. The amount and type of debris are also affected by whether you’re driving through ruts or on flat terrain.[/p][p][/p][p]Particle Materials[/p][p]Particles in our system are sprites-flat textures that always face the camera. This means we had to create materials (or shaders, in UE terms) that give them a sense of volume and movement.[/p][p]To add randomness and variety to dust and mud particles, we distort their texture coordinates. This gives each particle a unique shape and behavior, making the simulation feel more organic.[/p][p]We also control how a sprite’s appearance evolves over its lifetime. For splash particles, the texture tiles and scales over time to mimic the effect of water droplets dispersing into the air.[/p][p]We aim to make every drive in our game feel alive-not just through vehicle handling and visuals, but with those seemingly minor details like dust clouds, mud chunks, and water sprays. Because in the end, it’s those details that create a truly immersive experience.[/p][p]We’ll keep sharing behind-the-scenes insights and showing you how the atmosphere and realism of the game come together-one shader, texture, and line of code at a time.[/p][p]Thanks for being part of the journey-your feedback and support mean the world to us![/p][p]Until next time-and don’t forget to check your mirrors. Sometimes, the view back there is beautiful too :)[/p]