Another Flow Field Editor Update

Probably final this time 😉 I was trying to find a compromise between speed and quality and came up with an idea of triangle-based cubic interpolation. Fortunately it turned out that such beast already existed – It’s several times faster than Natural Neighbour and gives better results than Linear Interpolation, although there are some artefacts in sharp transition areas (they can be avoided or overcome with smart point placing). Just another interesting option for preview during development. For production quality, you should definitely go with Natural Neighbour Interpolation.

DOWNLOAD: Flow Field Editor Update 2



  • Thanks for this piece of information – that shader certainly looks very cool, are you the author? If yes – good job 🙂 I will add an option to my flow editor to enable speed adjustments and alpha channel export in blue component. I was thinking about two modes of alpha channel generation – 1) manual, i.e. separate alpha field and interpolation 2) automatic, i.e. computed from flow speed – more speed, less transparent. If you have other ideas, just let me know. Cheers!

  • Yes, the shader is my work (and it the link belonging to the youtube movie, you can find the source.
    I downloaded your editor and very naively loaded a black & white jpeg image that looked kind of the P-shaped river you can see in the youtube movie. I added some arrows and was hoping for a nice flow field that would take care of the obstacles (I added an extra obstacle in the river). Allthough the flow looks nice, it seems to ignore the image. Is that how it is supposed to be?? Do I have to manually divert the flow around the obstacles?

    The best way would be the be able to load an image representing the height (or depth if you prefer), define some well (or a few) the produce some amount of water and calculate the rest. Wikipedia has some nice formula for the speed of water waves depending on their depth. But that might be really overkill for your current flowmap editor.

    – have fun!

  • Yeah, it’s supposed to be like that. In the beginning I also thought that automatic flow generation would be cool but on the second thought I figured that from artistic standpoint it would be beneficial to be able to adjust everything manually. So this is a flow field editor at the moment – completely manual. If I were to create a flow field generator, then yeah – depthmap and some kind of source/sink approach would be the way to go. If you want to create an obstacle then just place some zero flow (just click without dragging) points on its edge. Cheers!

  • Nice work on the flow editor! The Natural Neighbor export is really nice. One improvement I would suggest (and that is probably way beyond the scope of what you want to do with this tool, but I have to ask) is to be able to generate a 2d vector field of variable density which you could then groom the vector directions with a brush. That way you have a nice starting point for the flow field generation and still leave it up to the user to define the details.


    • I was surprised that cubic interpolation doesn’t do any better but I guess it’s sadly more suited for regular grids. As to the vector field – actually that was my original idea. I was also looking for stationary fluid motion equations, you know – so that you could just define the direction or sources/sinks of the fluid and compute a stationary solution of flow with given obstacles. If I recall correctly such solutions actually exist (which is rather intuitive) but I suck at maths too much to be able to do it quickly and I have little time ; ) But the initial estimation why not… but what exactly would you like me to compute? A gradient of intensity??

      • What I meant by “generating a 2d vector field” was to be able to set up a variable X by Y grid of vectors, all at the same direction and magnitude, just to give you something to start with. Then you could edit/delete vectors to get closer to your desired effect. The grooming tool would be an editable size and intensity, and would just drag the vectors in the direction of the stroke you lay down on the canvas.

          • Thank you for taking the time to implement this!
            I’m sorry it took me so long to get back here and test it.
            It’s pretty much exactly what I asked for 🙂 The editing brush is essential! Two things that would make it better would be the ability to adjust the amount of an effect the brush has on the direction, and possibly the magnitude of the vectors. A falloff on the brush (fading out at the edges) would be a useful feature as well. The icing on the cake would be to vary these values with a Wacom pad’s pressure sensitivity. Last request, I promise!: You need an ‘undo’, preferably unlimited.

            I agree though, a pixel based approach along with guides might be a better idea. I’d have to hear more about what you have in mind. It would have to give you at least the amount of control that you’re getting with this approach. I’m a little cautious going that route, just because it sounds a bit like using the Liquify tool in Photoshop, and that tends to be a little haphazard.

            Side note: the zip file was missing ‘libstdc++-6.dll’.

            Thanks again for looking into this!

          • Also, I don’t think I vocalized this enough. That was seriously impressive that you came back with an update…the same freaking day! I’m so glad you were interested enough in it to do that 🙂

    • It’s just a matter of recompilation. However it already works perfectly in WINE. I’m planning to release the source code eventually.

Leave a Reply to admin Cancel reply

Your email address will not be published. Required fields are marked *