VFX Graph – First Tests

I recently challenged myself to get familiar with Unity’s VFX Graph system that is currently in development stages. There isn’t a whole lot of clear documentation on the system so there was a good bit of trial and error, but I’m excited with the results!

For an upcoming project, I plan on implementing a visualization of a cube controller I’ve been working on for a while as the main interaction piece. The mesh itself isn’t very exciting to throw into unity, so I thought I’d use VFX to spice it up a bit. The process I followed is from this video: that demonstrates how to implement Signed Distance Fields into the VFX Graph.

To start, I exported my mesh from Fusion 360 with only the frame included, and imported the STL into Houdini. The reason for using Houdini is that its apprentice version is free, and has the ability to export SDFs quite easily. After using the IsoEffect node to simplify and add mass to the object, I used the VFX toolbox to export a SDF with around 60,000 points.

I am using a basic scene in Unity that has the High Definition Render Pipeline built in. The Visual Effect started off as a template one for particles, and I expanded upon it with a few adjustments. I originally started with using the point cache file from Houdini as a position map for the particles to spawn from, but I discovered no way of rotating the point cache map to adjust the angle over time. Might dive even deeper on that for later. Instead, I’m using the SDF and the “Conform to SDF” block in the particle editor. I’ve included images of all the VFX Graph settings used at the end of the article, just click them to open a full size in a new tab!

I also played around with pulsing of various elements using the sine wave block and Time blockĀ  to add some cool intensity effects to the cube. This one below is bouncing the SDF Attraction Force, Stick Force, and Turbulence Intensity. Since the particle brightness is implicitly affected by speed, the color dims when the turbulence and attraction force is lowered.

In the future, I plan on experimenting with external value inputs to have the user rotate and affect the cube, but for now I’m back to work on the physical controller itself!

Leave a Reply

Your email address will not be published. Required fields are marked *