C++ and I are friends again, but to be honest UE4 makes that pretty easy.
I’ve been playing around with the Vector Fields in UE4, which are essentially a 3d grid of forces that can be applied per frame to particles.
You can’t really author them in UE4, so I wrote some plugin code that lets me randomly generate them (please excuse the crappy VFX):
Next up, I wanted to be able to change data in Vector Fields on the fly.
I have plans for a whole bunch of different “Modifiers”, including spherical impulses (explosions, etc).
For now, I have a basic motor / vortex type thing going on, that can be turned on and off through blueprints, blended in and out over the top of the random data, etc:
Places I might take this (if I can escape Civilization: Beyond Earth :)) :
Sample the vector field data in the Material system, so that I can have particle effects and material flow effects tied together somewhat (water on a surface follows the direction of water particles flowing near it, explosions cause materials and particles to react together, etc)
Run a really simple inflow/outflow pressure simulation through the grid to replace the random initialisation I have now. Kinda like what my rather clever buddy Ben Millwood did recently for 2d water flood:
Ben Millwood’s amazing flow map tool of glory
Move the Modifier functionality to GPU (animated vector fields in UE4 already implement some of this).
I’m still getting pretty decent frame rates in debug builds of the editor, so I’m not sure how much I care about it, except to tick the “yay, compute shaders in UE4” box
Rather than just grabbing the vector at the position in world space, interpolate between vectors using wavelet turbulence technique to add high detail flow (Wavelet turbulence). Currently well beyond my understanding, so would take me months, but you never know 😉 At the very least, this would be a cool thing to do when sampling the Vector Field data in a material
Honestly, they could probably have a bunch of engineers work on this tech for years and years, and we wouldn’t see an end to the cool things that could be done with it.
The data structures don’t lend themselves to having a grid across a whole world (octrees instead of a flat array, maybe).
Vector Fields don’t currently work with anything but GPU particles (I think, unless I’m missing something). Would be nice to be able to use them with ribbon particles (for smoke, bullet trails, etc), make them work with dynamic objects, cloth, hair, confetti…
Extending them to have additional arbitrary channels added to them (pressure, temperature, etc) could be neat.
Things I would also like to see, but wouldn’t probably attempt myself:
I could go on, but I’ll leave it there for now!
If nothing else, this has been a relatively painless exercise in implementing custom SceneObjects and Components in UE4 🙂