These are a collection of my own personal tech explorations. I love pushing the boundaries of what is possible in a real-time environment. This includes anything related to visuals such as textures, materials, shaders, and even some rendering techniques.
Raymarched lens flare for niagara sprites
I love lighting effects that interact with the environment to achieve a volumetric look. In this exploration I created a lens flare shader that casts dynamic shadows. The shader crease a mask based on the scene depth. The pixels of geometry in front of the particles world location are colored black and the pixels behind are colored white. Then this mask is ray-marched to create light rays that interact with scene geometry. The goal was to create a material that could be applied to a particle sprite and was self contained as to not require any sort of secondary setup such as creating render targets. I also includes several features such as sample dithering and fading at the edge of the screen.
Density based particle normals
This was another personal experiment geared towards improving the lighting on a cloud of particles. The goal was to get accurate shading on a cloud of particles instead of each particle being treated as an individual object. This setup uses the grid3d in Unreal Engines Niagara particle system and creates a voxel grid around the cloud of particles. This grid records the amount of particles that is contained within each grid cell. Then, each cell looks at its neighbor cells and does a calculation to get a direction vector pointing in the direction of decreasing particle count. The result is smoothed out by using a 3×3 sobel sampling method. It was an interesting challenge but very rewarding to finally see it working!
Depth based soft intersection
Most particle sprites use a simple soft intersection fade when a particle sprite intersects geometry. This works ok for a lot of effects but it falls apart on certain effects that have a more defined edge, such as a thick cloud of smoke. This technique takes a depth map that is generated by the simulation and refines the intersection edge around the particle so achieve a much more volumetric look. The intersection edge can be feathered to smooth out the edge. The depth map also gives the sprite the ability to “grow” out of geometry as the simulation expands.