Search Unity

MegaFlow - Vector Fields & Fluid Flows [Released]

Discussion in 'Assets and Asset Store' started by SpookyCat, Nov 3, 2014.

  1. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    I am at the add the "megaflow particle controller" part... I can't seem to be able to do this one?

    Also the red rings are not showing up from the splines but I can still create the flow.

    I have an error listed also:

    !NullReferenceException: Object reference not set to an instance of an object..
     
  2. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    As stated I can't locate the "megaflow particle controller"..

    ahh help?
     
  3. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    "To use the MegaFlow Particle controller you just need to add this component to any object in your scene, once added select the flow source you want to use to control the particles, and then select the particle system you want to control."

    As far as I can tell I have been asked to do the impossible:

     
  4. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Hi There, sorry for the delay but as I said in my message I have not been able to get to my desk for a while and I am working through the backlog. The MegaFlowParticle components are most certainly there but it does seem for some reason Unity is not picking up the components when you do a search, should maybe submit a bug report to Unity that its search is not working correctly. Anyway you can just drag the script from the MegaFlow folder onto your game object or go to the Components/MegaFlow menu and select the component you need there. As for the error message could you maybe submit a support ticket with the line number and cs file that is causing the error and maybe some steps so I can recreate the issue.
    Chris
     
    Last edited: Aug 13, 2015
  5. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    I was surprised that Unity had to recompile MegaFlow as it does with older scripts as I know you have kept it updated.

    Update old scripting language ..I can't remember the verbiage.

    Could that have something to do with these issues?
     
  6. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    I have Mega Flow Particle but not Mega Flow Particle New which is what I need according to the tutorial and I can see that Mega Flow Particle does not have the Framenum slider.

    Also as I mentioned that error !NullReferenceException: Object reference not set to an instance of an object.

    That occurs when I add a spline to the Create Flow from spline script

    A simple enough thing to recreate as it happens every time and like I said I don't see the red rings like in the tutorial video.
     
  7. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    Ahh srry I had changed my Layout to be more like an animation package ;)

    I have the console now with default layout here is the error:

    MegaFlowCreateFromSpline.GetCol (Single alpha) (at Assets/Mega-Fiers/MegaFlow/MegaFlowCreateFromSplines.cs:388)


    I have now docked the Console to the game window in the 2x3 layout.. I think that Console should be naturally docked somewhere in every layout mode.. weird that it is not ;)

    I'm still new to Unity and with "out of sight out of mind" I missed that Console was missing lol
     
    Last edited: Aug 15, 2015
  8. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just a quick note to say that a very small update has been submitted for MegaFlow, this fixes an issue on later versions of Unity 5.x where the awake function was not being called for the Create Flow component which would cause an error in the console and flow paths to not be visible, this is now fixed.

    Changes in v1.21
    • Fixed a bug for Unity 5.x users where the CreateFlow component would give an error due to the component not getting an Awake call.
     
  9. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    Is this a new error:

    Assets/Mega-Fiers/MegaFlow/Editor/MegaFlowEditor.cs(695,34): warning CS0618: `UnityEngine.Material.Material(string)' is obsolete: `Creating materials from shader source string will be removed in the future. Use Shader assets instead.'


    I just got it when installing uScript PLE.
     
  10. pluMmet

    pluMmet

    Joined:
    Jul 18, 2015
    Posts:
    133
    * My Mistake the Demo Scene works.. I thought the effect would show in the work window but only in the game window with it playing.

    I can't get my scene to work but I should be able to figure out why with a little playing around :)



    Also rings are appearing now for Create Flow but the Mega Flow Particle (Script) is not showing any effect on the particle system I created following your video tutorial or your Demo Scene 'flowtest'

    I'm new to Unity but I'm fairly sure that this is not functioning correctly.
     
    Last edited: Aug 19, 2015
  11. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Unity have made some changes in the 5.2 beta regarding creating materials from a shader string, we will be doing an update when 5.2 is properly released which will replace the create material with an included material.
     
  12. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    I may be daft, but can you use this as sort of an AI vector field that gets dynamically updated?
     
  13. me-not-you

    me-not-you

    Joined:
    Jul 14, 2015
    Posts:
    6
    Do you think it would be possible to export particle data from Modo to be used in Megaflow?
    I know I can export a .BIN file of the particle cache data but I'm not sure what else.

    Any help would be great.
     
  14. j_ho_74

    j_ho_74

    Joined:
    Aug 13, 2014
    Posts:
    24
    Hi
    anyone on Realflow? I can´t get the *.bin files to the Megaflow Source as the scripts says that there are "no fluid data are loaded." Whereas I get meshes and particles from those bin files in Cinema 4d

    Thanks for any hints.

    j
     
  15. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @j_ho_74 - I am sorry for not replying before but we just do not get emails telling us of new posts on the forums, that is why we have a support ticket system on our website so we can make sure we deal with direct requests for help. If you can submit a support ticket at the website with your problem we can help you out.

    MegaFlow does not have direct support for importing RealFlow bin files, it supports to import of FumeFX FXD files or FGA vector field files. We can add support for RealFlow bin files if there is enough interest and we have some example files to work from and docs explaining the file format. We were told by RealFlow that there exporters to convert RealFlow to FumeFX out there as well as FGA exporters. If you can share an example of a RealFlow vector field bin file we can see about writing an importer for you. Again if you can use the support ticket system and send an example file that would be great.

    It is pretty frustrating to find a 1 star review saying we don't provide support when we have a ticket system in place and clicking on the 'Support Website' link in the asset store will take you directly there. You also say MegaFlow is not importing RealFlow bin data files containgin particles, Hydro data and domains and other RealFlow data, stating that Cinema 4D will import that data, MegaFlow is not Cinema 4D it doesn't claim to be able to import RealFlow bin files, particles systems, hydro domains etc it imports vector field data in fxd and fga formats.
     
    Last edited: Dec 13, 2015
    John-G likes this.
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @mittense - Again sorry for not seeing your post, the vector fields could be used to move any object so it could be used for controlling some player characters or herds of objects. You can use the create flow system to build the vector fields inside Unity and you could in theory change the splines and or blocking objects and have the vector field update but it is not something I have tried personally.
     
  17. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @me not you We do not have any direct support for Modo bin files but if there is a doc explaining the file format and you have some example files we can take a look at adding support.
     
  18. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
  19. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Thanks for the links but MegaFlow does not import particle system data it imports Vector Field data, that data can then be sued to control a Unity particle system. If there are any docs on the format of Modo vector field formats or maybe there is already and FGA exporter for Modo like there is for Maya, Blender and Houdini.
     
  20. coldpizzapunk

    coldpizzapunk

    Joined:
    Aug 20, 2014
    Posts:
    30
    Is there any visuals of this asset being utilized for a waterfall in unity? Just curious if you or anyone else with this asset has something they could share. Thanks!
     
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    That would be an interesting test, if anyone has done anything like that I would like to see it as well. If I can find some time I will try and do a scene but I am no artist so it may take a while, or possibly there is a tutorial example for one of the packages that creates a waterfall effect I could borrow, will do a search.
     
  22. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted an update for MegaFlow, this fixes an error for some Unity 5.x users where an error would be generated due to a derived class not getting the Awake call, we have also made MegaFlow fully Unity 5.4 compatible and added a beta feature for those who wanting to use MegaFlow in a 2D project and have flow frames that only have a z grid size of 1, this would stop the GetFlow interpolation from working as it would require a depth of at least 2 grid cells to do an interpolation correctly, the system now detects a z grid depth of 1 and will use an optimized interpolation system to get the flow value and will set the flow z value to 0. If anyone is using MegaFlow in a 2D project and use this new feature do let me know if everything works as you want it to and if there is anything else that can be added.

    Changes in v1.22
    • Beta of optimized 2D flows, if Z Grid is 1 then the system will use an optimized grid interpolation and z flow component will be 0.
    • MegaFlow fully Unity 5.4 compatible
    • Fixed a bug for Unity 5.x users where the CreateFlow component would give an error due to the component not getting an Awake call.
     
  23. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Another quick update, added a check for empty velocity data in a flow frame to stop getting errors if you did decide to add an empty frame, also added a warning to the FXD importer if it finds the FXD file contains no velocity data to parse, and finally fixed an issue with the FXD importer if you managed to get different grid sizes in your FXD file, the importer will now use the correct size for the velocity grid data.

    Changes in v1.23
    • Added a check for empty velocity data in a flow frame, stopping an exception error.
    • Added a warning in the console when trying to import FXD data that contains no velocity data.
    • Fixed FXD parser for when there are different grid dimensions for velocity, smoke and grid fields.
     
  24. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Another small update to MegaFlow is in the Asset Store and on our website, this adds fixes for the latest round of deprecated methods in Unity 5.3 and 5.4, note in 5.4 there will be warnings about the legacy particle system, we are not removing the legacy particle system support in 5.4 as some users may still be using legacy particle but will remove it for 5.5. We also fixed a bug with optimized data and the green drag handle will now scale correctly.

    Changes in v 1.25
    • The Green Handle Gizmo will now scale with the gameobject transform correctly.
    • Fixes for deprecated methods
    • Fixed bug which stopped MegaFlow working correctly when flow data had been optimized.
     
    John-G likes this.
  25. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted a small update to the Asset Store, this now makes MegaFlow fully compatible with Unity 5.5. We also updated the version of MegaShapes included with MegaFlow. Note as part of the 5.5 update we have had to remove support for the Legacy particle system, the code is still included with the asset you just need to remove the conditional option in the component source file and its editor source file as well.

    Changes in v1.26
    • MegaFlow now fully compatible with Unity 5.5
    • Legacy particle system removed for Unity 5.5
    • MegaShapes lite changes applied to MegaFlow.
     
  26. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Hi SpookyCat,

    MegaFlow is great, and it's working well. I was just wondering if I can have two megaflow sources in the same scene at one time? Currently I have one very large one (it covers a large area), so I was wondering if "two" or even "three" sources are possible in the same scene?

    I tried doing two before and it didn't work for some reason, but it was awhile ago, so I forget why right now. It seemed like the gameobject that created the flows for me was some how linked to one source, and one source only -- and if I tried to do two sources, it wouldn't know which source to "build" for.

    Thanks for any help.
     
    RED_Spot likes this.
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    You can use multiple sources or multiple frames of data on a source but currently you need to add multiple Controllers to your particle system to use them. It is a feature we have on the todo list to add support for multiple sources in the same controller but it does work just fine with multiple controllers. Each controller has a 'scale' value which can be used to blend between sources or frames of data if needed.
     
    RED_Spot likes this.
  28. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    We have submitted an update to the Asset store, this makes MegaFlow fully Unity 5.6 compatible. We have also brought the version of MegaShapes included up to date by adding the all new spline editing features and spline smoothing system making it much nicer and easier to edit your splines. We also added an undo system for the spline editing making it simple to back track over any changes made to your splines. You can see a video of the new spline editing features below.



    Changes since v1.28
    • MegaFlow is fully 5.6 compatible.
    • Added new improved spline smoothing, you can now choose between old and new smoothing modes in the Shape Inspector. New method will produce a perfectly smooth spline through all the control points.
    • Added option to auto smooth the spline when you drag a knot, this will recalc the knot control points if you have changed any.
    • Rewritten the spline editing bit, making it easier to select and move spline knots and handles.
    • Move gizmos are now only shown for the currently selected knot.
    • To edit a spline knot you just need to click the green sphere for the point you want to edit, that will then select that point.
    • Option to freeze y movement when editing spline points, useful if using the free move handle type.
    • No need to click and drag mid point gizmos to add a new point you can now just click the circle to add a new knot.
    • Move handles now point along the spline.
    • Added extra circle gizmo at end of open spline for easier creation of splines by easily allowing addition of knot on the end.
    • Add Undo system for spline editing, you can now undo any changes made to a splines knots by clicking the Undo Edit Spline button.
    • Added option to set the max Undos that can be stored.
    • Fixed bug that caused splines to get corrupted if you tried to use the Spline animation builder on a spline with an imported animation.
    • Added the missing SetHandles method to the MegaShapes API.
     
  29. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just to let you know we have an update coming that will fix the problem some people are having using PositionHandles when editing splines, ie they cant be selected and dragged for some reason. There seems to be some bug in Unity causing the problem, we have tried 3 different ways of doing it and they all have issues, so we have written a custom PositionHandle that works. Just so you know if you are having problems then switch to Free handles as they work fine.
     
  30. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted an update to address the problem with PositionHandles not working. The new update uses a custom PositionHandle to get around the problem that seems to be internal to Unity.

    Changes in v1.29
    • Fixed a problem with the Position handles when editing splines.
    • Splines now default to Free Handle mode for editing.
     
  31. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted a small update to the Assetstore that fixes the depreciated methods for the final release of Unity 5.6.

    Changes in v1.30
    • Removed latest depreciated method calls for the final Unity 5.6 release
     
    Velo222 and elbows like this.
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Submitted a small update to the Asset store this makes MegaFlow fully compatible with Unity 2017. We also updated the fga importer to work with Blender fga files that use floats instead of ints for rgb values, now works with both ints and floats, and also fixed a small bug in the spline exporter which could delete existing splines in a shape when using the 'Add' option when importing more splines to a shape.

    Changes in v1.33
    • MegaFlow made fully Unity 2017 compatible.
    • Fixed a bug where splines were being deleted if the 'Add' option was used when Loading a spl file.
    • Updated MegaUitls.cs so if MegaFlow and MegaFiers used together there wont be missing methods errors.
    • Changed FGA importer so it works with Blender FGA files that use floats instead of ints for grid dimensions.
     
    Karearea likes this.
  33. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Submitted another quick update, we have improved the Spline Undo feature to undo all the changes you could make to a spline instead of just the moving of knots, so adding or deleting knots, flattening, reversing, open or closing the spline etc. and also removed the need for specifying a split character or decformat value for import sequences of FLW, FGA or FXD files.

    Changes in v1.35
    • The Undo for MegaShapes now recognizes adding and deleting of knots as well other the other options that change the spline such as Autocurve, scale etc.
    • When importing FLW, FGA or FXD sequences you no longer need to specify a split character or decformat.
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Submitted an update to the asset store, this fixes an issue with editing splines in Unity 2017.2. We have also made MegaFlow fully compatible with Unity 2017.2 and 2017.3, and foxed the missing moving source demo scene flow data in 2017.

    Changes since v1.35
    • Fixed issue in Unity 2017.2 which stopped splines from being edited in scene view.
    • MegaFlow made fully Unity 2017.2 compatible.
    • MegaFlow made fully Unity 2017.3 compatible.
    • Fixed moving source demo scene missing its flow data in Unity 2017
     
  35. SimLoop

    SimLoop

    Joined:
    Jun 17, 2013
    Posts:
    25
    Question? Do you think MegaFlow could be used for a wind systems for a paraglider?
     
  36. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted an update to the Asset Store, this makes MegaFlow fully compatible with the upcoming release of Unity 2018.1. We also made the Create Flow From Spline system use all splines in a shape instead of just the selected spline and we added the ability to export Flow data to NetCDF format.

    Changes in v1.38
    • Update Create Flow from Spline to use all splines in a shape to create the flow
    • MegaFlow made fully compatible with Unity 2018.1
    • Added option to export vector field to NetCDF file format.
     
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @SimLoop - Sorry missed your post, we do have users using flow data calculated in sim packages or Maya Fluid to calculate lifting forces on bodies, also in car sims to get down force on front and rear wings so it can help if you want that extra detail, there is an API call to quickly sample any point in the flow to get the speed at that point so you could sample multiple points along a wing.
     
  38. Ice_Time

    Ice_Time

    Joined:
    Jun 29, 2016
    Posts:
    5
    How to create *.fga file
     
  39. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @Ice_Time If you submit a support ticket at our website we can help you out.
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Submitted a quick update to the Asset Store, this makes MegaFlow fully compatible with Unity 2018.2 and also fixes an issue with Unity 2017.4 which stopped you from editing the spline.

    Changes in v1.39

    • MegaFlow made fully compatible with Unity 2018.2
    • Fixed an issue which stopped spline editing from working in Unity 2017.4
     
    Karearea likes this.
  41. byrontik_croomo

    byrontik_croomo

    Joined:
    Jul 9, 2018
    Posts:
    4
    Hi, Love your work. I noticed in the top video that you have the vector field visualisations showing during game play, how do you do turn this feature on.I'm running Unity 2018. Thanks
     
  42. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @byrontik_croomo - If you could submit a support ticket at our website we can help you out.
     
    byrontik_croomo likes this.
  43. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted a small update to the asset store and our web store. This makes MegaFlow fully compatible with Unity 2018.3 as well as Unity 2019.1 beta

    Changes in v 1.40
    • MegaFlow made full compatible with Unity 2018.3
    • MegaFlow made full compatible with Unity 2019.1
     
  44. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Had a request to be able to see the Flow data in runtime builds as ooposed to just in the editor so did a quick Visualize script that will do the same rendering of the flow grid, velocities and ribbons. Just add this component to your Game camera and select the flow source and you will see the flow data in your game view or builds. This script is very basic and is provided as an example of how to display the data.
     

    Attached Files:

    John-G likes this.
  45. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hi, I would like to use this to simulate the flow of a floating rigidbody down a river, would this be possible? Thanks
     
  46. RookieAndy

    RookieAndy

    Joined:
    Nov 15, 2018
    Posts:
    2
    Hello, I imported the .fxd file made by Fume FX from 3ds max to Unity to prompt No Smoke. What is the reason?
     
  47. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @derkoi - That would be doable you could easily set up such a simulation in say Maya and use the output with MegaFlow, Or you could make it your self with a single spline directly in MegaFlow.

    @RookieAndy - Sorry I didn;t get a notification for your post, if you can submit a support ticket at our site we can help you out.

    On another note we starting the rounds of bringing all our assets up to date for the latest versions of Unity so a small update has been submitted to the Asset Store that makes MegaFlow fully compatible with Unity up to and including version 2020.1.
     
    John-G likes this.
  48. RookieAndy

    RookieAndy

    Joined:
    Nov 15, 2018
    Posts:
    2
    @SpookyCat
    hi,I have emailed the invoice attachment to you
     
  49. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @RookieAndy - I found your email in my spam folder, for some reason my ISP is blocking your account as Spam, if you could submit a support ticket at our website and include your invoice number we can help you out.
     
  50. bbaugh007

    bbaugh007

    Joined:
    Jul 23, 2018
    Posts:
    39
    @SpookyCat Is it possible to create a vector field where half of the particles from an emitter go one way and the other half go another way? I am trying to create something similar to the effect shown at the 1:23 mark of the below video:



    It also need to be smooth where particles that flow in from outside the bounds of the field start flowing as soon as they enter the field.