Free Python module to create vectorfields, flowmaps for Unreal & Unity



Hi! A few weeks ago I wrote a small python module to create vector-fields and flow maps that can export to formats that Unreal Engine (FGA) and Unity (VF) use. I wanted to share it with you in hopes that it may be useful to someone.

I admit it’s not very artist-friendly because you have to use python commands to provide formulas for the evaluation of the vectors over a grid. This is because at the time I just needed a simple method of getting a vector-field for an electric dipole, without any additional software licenses or complicated setup.

If you have a python installation, you can simply install the module with pip install vectorfields. (If you use Anaconda and create a new environment, make sure to use conda install numpy beforehand.)

I already provided a few special classes like Vortex2D or ElectricDipole2D, but the classes you would be using most often are CustomUV2D and CustomUVW for which you provide functions. The 2D classes have a resolution of 1 on the Z-axis. You can get a cubic field from them with the .to_3d() method. Use the .save(<filepath>) method to export to either FGA, VF or a supported image format.
Find out more in the short Documentation.

Here are some examples:
Electric Dipole

I’d be happy if you want to contribute to the github repository. But feel free to use the code in your own projects.

And I would also love to see your creations using this.


Just a quick note for Unreal Engine Niagara users: For vectorfields to work with Niagara you should use the latest version 4.22, currently in preview. Otherwise you’re stepping into a world of pain.


This is really cool! Will give it a try tonight :slight_smile:


If you have any suggestions or ideas, feel free to ask.
I’d like to see, if you come up with something. As you see, I haven’t explored the possibilities in parametric 3D vector fields yet or really exploited the flowmap export.