I’ve been working on a vector field editor/importer/exporter off and on since I got UE4 and think it’s stable enough to share at this point. It allows you to use particle simulations and vector math to influence the velocities at each point in the volume. The tool works on Bender versions 2.70 and up (untested on earlier versions).
There will be more features added over time, but there shouldn’t be any major changes to the UI at this point.
Download here (Github)
I usually upload new changes to the ‘testing’ branch, but I think master and testing are currently identical.
Mostly finished documentation available here (Github wiki)
Example files (MediaFire):
Vector field in Blender
Vector field with velocities shown as 3D lines in blender (random noise):
The same vector field in UE4, used locally in a particle system with velocity-aligned sparks:
Feedback is very welcome. Have fun!
I don’t even know how to make use of this yet, but it’s great to know this exists =]
This is awesome! I’ve been curious to try vector fields but I only use Blender for 3D art. Thanks for sharing this with the community. Can’t wait to give it a spin!
Wow, fantastic! I will definitely be giving this a try!
Thank you so much!
Can you animate the vector field, can the vectors move when imported to UE?
Thanks for the feedback, I’m glad it’s useful to others.
@unit23 - I think the only dynamic changes that are possible in the engine at the moment are location/rotation/scale transforms, changing the Intensity and (not 100% sure on this one) Tightness. I did play around with fading between two global vector fields that are in the same location on a map by fading the Intensity of one in while fading out the other, but keep in mind with that approach that there is a limit to how many vector fields can overlay each other.
There is a mention of dynamic vector fields using a texture in the official documentation, but I don’t think (or know if) it’s usable in the UE editor yet.
Can we use this for commercial project?
Absolutely. You’re free to do whatever you want with the files created by the script. There’s no license on the script itself, so I guess I have to specify that you’re also free to make any changes to the script as long as they don’t involve removing my name and re-releasing it elsewhere .
Thank you for this great plugin.
If I do something with this plugin I will leave a credit to you.
does someone care to make a video tutorial regarding creating vector fields in blender? The wiki on github is really good but I still dont get the wanted results out of it and don’t know how to control particles this way.
It would be great if you would post some video tutorial.
I’m working on some new features for the editor and improvements to the wiki at the moment, so any video tutorial I’d make at the moment would be outdated in the next few days. I’ll probably try to make a video tutorial when the new features are finished, but I have 0 experience at making video tutorials and an old, cheap microphone, so I can’t speak for the quality of anything I’d produce
There will be more tutorials for different use cases on the wiki in the next few days (if nothing goes wrong on my end with the new version).
@mrbarti and Xter: I can try to help you out here or through pm if you want, just let me know what you’re trying to accomplish. I’m no expert at using Blender, but usually end up figuring out how to make it do what I need it to.
This addon is awesome.
I’ve spent about 8 hours trying to figure out all the necessary settings in Blender and UE4 to get it to work.
I still don’t know most of it, but I have a much better idea now.
I believe these are the most helpful links in getting it all to work acceptably.
tl:dr (watch and do/read in the following order)Intro to Cascade: Creating a Sprite Emitter | 04 | v4.2 Tutorial Series | Unreal Engine - YouTube
Tips for newbs (myself included):
-I recommend watching the Intro to Cascade: Creating a GPU Sprite Emitter | 05 | v4.2 Tutorial Series | Unreal Engine - YouTube first. (Skip to 9 minutes in and check out the basics of what’s possible with vector fields, namely the key modules.) Then hookup Isathar’s magic before starting from the beginning with Intro to Cascade: Creating a Sprite Emitter | 04 | v4.2 Tutorial Series | Unreal Engine - YouTube.
-Intensity and Tightness settings on the Local Vector Field module are very important (Note: Intensity on the actual fga asset also affects the outcome (if you’re curious why the particles still move fast even when the Local Vector Field module’s Intensity field is low, double-click on the fga in the Content browser and lower the intensity there)). On a side note, the VF Rotation Rate module is the main reason why the GPUsprite effect in the Epic tutorial looks cool (I think).
-In Blender the particle life time is pretty important if you want to see how your forces will play out (just select the particles created by the addon, then go to particle settings and adjust the lifetime (kind of matches the frames)).
Suggestion: I didn’t notice anywhere in the documentation on here GitHub - isathar/Blender_UE4_VectorFieldEditor: Blender addon that adds support for working with 3D ve about having to select ONLY the particles before trying to export. I think it might help if that were a little more clear. It took me a while to figure it out. A)Selecting everything or b) selecting volume and particles only before export seemed to produce an unusable fga.
-Any pointers on choosing the best frame to export?
-Might you know how to export the vector fields for the uassets vel_219 and or VelocityGrid60 in the example content that Zak uses in part 5 tutorial I linked?
Best regards, and thanks a lot for taking the time to make this addon for blender and sharing it.
Thanks for the feedback and good tips.
I’ll spend some more time on the editor this weekend, and will hopefully get around to adding some of your pointers to the wiki. I’ve already fixed the confusion about what to select (so selecting the bounding box should work for exporting) and it will be online with the next update.
In response to your questions:
- The best frame to use will depend on what kind of effect you’re going for and which calculation method you’re using.
- If using Velocity or Angular Velocity, I’ve gotten the best results selecting a frame around the middle (if 32 frames lifetime, around 15-20), just to give the forces some time to influence the particles.
- If using Distance, pick the frame at which the particles have traveled around the distance you will want them to travel in a second in the engine.
- Sadly, it wasn’t possible to export FGA files from the engine the last time I checked (4.7, I think).
Something else that’s not included in the wiki yet that I just figured out a couple of days ago: If you use Distance as the calculation method, you can actually use Blender’s Particle Edit mode to paint (comb?) directions. You’ll have to uncheck Keep Root in the particle edit Tools tab options, and check Draw Particles to be able to see what you’re doing. This will only work if the the particle cache is baked, and can produce some pretty cool effects.
edit 11/01/15: I just updated the tool with some recent changes (presets, export selection fix), but probably will not get around to editing the wiki today.
Just checked out the update. It’s nice. It’s even easier to use now.
No problem here with #2. I’m pretty sure the examples you provided are more complex than the fgas Epic provides in Example Content.
I was just curious “how” they used “what” forces.
I tried your update for just about 30m and this is what I found:
So long as the particle is selected, it doesn’t matter what is selected before export now. It’ll produce a usable fga.
I exported with the following combinations of selected items and the same/identical fga data was exported:
-particles and bounds box
-particles, bounds box and camera
-particles, bounds box, camera, and a model with an armature and keyframes
On a sidenote, having set up the forces and the desired frame (in accordance with your recommendation in step “1” in the post above (-_o)), adding new objects and stuff to the scene thereafter (like the camera, model and whatnot), I HAD to make sure I clicked the “Update Data” button at the top of the FGA Tools menu. Failing to click Update Data will export nothing, and produce no error message (afaik).
So with that said, whenever I export I always
① Select the particles in the 3d viewport
② Click FGA Tools>Update Data
③ Click FGA Tools>Edit>Calculate (just for good measure)
That Distance >Blender Particle Edit mode sounds really cool. I’ll give it a whirl when I can. Thanks a lot for the hint!
One last question:
I’m not an animator, but I take it these static vector field data files are similar to say an extreme keyframe in an animation; where it’s only possible to capture one state of any given particle’s life.
Currently in Blender I have a vortex and a magnetism force influencing the particles. The strengths of the two work such that frame 0-30 shows the particles moving in place frantically, and then in frames 31-45 they all dissipate outward in a vortex motion.
Am I correct in thinking this type of particle effect where the particle has two dramatically different states cannot be captured using a static fga? Reading threads from last year it seems animated fgas still aren’t implemented.
Regardless, thanks to your tool I can easily do some cool stuff. Thanks again!
Sadly, the closest thing to seeing how Epic’s vector fields work I’ve found was to place them in a map as global vector fields (or a particle system as local) and enable Vector fields under the visibility options.
It’s weird that you have to click Update Data before exporting, since the only time the saved velocities should be reset is when adding another vector field to the scene. The reason it’s there at all is that the script stores the velocities in temp arrays/lists that are faster to access than the property collections used to store the velocities permanently (a bit like short-term vs long-term memory, in a way).
I’m actually looking into removing the need for the button altogether, but performance during calculation could suffer. I’m currently playing around with building the arrays each time Calculate is used, which would be closer to the standard way of accessing them anyways.
I think I briefly mentioned this earlier in the thread, but here’s some more info on animating vector fields:
While fgas can’t be animated, it is possible to fade in/out the intensity of a global vector field in Blueprints or C++, and you’re able to enable/disable them, as well, so you could switch between two different vector fields in engine to achieve the effect you mentioned (with global vector fields anyways, not so sure about local ones contained in a particle system).
You could start out with only the first vector field being active and enable the second one when it’s needed, or start with the first being at 1.0 intensity and the second at 0.0, then use lerps to fade out the first while fading in the second. I know the number of global vector fields that can overlap is limited, but don’t have the source code atm to check what the current limit is (I seem to remember 8 or 12).
I’ve played around with this kind of thing a little bit to get a character to push around leaf particles on the ground with its feet and have its body push particle smoke around while walking through.
Apologies for the late reply. “It’s weird that you have to click Update Data before exporting, since the only time the saved velocities should be reset is when adding another vector field to the scene.”
After further inspection it seems this most likely was my fault. I started a new blend and couldn’t get it to happen. Yeah, it’s weird - before I reported the issue I verified it at least 3 times. Anywho, please pretend I never said it.
I don’t think it’s a prob at all to have to push the update asset button, just granted the player knows that it need be pressed whenever they put new forces in the mix. I read most all of the wiki docs you provided, but since it was all new to me, in the end it’s more like I just glanced over it. Regardless, whatever you could do to make it more awesome would be appreciated. The latest update is sweet as is, imho.
You’re right, you sure did hint at animated vector fields (fading global VFs on and off). Hehe, when I saw that note, I didn’t even know what a static one was. Now it all makes sense.
What you mention seems a like a great workaround for the lack of animated VFs Epic talked about implementing some time last year. I gotta hunch it might have some limitations over animated VFs, but then again they don’t even exist.
When I get some time. I will refer to the info you provided about global VFs to see if I can get GPUsprites to seemingly seamlessly/naturally transition from one state to another.
Thanks again, Isathar. The thorough response is much appreciated.
Great, and many thanks for your effort, i will try this now!!
Does anyone know how to create something like this? (It’s in the example project) :
I see that these are Wind forces placed along the curve… But on Curve modifier I can place only meshes, since forces don’t have modifiers… Any clues?
I’ve wrote to Mr. Isathar, but he seems to not be on forums quite often, so maybe some other users of this awesome tool will help me?