Joe Wilkins | Software Engineer

Intel RealSense X Unity VFX Graph

banner

Having used Intel RealSense Depth Cameras extensively for a range of different applications in the past, I wanted to spend some time looking at how they could be integrated with Unity's powerful VFX Graph functionality to produce some fun interactive effects.

Below are a couple of examples from an initial series of demos that I put together for a client to experiment with combining VFX Graph particles and live depth data.

Interactive Logo Reveal

In this demo, a logo is revealed by the movement of particles which are, in turn, stimulated by movement of people in front of the depth camera. This example makes use of a model of the logo which has been converted to special type of 3D texture known as a Signed Distance Field (SDF). In essence, SDFs are made up of texels where each texel indicates the distance from the surface of the object being represented, a negative distance falls inside the object and a positive distance falls outside of the object. Within Unity's VFX Graph, these values can be sampled to allow the particles to interact with the geometry of the logo.

Interactive Bokeh

In this demo, I wanted to experiment with the idea creating something similar to a mote or bokeh effect in which particles appear to drift organically. The interaction within this example is less about resolving the human form within the particles and more about showing an artistic impression of how people can influence the draft or turbulence within the space and how it affects the movement of the particles. To that extent, when people move in front of the depth camera, they affect the air current which causes the particles to drift more prominently in a particular direction.

← Back