Creating flow maps for After Effects for multi direction displacement maps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
recently somebody posted on redddit and asking how to achieve this effect now there are some plugins and things for After Effects which will do this one which called Loop flow which is very good and works very well however there a way to do this with flow maps and flow maps are a thing which are used a lot in video games and 3D design and they're essentially a red and green image which tells the program direction to push the pixels in and we can do this in alrix using displacement map now the way displacement Maps work are they take a guide layer and they use the pixel values of that layer to move the pixels of another layer so let's just quickly go over the basics of displacement Maps so with displacement Maps you would use something like a gradient like this and you take an image something like this and you apply your display bement map to the image you specify the map in this case the gray map and you can then adjust the horizontal and the vertical displacement I'm going to change this to stretch map fit cuz they're not quite the same size so now when I do this you see the gray levels are pushing the pixels left and right or up and down depending on which one I choose let's just focus on left and right the time being now we've got black and we've got white we've got gray if we apply a posterize effect to this and just set it to three levels so black gray white and then we go to our layer and we make sure this is set to affect some masks we can see what happens is the white pushes it this way the black pushes it that way and essentially what it's doing is it's taking the values of the black and the white if we think of them as gray being zero black being one white being minus one it's multiplying this value here by that number and moving the pixels accordingly pretty simple now the interesting thing is the displacement most people seem to use just grayscale images for displacement Maps which is fine but you're sort of missing out a little bit on the full functionality because as you'll see when you apply the space map the default settings are red and green red for horizontal or X and green for vertical y so if I put this back to zero if we look at a red green map like this which is what I've done is I've got two gradients red to no red green no green and now they're Blended together with a additive blend mode such as lien of screen so we get this mixture so we've got fully red here fully green here mix and mixtures of the two in various places right now what happens when we apply this to our layer so let's choose our red and green map and yeah keep that all the same and now when I push these the red is affecting this and the green is affecting this so only the horizont the red only affects horizontal green only affects the vertical now if i t these values to a slider I find that a bit easier because I want to kind of keep them the same so I'm going to tie them to a slider which is pretty straightforward Expressions pickip them up okay and so now I can control them simultaneously and what you see is happening is the pixels are moving based on this underlying image and it's a little bit confusing with the gradients but if we take our gradient and we apply another posterize again to it we set it to levels three just to keep it simple so we've got nine values here of color various combinations fully red fully green mixes of of the two we go back to our layer make sure this is on effect for Mas we adjust our slider we can see what's happening is we're getting directional movement based on the color values so good way to there's a handy little guide which you can find if it's Google flow map or something always lined on the internet and you'll see we've got the E we got the X with the red the Y with green and then these directions north south east west Northwest northeast southeast Southwest and so what can you do with this well here's a use case example so while ago I had a client who had this image here and they had they had this image created using some sort of uh procedural generation to create this really nice sort of flowing fluid like image and now they wanted it to move they wanted it to flow and it was too expensive to get the company originally created these images to simulate that so they asked if I could figure out a way to do it and so what I did is I created a flow map and so this is a very simple red and green image telling After Effects how to push the pixels around and then you apply displacement to it so if I play you can see it's pushing the pixels around we've got pixels flowing this way pixels flowing that way pixel flowing up all around so how do you create a flow map well that is a little bit more complicated because to create a flow map you need to be able to draw in such a way so that when you move your pen or mouse in a particular direction the color of the line changes now Photoshop does not allow you to do this uh however you can do this in critter which is an open source painting software um I haven't used it very much but I've used it to do this so let's take a look at how to do this so I've got this image of this quad bike on some Junes with lots of nice sand um and let's so what we need to do is we first of all need to create a flow map for this so let's take our image and hop over to Critter and create a FL so here I am in critter it's very similar to photoshop you got tools and layers and also like that now I haven't used it that much so I don't know that much about it but I do know how to create a flow map in it so what you need to do is you need to bring your image need to create a new layer to paint on and you need to go up the brushes here and the brush Ed is quite nice because you can whil you're you can check your brushes a little scratch Pad here that you can draw on to check your brushes you need to go to the engine and you need to find the tangent normal engine and there might be some presets here but take one have a look this isn't exactly what we want this is just one color so you need to adjust it slightly and what you need to do is you can set up the um the shape and the flow and all this other stuff but the important part is you need to go to tangent tilt and you need to make sure rather than tilt it's on Direction and then for After Effects I found the best settings are to have red as plus X and green as minus y but and then you'll see when we draw on here we start to get these red and green Strokes so you go up you get green you go down you get red okay you ignore the blue ignore the Z and then we go let me just close this and then we just need to start drawing where we want our flow to go so you just start drawing up and maybe some little curls over will be nice on the edges and just draw you don't need to be too precise okay and then when you're happy with the image you need to save it out so maybe turn off the background layer save it out as a PNG those settings should be fine okay and then we're done in critter so let's hop back to After Effects now let's bring out so we got and we've got our flow map so let's bring our flow map in here it is um we turn it visibility off let's apply it to spacement map to image and we want to select our flow map we want to it's on Center map should be fine because we based it on this exact image so it should be exactly the same size let's add a slider to control both values at the same time so we want to control the horizontal and the vertical and now see adjust our slider our FL map is pushing the pixels based on colors that we set so we set a key frame let's make go minus 100 and we'll go to the end and set it at 50 say and then we come against si smoke there is an issue where we've got these hard edges now that's pretty easy you could spend longer drawing your flow map might be a good idea or you could take your flow map you've done try it apply it and take flow that you've done apply a fast blur to it make sure that you have effects of Mass on displacement M set and that will soften those edges and then there you go the other thing you'll probably want to do is you'll notice that this is warping the whole image including the quad bike so what you probably want to do is rather than applying it just to this flat image if you probably want to take these settings and you want to isolate your background and your Rider if Photoshop say and then you want to apply those settings just to the background and then you'll have it just on the Dust
Info
Channel: Ignatz Johnson Higham
Views: 870
Rating: undefined out of 5
Keywords:
Id: RClJvUnJjqY
Channel Id: undefined
Length: 10min 46sec (646 seconds)
Published: Sat Feb 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.