User Tag List

Results 1 to 29 of 29

Thread: [TOOL] Blender Vector Field Editor

Hybrid View

  1. #1
    2

    [TOOL] Blender Vector Field Editor

    Hey everyone,

    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):
    .blend
    .fga


    Screenshots:

    Vector field in Blender
    Name:  VF_BlenderShot01.png
Views: 5527
Size:  142.0 KB

    Vector field with velocities shown as 3D lines in blender (random noise):
    Name:  VF_BlenderShot02.png
Views: 5838
Size:  281.5 KB

    The same vector field in UE4, used locally in a particle system with velocity-aligned sparks:
    Name:  VF_UEShot01.png
Views: 5560
Size:  84.4 KB

    Name:  VF_UEShot02.png
Views: 5369
Size:  266.6 KB


    Feedback is very welcome. Have fun!
    Last edited by Isathar; 03-16-2015 at 04:11 PM. Reason: typo

  2. #2
    0
    Nice!
    I don't even know how to make use of this yet, but it's great to know this exists =]

  3. #3
    0
    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!

  4. #4
    0
    Wow, fantastic! I will definitely be giving this a try!

    Thank you so much!

  5. #5
    0
    Can you animate the vector field, can the vectors move when imported to UE?

  6. #6
    0
    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.

  7. #7
    0
    Can we use this for commercial project?

  8. #8
    0
    Quote Originally Posted by Blue man View Post
    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 .

  9. #9
    0
    Quote Originally Posted by Isathar View Post
    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.

  10. #10
    0

    RE:

    HI,
    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.
    Thanks!

  11. #11
    0
    Samaritan
    Join Date
    Feb 2015
    Posts
    85
    Hi,

    It would be great if you would post some video tutorial.

    Best Regards

  12. #12
    0
    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.

  13. #13
    0
    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)
    https://www.youtube.com/watch?v=7hC_QT4GLiU
    https://github.com/isathar/Blender_UE4_VectorFieldEditor
    https://www.youtube.com/watch?v=DcesEW380lc

    Tips for newbs (myself included):
    -I recommend watching the https://www.youtube.com/watch?v=DcesEW380lc 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 https://www.youtube.com/watch?v=7hC_QT4GLiU.
    -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)).

    -----------
    To Isathar,

    Suggestion: I didn't notice anywhere in the documentation on here https://github.com/isathar/Blender_UE4_VectorFieldEditor 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.

    Questions:
    -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.
    Last edited by kusokuso1; 10-30-2015 at 02:54 AM.

  14. #14
    0
    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:

    1. 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.

    2. 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.
    Last edited by Isathar; 11-01-2015 at 05:45 PM.

  15. #15
    0
    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 only
    -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!
    Last edited by kusokuso1; 11-02-2015 at 03:42 AM.

  16. #16
    0
    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.

  17. #17
    0
    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.

  18. #18
    0
    Woot! This is awesome!

  19. #19
    0
    Great, and many thanks for your effort, i will try this now!!

  20. #20
    0
    Champion
    Join Date
    Jun 2014
    Posts
    599
    Does anyone know how to create something like this? (It's in the example project) :

    Name:  Bez tytułu.jpg
Views: 3251
Size:  228.4 KB

    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?

  21. #21
    0
    Hey, I just saw your message. The setup in the example was created with the Wind Curve Force tool included in this editor (under tools).

    To use it, add a curve to the scene, perform any edits and subdivisions you want, and click Create New in the Wind Curve Force box with the curve selected. It works best on highly subdivided curves. It will place a force object at each point along the curve, each pointing towards the next (with some smoothing). You can tweak the strength, falloff distance, and falloff power of the force fields by selecting the curve during creation (or edit existing values by selecting the object named CurveForce(.X) in the scene tab, editing the values in the tool's box, and clicking Edit Selected).
    Last edited by Isathar; 04-15-2016 at 06:51 PM.

  22. #22
    0
    Champion
    Join Date
    Jun 2014
    Posts
    599
    Thank you very much! Now I get it
    Awesome tool, gj!

  23. #23
    0
    Is there a way to see how vector field would affect particles right in Blender? Or would I have to export-test-export-test-etc. until I am satisfied ?

  24. #24
    0
    Sorry about the delay, I didn't see your post until just now.
    There's no way to get a preview like that with the addon in its current state, but I'm going to experiment to see if I can get something like this working. I don't think there's a way to directly modify particle movement through Python but force fields should work (if not very efficiently for performance). Barring that, a custom Blender build may do it, though.

    Not sure if anything usable will come out of it, but I'll definitely try
    Last edited by Isathar; 09-08-2016 at 02:53 PM.

  25. #25
    0
    Quote Originally Posted by Isathar View Post
    Sorry about the delay, I didn't see your post until just now.
    There's no way to get a preview like that with the addon in its current state, but I'm going to experiment to see if I can get something like this working. I don't think there's a way to directly modify particle movement through Python but force fields should work (if not very efficiently for performance). Barring that, a custom Blender build may do it, though.

    Not sure if anything usable will come out of it, but I'll definitely try
    Thanks!

    So basically there is no way of knowing whether vector field works or not unless I export it and test it in UE4 ?

  26. #26
    0
    Pretty much. Displaying velocity lines in Blender is sadly the closest thing to seeing the final product at the moment.

    Baking the vector field's particle system transforms and advancing the timeline is also a good way to get a general idea of how the vector field will behave in the engine for simple systems, but this will only work if you're using force fields to set up the vector field to begin with. Any velocities created by the vector math functions in the tool won't influence the particles at this point.

  27. #27
    0
    Has anyone had success getting this to work with Blender 2.78? I can't get Blender to find the addon, either by putting it in the addon folder or by installing from file.

  28. #28
    0
    I just tested it again to make sure and it looks like it's still working for me.
    Assuming it's in the script folder, it should show up in the addon manager as 'Object: FGA Vector Fields'. Manually copying it to the scripts folder works, but I haven't tried installing it with the 'Install From File' function.
    Last edited by Isathar; 01-16-2017 at 01:38 AM. Reason: wording

  29. #29
    0
    I finally got it to work, thanks. And just in case anyone else is as clueless as me... When I unzipped the files into the addon folder, I guess there are two layers of folders: ...\Blender Foundation\Blender\2.78\scripts\addons\Blender_UE4_VectorFieldEditor-master\FGA_VectorFields. It would not recogonize it that way. By copying the 'FGA_VectorFields' folder to the 'addons' folder, it pulled it right up: ...\Blender Foundation\Blender\2.78\scripts\addons\FGA_VectorFields works just fine. Thanks again, I'm having fun with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •