A Dangerous Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
some will call destiny some will call it fate and you know some will call it the youtube recommendation search algorithm but something has brought us here together for the next 20 to 30 minutes or however long it takes me to explain how to turn yourself into graffiti and this is the nice kind of graffiti really because you can wash it off the wall immediately it just kind of walks away so i guess why not make a tutorial on this i know people are begging for this in the comments section they're like you know what we need a graffiti tutorial where we turn you into graffiti you know this was originally a corridor digital effect they had this video that came out a bunch years ago called brush with death and that's what this is inspired by um anyways here's the original footage that this is going to be based off of just so you can understand the workflow the story how do i mute this m there you go the story of how we're going to get to the final effect so really all you have to do is film yourself standing in a place you have the camera move around having some changes in perspective having some changes in parallax and then after you know you decide oh i've been waiting here long enough you just walk away okay so we are gonna take this footage and process it until it turns you into graffiti and by the way this is what the blend file kind of looks like in the end just so you can kind of get a sense of what we're doing we're just going to be creating some geometry with a projection and having a camera let me show that having a camera move around it uh which when you put it in the right angle uh will make it look like your graffiti okay let's get started uh start with video editing workspace as always you know this is going to be one of those tutorials where i'm like okay we're doing motion tracking we're doing all this and then for the last 10 we're going to do the actual effect because again most of this thing is actually motion tracking to get the movement of the camera you're going to need some motion tracking so add movie and we're going to import in our original video and for me that's going to be called base footage appropriately named we don't need the audio track and uh when you click play there's gonna be some caching problems but long story short uh we get our footage okay now you might think okay why don't we take this whole footage and convert it into an image sequence which by the way is the thing you always want to do before you start motion tracking and i could explain why frame rate independence whatever or you could just take my word for it zip your mouth and that'll work as well you might think okay we might need this whole footage for an image sequence but in reality we are only going to track everything up until the moment i move because the rest of it is just going to be the normal footage there's nothing crazy going on so let's trim this so that it doesn't go all the way to frame 250 in fact we'll use frame ctrl c while hovering over this control v is a nice way to copy and paste we are only going to go to frame 143 which is right where it seems like i start walking okay so this is what we are going to be dealing with output we're going to turn this into an image sequence png sequence is fine or jpeg or if you're one of those freaks living in your cellar living in your basement using bmp you can use that too you deformed little thing png sequence is fine no compression and we don't need an alpha channel because all the pixels are opaque we don't have any transparency that we need the alpha for okay so let's create a folder a directory for where we are going to export our sequence and we are going to call it living in the basement because that's just what is on the mind kind of like binding of isaac for the people here who are old enough to know what that is okay uh we call this sequence underscore so that when we render it's gonna render as sequence underscore zero zero zero and zero zero one and it's going to progress for roughly or exactly a hundred and forty three frames so let's that let's let's wow let's let blender render that and here on the desktop you're gonna see that we have this new folder this new subdirectory or directory uh where we have our sequence going frame by frame by frame until we get to 143 and again this is where we're going to be doing our work the rest of it is just going to be footage that is unaltered okay so once you are done with that we can just abandon this project like a kid that was only paid attention to for like 10 minutes we're going to get rid of them sorry and the rest of this is where you want to start paying attention so let's go full screen what we are going to be doing first of all is motion tracking then doing the geometry and projection et cetera so promotion tracking always movie clip editor and import in the original sequence you can either click the first frame or i like to click all of them because i'm paranoid that everything won't import if i don't do that so let's import that in and you can see that we have a couple of issues immediately or maybe you don't see you know maybe you need a new pair of glasses but either way there are some issues here first of all you're going to see it's playing very slowly that's for two reasons first of all we have a caching problem right you see these purple frames the ones that are cached um they don't exist for the rest of this footage because we need to cache them so that's one thing we need to solve and another thing is the frame rate is going to be wrong so even if we do cache it the speed is not going to be what it's supposed to be so originally the footage was 29.97 frames per second i believe and we could just round that off to a nice 30 because uh image sequences are frame rate independent so we may as well just pick whatever we want but something close to 29.97 so we get near real-time playback and also for this project to be 143 frames without you typing that in set scene frames will do that for you and prefetch will load everything into memory okay and you might be thinking okay we have everything set up but there is actually one more issue and that is the color everything's super washed out it's not that my skin's that white i am a white boy but not that light right so render tab color management make sure this is set to standard okay and this is gonna make sure that you don't have any weird view transform uh color management stuff going on here okay so basically what we've done here is set up our movie clip editor so we can begin tracking and assuming that you've never tracked before maybe this isn't the tutorial for you but assuming you've only tracked a little um we are just going to go through a basic explanation of how we track the shot without getting into the nitty-gritty details okay so what i'm seeing here is a shot that the camera is going pretty smooth and we're just going from left to right or right to left i don't know and there's a bunch of stuff that we can track in fact the whole wall this brick wall is basically composed of places we can track along with the floor which is why i filmed here we prepared for this intentionally okay so for the trackers i'm going to enable normalize this is going to say tracker even if there's a bit of lighting change you know don't worry about it okay so normalize is going to say kind of ignore some various or some little some fluctuations and lighting changes okay and for the type of tracker we can go up this list where as we go higher all the way up to perspective the tracker is going to be more effective however it's going to take more time to compute so maybe don't do that whereas location computes very fast but you know it's only going to be tracking a pattern area for changes in location we don't want that so i'm going to go pretty high up the list actually which is not something i always do we are going to go to affine which is going to track changes in location rotation scale and shear in other words affine transformations okay so i'm going to pick an example tracker it may or may not work i'm going to pick this one right here again that is control click and you can scale alt s for the search window so again this is the pattern area that we are going to be tracking and the search area is the area this is the bounding box where we are going to be looking for this pattern area frame by frame by frame okay and you might be thinking okay why did i track this particular spot in the brick wall well it's because that all of this kind of looks the same and in fact that's actually an issue for blender for tracking here it doesn't know if it's here or on the next frame it's here they're kind of repetitious identical but this one has some white stuff going on here so it does look a bit different okay once you have your tracker set ctrl t to track forwards and l to lock and we'll see if it makes it yep that made it through all 143 frames okay and the story about motion tracking is always get at least eight trackers that are very reliable meaning a tracker that lasts throughout the whole shot with minimal error so this is a good tracker like it really is and as for our trackers we want them distributed in two dimensions so some of them on the right side of the frame some of them on the left etcetera and also in three dimensions some of them in the foreground some of them in the background okay so now let's track something on the floor again getting that good distribution in 2d so now it's towards the left and in 3d and let's do ctrl t see if you can hold on to that and even if you think that blender won't be able to track something chances are if this thing has a good amount of contrast low amount of motion blur etc a blunder will do just fine and you can see this does seem to be doing a pretty good job i am seeing some hops but we could fix that or we could just proceed and see if it you know raises an issue later down the line okay so i'm just gonna keep tracking now going a bit faster again ctrl t okay that one's fluctuating a bit too much for my liking i'm gonna have it grab on to a feature that's a bit more distinct something like that and really once you get really good at this and you know which trackers you need to put down you can just put them all down at once and just hit ctrl t on all of them and in fact let's try to do some of that right now so let's try to do one over here again i'm picking this part of the brick because it has slightly more detail than some of the other areas in the brick let's also try something over here and again we're just trying to get at least up to eight trackers if not more more is better unless you get to a bit too much and then you have this all this you have this issue we're trying to do uh best fit models and all that so let's try three trackers at the same time shift clicking so all them are enabled and then ctrl t which should track three times as slow uh because it's handling three at the same time okay so it seems like this tracker made it all the way through let's just check that it didn't hop between bricks that did fine control l and the other two we need to do some work on so for this one it made it all the way over here we just need to increase the search area since our bounds are too small ctrl t and now that made it all the way through lock it and then finally this tracker let's see what's the issue with this one this one's just a bit problematic he yells in the night night tears okay so 111 i don't think this one's gonna make it all the way through it's probably gonna get clipped out although it does seem to hover inside the frame let's make it a bit smaller see if we can survive no maybe it has a chance not at all okay we'll lock it we'll keep it even though even though it doesn't make it all the way through the shot it is still valuable information now this of course is a good area to track and we should be done with tracking soon i know it's boring it's not fun you just want to turn yourself into graffiti you just want to spray paint i get it however this is a important part of the process in fact this is most of the process i need to stop picking trackers that leave the frame uh let's go for one or two more things on the wall and call it a day something like that okay that's good how many trackers do we have at the end one two three four five six seven in other words we need one more tracker let's pick something here although then again if we pick something there eventually my body will intersect it so we do need to be a tiny bit careful so let's try to pick something a bit further out and then to track backwards it's not ctrl t but shift control t and that will go backwards okay i think that should be good and we'll find out in just a second so we have at least eight trackers uh going throughout the shot ideally you do have a bit more distribution maybe some stuff over here or maybe some stuff over there and just so i actually followed my own advice let me just add a tracker it's not gonna last throughout the whole thing but just so it exists uh once we have at least eight what we consider solid trackers it is now time to solve oh i didn't save that's a good point uh make sure to save that's important um now that we've done our tracking we we can try to get a camera solution and see if it works so let's go to the solve menu without looking too much into this without you know the definition of keyframe and keyframe a and b and all this just enable this which is going to find keyframe a and b for us which are basically two a pair of frames uh where there's a good amount of parallax in between don't worry about it just enable this and we'll do it for us solve camera motion okay so we we got a solver of 0.93 pixels and if you don't know what that means what is 0.93 pixels is that an a plus an f minus etc as long as this is under a pixel you have gotten what is generally a pretty good solve and you can see that over in the graphs uh control middle mouse to do this these red and green lines are the x and y data of our trackers and the blue line is essentially in some sense our camera solve you want this to be as close to flat or somewhat close to flat as possible which it seems to be doing uh just to get a slightly lower solver we can also tell blender hey you right now you are tracking our camera right these trackers belong to our camera and the more we know about our camera the better solve we can get and right now it's assuming our lens is at 24 millimeters that's how zoomed in we are when in fact that's probably not the case so let's have it refined for focal length as well and then we get down to about half a pixel which is very good so now we have our track how do we or we have our solve really how do we put this in 3d space how do how do we do our graffiti etc okay so now things get interesting 3d viewport this is where we're viewing all our nonsense our default cube which i'm going to get rid of to get this camera data inside the 3d viewport just hit setup tracking scene long story short you don't have to do any complicated stuff there is a button there for you oh why do i always forget to turn off that alarm every time okay this gets everything into here and you can see this does give us a you know it does bring our camera into 3d but it doesn't look like the floor is actually attaching and that's just an issue of orientation so what you're going to do is just pick three markers this one this one and this one for example or any three markers that are on the floor in fact let me pick three that are near the foreground not the one in the background and just hit floor which is going to reorient our camera so this is before our camera is hovering above and this is after it's going to reorient our camera so it still has the same type of motion uh but it's reoriented so these three markers which we can see with motion tracking menu so you can actually enable your motion tracking empties as long as you select your camera and it's kind of hard to see with this stuff here whoops you can see that now these markers are on the floor right so these are the markers corresponding to the trackers that we have in 2d okay so now this is oriented to the floor however if i add in a plane there's still a couple issues it's kind of off to the side so just pick one of these that's on the floor set this as the origin so it's over here one slightly to the right and say from here from the origin to this one we can say that is going to be the x axis so reorients that nicely and then finally we could do a bit of scaling so between these two markers have let's say one unit in between or if you want it to be smaller two unit in between two units in between etc so i'm going to set that to 1.5 and that should be fine okay so we are now done with that let's stay in the 3d viewport for the rest of the shots okay so what i'm going to do is a bit more manual orientation by just selecting the camera and then you can just move along the y-axis x-axis etc let's do it like this we want our plane right here to be going along the floor so i'm just going to rotate along the z-axis until that is parallel at least somewhat parallel to this line between wall and floor although we are going to do some shape key stuff to adjust it later so don't worry too much about it and just shift this down do a bit more rotation you can see it's not perfectly parallel and there you go okay so it doesn't need to be perfect this is a pretty good job and now for the rest of this what you want to do is create some geometry wherever your actor your cg matter your whatever is going to be in the shot okay so we have a floor edit mode extrude on the z-axis to get the ceiling so now we have this kind of geometry that is tracked onto our shot okay so again make sure that no matter what frame you're on this geometry is overlapping in other words you won't be able to see your actor in solid mode is overlapping um your actor right if we had something like this where it's like that yes it's going to be overlapping in the end right but in the beginning it's not going to be so make sure you have full coverage throughout the whole shot but don't waste space on the you know areas where you don't need to so stuff like this and it doesn't need to be this tall and maybe could be a bit further out okay so let's see this is fully covered that's pretty good and um you could you could try to refine this again and again and again but you don't need to get crazy over here okay so now that we have our geometry the question is how do we project and what we're going to be projecting is the last frame the frame right before i turn into real life so it's as if this is frozen in time projected and on the wall is the graffiti how do we project this and have it go backwards in time so it still looks like graffiti and it goes over our footage well to do this what we are going to do is go to the shading workspace we are going to create a material for this so make game material and input a image texture and can you guess what image texture we're going to be using that's right we're going to be using the last frame because that is what we want to project so just scroll down or just hold that to go faster and now we have our last frame and i know what you're thinking beautiful we've done it how could it look better than this right well to get this projected on correctly we're going to we're going to need to either mess with the uv coordinates or with any coordinate system so you could change this like window coordinates that would do it or something that i like to do a bit better is add in a modifier and we're going to use a uv project modifier in other words take our uv map and alter it based on some kind of projection and that projection is going to be altering our original uv map with an aspect of 1920 divided by 1080 so just take your whatever resolution x over y which in this case is going to be 1.778 you might have a different aspect ratio so do watch out for that and for the projector you might think okay we want to use our camera which kind of makes sense but causes quite a few issues as you can see we don't necessarily want to use our camera in fact what we want is our camera but only on the last frame so it's not doing any of that movement one simple way to do that is we're going to take this which right now is moving with this camera solver constraint we're going to take that and use the bake action command which is going to just enable all this and click ok it's going to get rid of that constraint and instead just put all this in keyframe so the motion is still the same but now it's keyframed i'm going to take this camera i'm going to whoops i'm going to duplicate it and this is going to be our projection camera and for this one we just want it to stay still on the last frame and you can do that by selecting the last frames control i to invert and then delete so it's going to be keyframed on the last one so the camera is moving and it matches our projection only on the last frame okay so for our projection go back to the plane modifiers and project based on our projection camera and it's almost looking correct like you can see the graffiti is there except you know my knees are looking a bit you know this is me after i do my two mile run that i can barely do my knees aren't liking it so it's almost correct although we do have a good amount of distortion and good in the sense is bad but not bad as in the sense of good right this is a bad thing right to fix this we actually just need more geometry which you can either do by subdividing and you can see the more subdivisions we have the more corrected this is or for something slightly more procedural we'll just add in a subdivision surface but make sure this is above by the way 2.9 with or is it 2.83 i don't know 2.9 with the fact that you can drag modifiers so nice uh set this to simple and the higher we go the less distortion we're gonna have so let's stick with four okay so now what do we have now we have let's go to rendered mode so we can actually see it now we have a setup where we have our graffiti and then all the way here and then right here it's gonna basically everything's gonna line up and i can just walk away now of course we do have a couple issues first of all it doesn't look like it really matches and that's just because of a visual thing if we go to our camera the one that's moving and go to its background images just make it more visible and then we're actually going to be able to see what's going on here um so that's one issue a second issue is we have this corner thing uh where it's kind of repeating the texture and this is because right here uh this is slightly out of frame and it's trying to create texture to project we want to tell blender okay fine cool that's a nice it's a nice trick that you can do uh we don't care we don't want that so go to the shading workspace and take repeat which is going to repeat the texture which is exactly the issue that's happening here and set it to clip in other words make it black wherever we don't want it uh to extend past the original bounds of the image in other words don't repeat that's what clip does but you know black is good it's better than texture but we want it to be transparent so final thing you need to do i swear to god we're almost done mix shader add in a transparent bsdf in other words tell blender wherever it's black make it transparent so add that in and where do we want it to be transparent well it's going to be based on the alpha channel in other words a channel that says where we have texture and where we don't so just plug that in there and then because ev and i now i always say this because ev is garbage our transparency is not going to work until we enable our blend mode to be something like alpha blend hash or clip so i'm just going to pick alpha blend okay although it does create that issue where now we need to disable this so we can actually see what's going on i wonder if the other ones do that it seems like alpha hash doesn't so maybe that's my new favorite okay so now we have this going on where you know we don't have any messy projection stuff because a lot of this is actually just clipped out as transparency and now the final issue kind of the big one is while it does line up here on the last frame um everything before that you can see especially with the pipe there's quite a bit of drifting going on and is that because our motion track was bad well no you know our solve was 0.5 a pixel error i mean our geometry should slightly be lined up correctly i mean really the issue is our geometry isn't perfect uh but instead of just going back to square one and fixing everything there is a kind of easy fix it's kind of a cheat that will make everything look better and that's just kind of modifying our geometry um just kind of literally moving it until it looks right and we're going to keyframe that process and in other words we're gonna wow in other words we're just gonna be using shape keys okay so what i want you to do is add an a shape key on the last frame this is gonna be just you know the geometry right here we're not gonna mess with it we're also going to add in another shape key and this is gonna be the one where we mess up uh so that's gonna be our second shape key and we'll do it on this frame where what i'm gonna basically be doing is just taking this vertex and just lining it up so that this pipe lines up and this wall lines up just a bit and this is why by the way we did our subdivision in the modifier not here because then we can only move one vertex instead of a bunch of them when we add subdivision etc so this is a nice reason to do that so just kind of line it up the best you can it doesn't need to be perfect uh because it's already a weird looking effect so if there's a bit of artifacting or artifacts because of this that's not too big of a deal and there you go so now we have a our basis shape key and our second shape key that can be visualized when we increase the slider and i think what i'm going to do is i'm going to go up to like frame this one and maybe we'll edit it a bit more so it lines up on this frame we're going to keyframe this so it's fully using this shape key and then on the last frame we are going to go all the way down back to zero so it's not doing anything weird okay and and wow that was weird and for the interpolation type i'm not going to use the bezier curve i'm going to use a linear so that we have a smooth interpolation or in fact a linear one so once you do your shape keying and you do your correction again you could spend more time doing this now it's essentially time to render but if we go to the compositing workspace you're going to see there's a whole bunch of garbage a whole bunch of nonsense here right all we want really is our foreground uh render layer which has you know this information here which by the way you should go to film transparent so it's you know transparent thing and we could slap stuff under it really all we want is that and the footage that we're going to slap under it so we can get rid of this we can get rid of all these things so that really all we have is the foreground render layer going on top of the movie clip with an alpha over node doing our overlaying now one thing that you might have noticed is why is there all that stuff there in the beginning well it's because we hitch a setup tracking scene back in the movie clip editor when we were messing with this we hit setup tracking scene and what it does is it creates the compositing node situation that we had before and also it creates a background render layer which we don't need okay so just get rid of that it will save you on render time okay so right now i think we should be ready to just do a render so let's do f12 so it's going to render our render layers which looks exactly like you'd expect and then we have the footage and we slap it on top and you can see it's looking pretty good however you can kind of see let me move this you can kind of see the boundary where we go from render layer to footage and that's because yes it's not perfectly lined up but also it's because you know we're not making it very easy on ourselves what we want to do is take our alpha channel which is defining this boundary and make it slightly feathered or actually very feathered so that it's easier on us right so that we don't have to do so much work with lining up with shape keys etc to do this you can just add in a dilate and a road node it's actually all you need you set it to feather and you take your feathering and you put a negative number so it actually caves in by let's say a hundred or actually yeah a hundred pixels so this feathers then by a hundred if you did positive 100 it expands it that's a um dilation we want an erosion okay and if we use this for our alpha as as what goes in for the mixing factor for alpha over so we put this in here now you can see that we have the same thing but everything's just a bit nicer so this is before with the harsh edges and then after and you can mess with this procedurally to get the type of boundary you want and really for the rest of this all you have to do is render out not just this frame but all of them you do the control f12 and it's just going to be going frame by frame by frame and by the way something you might have noticed there it's a good thing i did that you're going to notice that some of this is actually appearing over here and that's because of the feathering so you might want to pick a smaller number or actually create a larger piece of geometry that goes further along the wall so do so that we don't have this issue but long story short you're going to add more shape keys so that this lines up and in my original you know i spent a lot of time doing the tracking and shape keys just so it looked correct yeah that's the story anyways um what you want to do is basically render this out and again you have to hit f12 every time to update this composite network and what you are going to get is basically once you do that you're going to get the first part of this effect right here the kind of trippy part and you can see if you look kind of closely here you can see some kind of um areas in the brick that aren't lining up perfectly for the exact same reason as before so you're going to get pretty much everything up to frame 143 and then in your favorite you know video editor whatever you are then going to cut back to the rest of the footage where you don't really have any kind of effect so there you go uh you now know how to make the graffiti effect it's not that difficult but there is quite a bit of troubleshooting and motion tracking and all that so anyways there you go hope you learned something if you want access to exclusive tutorials that are not posted on either of these channels defaults cube or cg matter or maybe you want behind the scenes or early access or maybe project files for you know blender projects like this etc or maybe you just want to fund tutorials like these patreon is the place to do that um i appreciate all i think nearly 500 of you it's gotten to be quite a bit uh that are part of that you are directly all together as a bunch of people funding these tutorials but i do thank you for that it's um it really is the only reason that i could make these every single day there you go now you know how to turn yourself into graffiti so maybe don't you know do a bunch of vandalism keep it on the on the down low anyways that's it that's the tutorial
Info
Channel: Default Cube
Views: 63,146
Rating: 4.9690723 out of 5
Keywords: blender, tutorial, beginner, 2.91, 2.9, brush with death, cg, cgi, 3d, vfx, animated, animation, motion tracking, tracking, cycles, eevee, compositing, nodes, projection, projection mapping, camera tracking, uv project, procedural, visual effects
Id: X8AjB_DQ3V0
Channel Id: undefined
Length: 28min 26sec (1706 seconds)
Published: Wed Oct 21 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.