Create Realistic 3D Animated Water in After Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi what's up guys welcome to another projection 3d video tutorial today we'll be exploring various water animation techniques from some very simple ways to some of the more advanced after watching this tutorial you get answers to all your questions regarding water animation so if you're ready let's get started so we'll start with a simple method what we have here is a projected scene with animated camera it's a very simple animation you see i added some keys and moved the camera forward so now we need to create that water movement and add some rippling effect to it and we also need to correct water reflection because as you can see it is distorted when i play it back okay let's begin so we've added new projection copy let's rename it and call it displacement double click it and add a plane primitive to create animated map for our water here we don't need to project anything on it we simply need a white plane in space so what i'll do is i'll open material options and disable accept shadows okay and also increase scale this way we can see it better now i'll mask it like this we only need the part with the water okay great so now we'll be using fractal noise effect so head over to effect noise and grain and choose fractal noise now look the texture already looks a bit like water surface but the waves are too big for our scene and most importantly it's in 3d and moves along with the camera so physically everything is correct we only need to add some movement to the waves so open transform tab uncheck uniform scaling reduce scale width also height so that you get something like this okay good now our waves got smaller and maybe just reduce height a little more cool now to make water move we need to work with evolution parameter i'll add a key go to the fourth second let's see where it ends all right so let's go to the fourth second and also add some evolution value here let's see no that's too slow increase value by about five or six and just click zero to pre-render looks good right although let's add one more now open sub settings and add a key on sub offset see this value makes the waves move horizontally and this one vertically so let's add some values and pre-render and see what we get cool our animation map is ready now go to the main comp i'll close this select projection scene 2 go to effect distort displacement map now let's try to play it back nothing happens that's because we haven't selected our animated map yet click here and select displacement and change red and green to luminance since our displacement map is black and white let's have a look again okay we just made the waves move yep looks great already but we also need to fix the water reflection so that it doesn't get distorted so to do that go to effect menu distort and liquify set key on distortion mesh go to the end of the comp and fix the distortion hold left mouse button and drag also if you hold ctrl and drag it like that you can change the size of the brush so try repeating what i did carefully and try not to spoil the reflection should probably make the brush size smaller okay now here great we're done now let's try to correct the distortion of this large reflection as much as we can slowly but surely okay let's see we should fix this part let's have a look again also here okay i think that's enough enable displacement map and pre-render looks very nice no distortion water looks nice and rippling very convincing all right now for some final touches if you look over here you'll see the black waves are visible at the edges this is because of displacement map to fix this click ctrl d and duplicate projection scene 2 and then delete displacement map and liquify that's it pre-render again all right our animation is complete this is the easiest way and actually most scenes can be animated this way and by the way we animated water in this scene from our demo video in the same manner we just added liquify effect and fixed reflection just like that here are animation keys on the first and last frames and also this displacement map for ripple animation and here's a map that uses displacement map everything's the same just like in the scene that we've animated just now alright so now let's take a look at another scene okay so and this one everything's pretty much the same reflection distortion fixed with liquify and here's the map so let's look at a more complex option like where we can fix reflection distortion with liquify we have another tutorial called advanced modeling techniques where we model this same scene but we didn't do anything to the water so now is a good chance to open that scene and animate it now it's not all that simple here first of all we don't just see the reflection but we also have leaves at the bottom of the river there and it's not so easy to fix reflection distortion there so there are a few things you should know so the first thing you should do is you should remove reflection distortion in photoshop so in photoshop we'll open projection image of the environment it's called bg and now i'll get rid of that reflection with clone stamp tool like this all of it great now let's erase the tree reflection now there's some reflection on the leaves so we need to be careful not to spoil the leaves that's why we take a sample from here good now save it i'll call it bg2 i'll go back to after effects replace projection image and projection scene 3 using the new image and now as you can see there's no distorted reflection whatsoever but this isn't the kind of thing we want so now we need to bring back the reflection but without distortion go back to photoshop open that college building and now let's just erase everything except the reflection we'll use eraser tool for that double-click on the background to make a layer take a brush and erase as you can see guys there's a leaf in the tree trunk reflection so we'll remove the sleeve using the clone stamp tool like so keep going let's add a black layer to erase it more accurately okay great i think we're done here let's save it we'll call it tree reflection i'll save it as png and now i'll go back to the very beginning in the history tab and leave the reflection of this tree and delete the rest okay good now save it call it bridge tree reflection save as png now heading back to after effects to import files we've just created drag them here then drag the tree reflection to composition window it's back now press p to open position parameters we should animate it in a way that it moves along with the scene and it doesn't stay in one place so i'll add a key on the first frame and then i'll go to the last frame to fix position like this all right now let's see yes that looks proper now i'll do the same with the second reflection file add a key on position and animate great that's just what we needed so what we need now is we need to make the waves move so in order to do that i will select projection scene 3 add a scene okay we have a new copy double click it add plain primitive cool already it's where we need it let's draw a mask okay now i'll open material option and disable accept shadows add some fractile noise reduce scale to something like 20 then add key on evolution option go to the end and set 2. now let's pre-render and see well it looks like that's enough just increase map contrast okay cool and now let's open mask parameters add a bit of feather now go back to the main comp select projection scene 3 and add displacement map choose displacement map layer also change red and green to luminance okay great now for the most important thing copy displacement map and paste it over to reflection files pre-render and let's have a look pretty cool isn't it looks like our animation is ready we fixed distortion and so now everything looks right let's see it in full screen now shall we okay this one is also ready now i'll show you another example and the third method of creating a reflective water surface here in this scene we have a long building that goes deep and we see its reflection in the water so when we move the camera the reflection gets distorted so much that it's impossible to fix it with liquify see can't fix it so we should use a different approach here we can probably use the same method we used in the previous scene although we'll be doing something completely different so we're gonna have to create water and blender because it's the most effective method in this particular situation of course you will rarely need it but i will show it to you anyways so let's get started select all objects in the scene then click file expert obj and blender mark reduce scale by 100 times to reduce the scale of the scene name it save it okay great now export camera go to main comp select camera then file export camera again check reduce scale by 100 times and choose blender and save it cool now let's go back to blender we can delete this object we don't need it here okay so now we can import both our scene and the camera find that obj file we've created and imported i typically use middle mouse button a lot in blender and if you never use blender before you'll find out that in order to move camera horizontally and vertically you should hold shift and use the middle mouse button okay so this is our scene and now let's import the camera switch the scripting menu then click open and choose camera that we've just created then click play button okay now let's go back to the layout menu now you can see that we got our camera here and it's animated this means that we have it the same way it is in after effects it's the scene with the same parameters now we should create projection and we need a static camera for that so let's select our camera and then select duplicate objects when you move the cursor you see duplicated camera you can right click to put it back in its place now select all delete all keys when you delete keys make sure the time ruler is in the first frame now when i move forward you can see that one camera is moving and another one remains still so the static one will be our projection camera select it go to view cameras set active object as camera great now we'll look at the scene from the right angle just the way we have it in after effects so the next step is to project the image over the model select the model that's our scene and then go to modifier properties add modifier and choose uv project in the object tab select static camera projector cam 001 go to shading menu click here to see the scene from the point of view of the camera okay now we should add image to the projector to do that delete this shader first and then add a new node click add texture image texture great now connect the two select projection image click open and choose image.jpg nothing happened yet because our exported model doesn't have a uv map look in the uv project modifier panel the uv map tab is empty to add a uv map change object mode to edit mode as you can see the whole scene is selected so now press uv and choose cube projection great now our image is projected onto the model but as you can see it's distorted and it doesn't look very well and basically the reason here is that our uv modifier depends on how much geometry we have so here we have a few faces which is not enough and we need to add new faces to the model so let's leave camera view make sure you're in edit mode click ctrl r and you'll see the yellow line roll the middle mouse button and you'll see that there are more lines added so left click and one more time okay now click ctrl r again and add new faces horizontally let's have a look at it from the camera view now you can see that distortion is gone also let's add faces on the backside plane for this scene we only need to fix objects that are reflected in the water so leave camera view press ctrl r roll the middle mouse button to add more lines and add faces by clicking left mouse button great now horizontally okay let's go back to camera view we can leave edit mode now as you can see there is no more distortion but the picture seems to be sort of stretched vertically and that's because the aspect assumes it's a one by one image which it's not it's not like a hundred by hundred or thousand by thousand square so we need to calculate this ratio and that's actually very easy so let's head over to our projection image properties and here we can see that it's 90 20 by 1080 so let's just use calculator and divide these numbers that's 90 20 divided by 1080 equals 1.7 repeated and this is our aspect ratio so we're going to type it in here and now everything looks correct now it's time to create water so let's do that we should separate water surface from the model switch to edit mode click here to select faces then select water surface only water now right click choose separate selection great select the ground layer click delete and choose faces we don't need a ground surface here okay leave edit mode select water surface already you can see that it's a separate object we'll add new material we'll create real physically accurate water material let's delete this shader real quick and add a new one the one called glass bsdf put them together as you can see there's a reflection but it's a completely different reflection this is blender's base hdri map and so we need water to reflect in our scene to do this select viewport shading method render preview and make sure that in the lighting tab both scene light and scene world are checked so far nothing happened because we have default render engine selected go to render properties tab and select cycles rendering engine and now as you can see our scene is already reflected in the water now we need to work with it so i'll add waves and movement let's do that i'll add a bump map connect normal to normal add noise texture connect like so you can see the waves now we just need to adjust them first increase scale something like this obviously you can play with other parameters to get the best kind of result for yourself okay it's all fine but the waves seem a little too high so we need to reduce the strength great now it looks alright and overall i would say it's got satisfying result now we just need to animate the waves so i select this shader and press ctrl t to bring in mapping and texture coordinate nodes if that option is not available go to edit preferences add-ons search for nodewrangler and mark it select shader and click ctrl t again and we see the nodes now we need to add animation keys but first let's add timeline in the shading menu go to the very bottom of the right corner and when you see the arrow become a cross drag it up and this gives us a new window now click here and choose timeline great now we can add some keys make sure that you are in the first frame in mapping mode right click on z location and then choose insert keyframes go to the last frame increase value to 0.9 now choose the insert keyframes again let's see change viewport shading method to see the movement yep the waves are moving let's change direction replace keyframes also animate y location i'll go to the last frame and increase the value to 1.6 then right click and replace keyframes let's play it again cool there's only one thing left to do we should change keyframes interpolation mode to linear also for the keys yes very good now it looks the way we want it and so now let's take a look at the animation from the other camera select the animated camera go to view cameras said active object as camera cool now let's play again yep it's ready now press f12 to render and let's see the final image yes looks fine but we should probably make the water appear darker we can do that through the properties of the glass shader by making the color slightly darker let's have a look again excellent looks like our work here is done we can finish it all up in after effects now so in after effects we only need to deal with water so let's render the surface and then import it to after effects go to object properties then open visibility tab select the model not the water surface then uncheck camera here as you can see now there's only water left go to output properties and choose png file format and make sure you have rgba color selected because we need a file with alpha channel then go to render properties open film tab and mark it transparent great now render it and let's see great i'm going to save it now pick a new folder we'll call it render name and accept in render menu let's render animation wait for a while guys i rendered a few frames and noticed that the waves are moving too fast so we should change x and y location to 0.1 and minus 0.1 right click to replace keyframes good let's render again okay now let's go back to after effects let's import the png sequence we rendered select first frame make sure that the png sequence is checked click import okay drag it to the timeline good let's see what we get i'll switch to full screen yep looks great and convincing we just need to fix this we need to organize the scene move the closest objects to projection scene 1 objects in the middle to projection scene 2 and so on we didn't do this at the beginning because in order to export an obj file it was necessary to make sure that all parts of the model are in one comp so let's organize it now first add one more projection copy select projection scene 1 and add a scene double-click projection scene 2 select bottom planes and backside plane move them over to projection scene three okay now let's continue and move this one to projection scene one great now select the third scene and replace projection image choose temple bg select second scene replace projection image and choose template middle part image and it's done let's pre-render again okay well done the scene is complete looks very well i think this one was also done with the same method so i try to show you guys all the things and tricks you can apply to water surfaces so that you can animate them in almost any scene of almost any complexity now i hope you won't have any difficulties with this and thank you for watching and we'll see you again
Info
Channel: aescripts + aeplugins
Views: 7,803
Rating: undefined out of 5
Keywords: aescripts, Adobe After Effects (Software), After Effects, Script, Plugin, Tutorials, Workflow, Adobe, VFX, Motion Graphics, Solutions, Tools, Cinema 4D
Id: LzzqYkUq2go
Channel Id: undefined
Length: 40min 52sec (2452 seconds)
Published: Wed Jun 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.