Paper? Let's BURN IT PROCEDURALLY (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so there's this optical question about whether book-burning is okay but we're just gonna take that and throw it to the side because today we're burning papers which might be wrong but something about it is just so right it looks so good it's completely procedural meaning everything's driven by nodes in blender and now that I've done the best intro ever that's not gonna let you leave I guess we should just begin the tutorial so today we are covering paper burning that's right and this is just a plane and everything else is completely driven by nodes meaning that you know you just click play and it does the paper burning so I mean it's not the best looking effect in the world because I didn't spend that much time on it but it's a very very good base and let's talk about all the control we have so clearly swiping from side to side but what if I told you we can control the angle of the burning so now can go from this side to this side and you can change that as it's happening you just don't want to pick a value that's too low yeah you can rotate it you can control kind of the quality of this burning so you can make a little kind of like a line or very very scattered and you can see it kind of works with the burning and there's a bunch of other stuff we can control like the brightness of the fire etc but I think we should get into this tutorial which warning some of it might be a bit advanced if you're not used to node so stick around and maybe learn some advanced stuff ok so what I'm gonna do is I'm gonna start a new project I'm gonna be using version 2.8 3 but I think 2.82 should work actually no vector rotate node use 2.8 3 which is now the main version so I don't know why you wouldn't be using it ok cue get rid of it I'm gonna replace it with the plane why because planes kind of look like paper and they look even more like paper when you resize them like this and yeah that that's the modeling already halfway done with the tutorial congratulations halfway done next is everything that's left is just nodes so you've already done a lot of the work ok so how are we going to make this material that has the paper has the burning it goes from side to side it's procedural well it's a lot to think about it once I say we take it step by step so first of all making material I'm going to call it paper and I think first order of business should probably be making this look like a line paper to do this I'm actually going to use a image texture that I downloaded on Google Images it's free just go to Google Images type and blind paper download something that's what you're gonna use so image texture node plug that into the surface and then for the texture I'm gonna use whereas I got some weird photos here we're just gonna use paper and you can see that the texture is mapping correctly in terms of orientation but there's a big gap at the top and bottom and that's just because of the nature of the picture but we can fix it because right now this is by default using UV coordinates meaning it's using the UV map that's what it means so we just open up the UV editor for this object and you can see that we can just kind of manipulate the UV like this which if we have both at the same time you can see how that's affecting everything so let me just do that again this is affecting the UVs live that's the idea so I'm just gonna shrink this down a bit more and yeah it's not perfect but who is perfect really maybe scale it just a bit okay cool so now we have our paper maybe yours has holes maybe yours is like grid paper really doesn't matter just the point is image texture note and let's save wouldn't want to lose all this beautiful beautiful what progress okay so we've done this I think next order of business is we have the paper and now let's make the burning line going from side to side which later we can rotate in all this so to make a line going from side to side if you've seen my laser tutorial it's pretty much the same idea what we're gonna do is we're gonna use texture coordinates and specifically we could use generated we could also use object but what I would recommend is using UV because the nice thing about UV is that it kind of deforms with the geometry like it sticks on to it as if it's a texture slapped on this is why UV coordinates are nice and we can separate them by XY and z components really just x and y because UV czar just two dimensional entities you can see with the x separation we have a gradient going from left to right along the x axis is 0 to 1 y axis this way and really we could use either X or Y for this I'm gonna use Y because it seems a bit more natural for this to burn from bottom to top then left to right okay so how do we make the line what I like to do math node set it to compare so right now we're feeding and y-values to compare let's give it a bit of epsilon and I go on the steel a lot so let me just quickly describe what's going on here the reason this makes a line right here is what it's doing what the compare note is doing is it's taking Y and comparing it to 0.5 so input 1 compared to input 2 so we're saying how close is y to 0.5 with a threshold a distance a radius of this epsilon so again this is just saying make it white wherever Y is within point zero two distance of 0.5 meaning you make this bigger that's gonna take a more area because more of those points qualify and if it's zero no points qualify and the other thing this means is that this value what we're comparing it to can be animated which kind of looks like going having the line animate bottom to top because we're comparing it to different values with the same threshold okay so there is the main idea so now we have thickness and we have position I think the next order of business after we pick a good thickness maybe divide this by two by the way you can just type in math expressions in here / - next order of business is even though we have this nice and animated all right we could animate it it's kind of like very boring it doesn't have any of that distortion that doesn't look like fire and that's probably the next thing that we should tackle so again what do we have here we have UV coordinates being separated so we can extract the Y value that we're then doing some math for to make this line if we want to distort it it would make sense that we go back to the beginning we kind of mess with everything in here so that all the steps remain the same it's just that we're feeding different texture coordinates into it this is another trick I talk about all the time we're gonna use a noise texture Y if we want to add noise to our lecture coordinates what easier ways there than just adding in a noise texture it makes sense and we're just gonna add these two so we're kind of contributing information from both of these so let's make it vector math boom and you could use a factor you could use color the differences factor has the same for x y&z it's it's kind of like a one-dimensional value that's maps of the entire vector and color should have different stuff for x y&z it really really doesn't matter I'm just gonna use color since technically it has you know more information so what have we done here we've take UV coordinates added we say contribute the noise textures now we have noisy UV coordinates and it looks really really weird and we could animate it in all this but it doesn't really look like our line from before and this is because and here here comes a bit of an explanation so get ready what the noise texture is is it map safe to every point on our plane we have a noise texture every point on our plane is going to have some number between 0 and 1 that's determined by the noise texture and we're adding it everywhere because we're adding it to the UV coordinates which means on average on average we're adding 0.5 on the x y&z because everything's 0 to 1 which means overall yet infinitely many points in average we're adding 0.5 which means that on average this is shifting the texture it's shifting the texture by 0.5 point 5 point 5 so to fix this we just subtract the vector 0.5 0.5 0.5 and now you can see this is kind of centered and if we affect the scale it's kinda you can kinda see how our line is hidden inside there so again we contributed the noise texture to make it noisy V coordinates and then we just added this correction term now of course this looks like really really hot garbage and what people use this for is they always set this to a giant number which makes it look like a blurred version of whatever you had before so this is just a blurred line manipulation I like to do on this is instead of just feeding in noise texture and doing discretion I want to control the strength of it which is gonna let us kind of restore some of that line okay how do we control the strength of it well this is kind of the vector quantity even though it's not purple it has XYZ components meaning we can add a vector math note set this one to scale meaning a scale for our noise texture a strength a a magnitude how strong is the noise texture and we could set that to zero at which right now is going to show nothing because of the correction term if you set that to zero it will restore but um we have a scale value here and if we were to manipulate this make the noise stronger or weaker that would mean we also have to correct the correction term because this point five point five point five is dependent on this number being one if it's anything else it doesn't work so I'm gonna actually add another vector math scale note connected here and we want to subtract point five point five point five but we're gonna scale again our correction vector by the same number so value node Connect can and there you go so again we now control the strength of our noise let's say it's 0.5 strength that's half as strong and to compensate we make our correction vector also half as strong so when this is set to zero we have our line and when you increase it's just going to distort this nicely okay and you can see that's a better result than what we had before and even better is once we kind of pick a level of distortion it works with everything falling because this is just a manipulation of the texture coordinates all this stuff and that it does that y-component thing meaning we can go from top to bottom in the same way and because we can control the quality of our noise we can control the quality of our noise we can make it look more fiery so detail make that maximum so now we have those very jagged edges that we didn't before and the real trick to fire is roughness you want to set this high which kind of makes it look nice and scattered and we can increase the thickness of this again the epsilon is the threshold for comparing we can make this thicker which has a thicker burn line okay cool so now what do we have we have a nut and yes we have a nice set up that lets us do this kind of thing I'm thinking add a bit more Distortion so something like that and a little less roughness we can play with this a bit later of course more roughness than this okay this is our set up next I think we should probably talk about how to you know take this and make it look like it's glowing not just this black and white thing so we want to have this on top of our texture and make it glow okay how do we do that well first of all I don't want to feed this image directly into the surface even though that's fine I want it to react to lighting conditions especially if we have a mission and all that let's use a diffuse be SDF so now it's the same thing but we're just feeding it through a PSD off so it reacts to our light source you can see it's changing and then what we're gonna do is we are gonna add a mix shader' we're gonna mix this with a emission Y because we have our paper and on top of it we want a mission we want going and that glowing is going to be determined by this mask that we made okay so this is going to be let's say the color which so far looks like this so now we have the paper with on top and we can control the brightness of this which kind of looks weird because we don't have bloomin able to enable bloom and now it's going to start glowing and on top of that we can also on top of that we can also use a I guess there's a couple ways to do it we can use a color ramp to change the color from white to a no red or orange II something fiery and now we have a nice setup that lets us control the brightness of this fire we can make it ridiculous and we can also animate this thing and we'll kind of mess around with this once we have more stuff working to see what actually looks good okay next order of business is actually having it in some sense disintegrate the paper what I mean by this is we should have paper here and then back here where it's already gone through its already burned through this it should be transparent it should be gone so again what we're doing is to get rid of the paper we're faking it by saying make that area transparent as if it's already been eliminated to do this what we're going to do is before we do the mix shader' with the emission so under the emission what we want is another mix shader' we're gonna add a transparent transparent transparent PSD off and then we want to say okay blender make this paper transparent to where well probably not this thing right here because this just says where the fire is what we want is the region under it and you might think oh this is gonna be very complicated to do not really all you need is another math node set it to I think greater than or maybe less than and all we're gonna do is we're gonna feed in the same data so we're gonna see where's why again we're using why where is why greater than let's say the same value so we could either put that in manually so point six which looks like this I guess this gives us the region above so I mean we can work with that either way it gives us a region either above or below we could either put in the number manually or what makes more sense is use a value note so we can animate both at the same time okay so now we have a where the paper exists so mask and a where the fire is masks that move together okay and what we want to do is we want to say I guess man we want to switch these we want to say use this greater than for the transparency mixed trader this is okay okay let's take a step back here what's happening we start off with our paper which were feeding in through a diffuse B SDF because we want it to react to lighting next we want to say blender some of this paper needs to be gone it's gonna be burned it needs to be transparent which gives us this which right now is black but we'll fix it but either way you can see this paper is now burned and then on top of it we slap on to fire so there you go now you can see we have a very nice setup that lets us control how much of this paper is burned in a very kind of illogical way where we can also control the kind of type of fire and everything just kind of works together and this looks really good actually okay I got a bit I got a bit of enamor there it looks so good okay so where are we we've done all this I think we want to actually make this transparent instead of black and the reason this is an issue right now is by default two V's transparencies kind of a little and that's because in the material settings you need to go to what do you need to go to you need to go to settings blend mode set it to alpha blend which is basically going to tell evey wherever we say it should be transparent to actually do that and make it transparent and right now right now we should probably set film to transparent as well so that we don't see any weird stuff and yeah okay there we go so now we have a very nice setup where we can see the burning and all this um another thing that might be useful and this is actually just a quick addition which lets us get a bunch of control I talked about rotating the fire so do we want to top to bottom left to right whatever and we don't want to just you say oh now use x coordinates instead of Y or some combination of X and y we want that we want any nice way to manipulate this before it reaches this step of the shader which means of course we're gonna be manipulating in here we're gonna be changing the texture coordinates before anything even happens and to do this I'm going to use a vector rotate node which i think is two point eight three and above which is why I said use a two point eight three and above and this angle is going to let us change the direction of the fire so let's say we have like thirty two degrees you still use this in the exact same way okay it's just that we rotated it so maybe I'm gonna have it go a bit to the side something like 10 degrees like that and that's gonna be our kind of thing okay next order of business before we make the fire look even better is I think one final touch that I always like to add is if the paper is like let's say right here very close to the fire but not yet consumed by it it should kind of be getting darker kind of like charred until the fire kind of sweeps through it so it's kind of this like aging process of the paper and it's actually very easy to do because we already have nodes that describe where this fire is supposed to be we're gonna do a bit of an manipulation but basically the idea is before this texture is even fed into the diffuse be SDF we're gonna use a mix RGB so we're gonna say affect the color of this texture we're gonna say make it kind of reddish orangish or something which you can see we can control the strength of and for the strength we're gonna create a mask just for that and we don't really want to use the fire mask because that is directly under the fire you're not actually gonna be able to see anything unless you make a version that's a bit thicker right but this is a zero one map it doesn't have any nice fading or anything it's either 1 or 0 so let's make a nice fading map to do this what I like to do is I say instead of compare which you know does this whole threshold thing and they either says it is within the threshold or not 0 or 1 what we're going to do is we're going to make a gradient version which is going to use subtraction so we're gonna say Y values are you within or really we're gonna compare it to the same values before so really we're using Y 3 times and we're using our value 3 times and in each time we're kind of comparing these two values in different ways one of them were saying greater than one of these who are saying you know compare and one of these we're saying a subtract which should have a nice gradient as you can see so we're going to subtract this and then we want it to be a distance so we use an absolute value because the real number metric for distances is absolute value X minus y this is a mathematical thing if you don't get it don't worry but what it's going to do is it's going to put the distance from the value to from our Y coordinates to the value that we have decided over here which preserves the noise because it's back here which looks good but if we were to use this as the mix factor it should look like this it's actually very weak right now which is kind of the issue so what we want to do is before it even reaches here map range node which is going to let us kind of control this fall-off so map range kind of either push this in or push the other out I can't ever remember which it is yeah I guess it's this one like that and then we just want to invert it which I think we could either do a 1 0 yeah 1 0 inverts it because we were instead of mapping initial interval to zero 1 we're now mapping it to 1 0 so it kind of flips it I think this is probably a fine way to proceed so again paper manipulate paper make it diffuse make a diffuse make it transparent below the line and then make it glow on the area where it's supposed to glow and you can see that now we have a nice way to control using this map range node how much of this we want burned and looking back we should probably make this darker like that let's see so now what we have is a single slider controlling the progress and you can see this paper kind of gets burned before it even reaches that area and one thing I'm seeing is that this a fire now at Lund now let's make the fire look good this fire looks like garbage so let's pick a better color and let's make it maybe D saturated so it looks kind of like a whiter brighter flame I think is what's gonna make it look good yeah there you go and I'm thinking that this is still charring a bit too much in advance so how do we manipulate this map range node like that there you go and then finally let's just mess around with our fire until we like the look of it so this is maximum roughness by the way it kind of has this very scattered effect so it's a bit too much but you just want to play around with this so this kind of gives you a very distributed fire which kind of doesn't really work the way you'd expect you so you have this hole in the fire but then it kind of I mean it doesn't look that bad actually but I don't really like the way this is burning it doesn't make much sense so I'm gonna go for something like this top view that looks pretty good and again we can always control the rotation the quality of the fire being you know this noise stuff the distortion and a bunch of other stuff I think final thing is we want to automate this animation because we don't want to you know put keyframes in this value you know that's a lot of work we don't we don't want to do a lot of work so what I like to do is you're gonna notice that when we set this to zero it's as if it's like just beginning the scan it's right in the corner and then you go you keep going a little probably 2 1 a little past 1 because we scaled up the plane and there's a good amount of distortion so what I'm gonna do is I'm going to use a driver which we can either you know automate or not automate we can do it manually by a driver or whatever so we'd want to copy the frame number as a driver or a fast way to do this as a tag frame so this is saying make a driver that looks at this frame number which right now is gonna be too fast because it's immediately going to 1 and then it's gonna be 2 3 4 5 6 as we go up the frames so just kind of divide this by some number so 60 it's gonna go 60 times slower and if you want this to be faster you could have it go 30 so now it's gonna be twice as fast and really you can decide what you want here in fact you can make this a mathematical expression so we're using a just this it just has the frame and then what we do is we divide this by some number that we can decide after the fact so like 60 hmm let's redo that driver frame there you go so now we can control the speed of this as it's even playing which is kind of an interesting idea but yeah I think that that's kind of the essence of the tutorial of course there are ways to make it look a lot better but the core ideas are here this rotation this messing with texture coordinates this math this I don't even know what's going on anymore anyways I hope you enjoyed this paper burning tutorial I thought about making this a patreon exclusive but no this one is for the public and speaking of patreon if you want exclusive tutorials if you want to support this channel if you want behind-the-scenes discord access blend files etc patreon is the way to do that it is the kind of only thing that keeps this channel going in a non volatile way so I super appreciate anybody who is a patron and hopefully you don't only want to donate but get that stuff in return I try to make it worth it but yeah that's the thing I hope you enjoyed this free tutorial patreon in the comments other than that thank you for watching this was a good one very explosive firey
Info
Channel: Default Cube
Views: 74,127
Rating: undefined out of 5
Keywords: blender, tutorial, 2.83, 2.9, fire, smoke, simulation, procedural, material, nodes, paper, cg, cgi, vfx, 3d, animation, animated, beginner, advanced, shading
Id: w1zkmPsl6Vk
Channel Id: undefined
Length: 22min 46sec (1366 seconds)
Published: Wed Jul 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.