Episode 15- Volume Density Waves using VEX- Not as scary as it sounds

This one was really fun.

 This week I learned how to make this thing:

VolumeDensityCube.1.jpeg



I’m not really sure what to call this thing, but the technical term for the effect given to it by the person who made the tutorial I learned it from was “Volume Density Waves using VEX”. Sounds scary, but it’s super simple and elegant. This effect is fun because you can build it, then apply it to any piece of geometry with just a few changes and tweaks to make it work. Actually, I was curious, so I threw it on another object called a Torus and it worked exactly how I deduced that it might, which was a weird change of pace.

Neato.

Screen Shot 2020-04-19 at 5.15.25 PM.png

Ok, so what we’re really doing here is fairly simple- just a few lines of code. We define a few variables that we’re going to reference in the geometry as randomly dispersed points on a grid, then create sin waves centered on those points that spread across the geometry. From there, we take this VEX code made for a 2D grid and copy it to a 3D cube using a node called a “Wrangle”. This gives us a “Fog” cube and we simply set the density of this fog to either %100 on, or %100 off. Whether it’s all the way on or off is determined by the time and the Frequency and Amplitude attributes we created, which is what drives the animation and gives it the waves. 

If your eyes just glazed over and none of that made sense, that’s totally normal. If not, you might be a gigantic nerd. Or a coder. Or both, you big nerd.

Screen Shot 2020-04-19 at 5.15.34 PM.png


That was a lot of technical mumbo-jumbo. 

Screen Shot 2020-04-19 at 5.15.44 PM.png

For most coders this is really simple stuff, but I’m still wrapping my brain around it. 

Screen Shot 2020-04-19 at 5.57.23 PM.png

And honestly, that’s pretty much it. I applied a texture to the geometry, gave it a background and some lights but that’s all. 

VolumeDensityCube.7.jpeg

Why this effect will be useful to me in the future: 

Since the animation is defined by the time and geometry, (not me tinkering around with hand-keyframing) it’s possible to use this as a fun effect applied to other things with just a few clicks, since it’s mostly VEX code. I’ll be keeping this one in my back pocket for sure.

Jakester-out

Jacob Sullivan