Folding Box Packaging Animation in Blender [Full Process]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome i'm derek elliott from dirk.com and i heard you wanted to fold up a box well that's exactly what we're going to do today we're going to make this folding box animation complete with a procedural cardboard texture and some sick dirk graphics but of course you can put whatever graphics on it you want even a squarespace logo the sponsor of today's video we're also adding a super dope transparent label to slap that puppy all together so your things don't get lost when they're moving through the metaverse we're also going to do a little bit of lighting of course because without light you ain't seeing nothing let's get started alright so i am in a pretty basic default blender 3.1 scene and i am going to delete my camera and my lamp here and i will hold on to the cube because we are going to make a cube shaped box so in facelike mode i'm going to delete this top face x is going to be hockey there and then what i want to do is uh add in an edge loop with control r and just bring that up to maybe about right there and then i'm going to delete two of these sides here so let's press x to delete these two faces and the reason i'm doing that is that when i fold this all up i want two of the flaps to be kind of on top of the other two so i want them to be from different pivot points so these will be the lower sort of inner flaps so let's go ahead and bring these up with e and z and then let's press s y to scale those in just a tad and then e z bring them up some more and then sy just so that there's a little bit of an angle if you've ever looked at a box before sometimes the inner flaps have a little bit of a taper like that to them um but yeah let's go ahead and now add in okay so those flaps are going to fold from this edge and then these ones will fold from the edge above so let's press e and z and i'm going to go up about 1 meter because that's half the size of the default cube so those should meet pretty close to the middle we can make some adjustments to that later if we want and then just for good measure i'm going to put control r and add in an edge loop right here i'm not exactly sure why i did that but i think sometimes when you're working with armatures this could have a little bit of extra geometry around where you're doing folds and things like that but i am definitely an armature amateur so um yeah play around on your own but that's going to be pretty much my default geometry there what i will do is add in this cavity display option just so i can see those corners a little bit better and maybe we go ahead and also add in a solidify modifier just so that we can kind of see the shape a little bit better but what i want to do next is go ahead and add in an armature so shift a armature and that's going to add in a single bone right there but in edit mode by pressing tab and then in my front view i'm going to move this up and i'm going to my wire frame view here move this up to right about there and that is where i'll have this larger flap fold from so gy another advantage of working with the default cube is everything is kind of aligned to the grid so my larger flap is going to fold from about right there maybe bring that up just a tad and then i'm going to press shift d and y holding control snapped it over two units so that we got the same on the other side now with both those selected i'm gonna press shift d r z holding control snap to 90 degrees and then that's going to be for our lower flaps which will fold from right about there so yes move both of those down okay so yeah that's pretty much our armature so now let's go back into our solid view here and then what i want to do is select my box object first and then shift click so that this now has a lighter orange outline the armature and then press ctrl p and parent that with empty groups so now if we select our box object we'll see in the vertex group we've got all these bones here but just to make things a little bit easier to understand i'm going to name them so let's go into our front view i might have been spinning around weird angles so that's going to be our front view so i'm going to select the armature here tab into edit mode and then i'm going to just name these so f2 i mean this f for front and then name this one r for right and then f2 name this one b for back and then f2 this will be the left so we'll name it p hat just get just kidding we're gonna name it l wow really good jokes here today on the dirk youtube channel um but now i yeah every time i tell a really bad joke i lose track of what i was doing um so yeah now back in this object we can see we've got fblr which stands for front back left right no jokes there so normally with an armature you could press shift tab and control tab and you would go into pose mode and you could rotate things around and that would be if you used automatic weights which is something you do with a character or something but the reason i use the empty groups is because i want to have a lot of control over which vertices are assigned to different parts of the armature so back into object mode there i want to now assign different parts of this mesh to these vertex groups which are tied to the armature so it's having in edit mode let's check where we are again one okay so this is the front one so i want this face to be assigned the front so assign and then i want this face to be assigned to the back so select the b group and then hit assign and then this one i want this and this to be assigned to the right side assign and then over here this one and this one assigned to the left side assign so yeah having those names just helps a little bit so now if we select this armature and go shift tab control tab into pose mode you can also do the drop down up here we should see that this is working correctly and it appears that it is very very nice okay so the folding action is happening and now we can kind of go ahead and start doing some animation so let me just bring this up a little bit so the box obviously now is opened and we want it to maybe start open so let's um i'm pressing n to bring up this part here we want to insert keyframes for all these bones so i'm going to press a to select all of them and then down here in my keying set i can change the active keying set to be rotation so now with all the selected if i press i it'll insert rotation keyframes for each of them now what i want to do is sort of fold the box up so i'm going to move forward about 30 frames there and then i want to basically fold these down and insert keyframes but so that the keyframes are automatically inserted when i do the rotation i'm going to use this little record kind of icon down here auto key and then i'm going to hit only active keying set which will only add them for the rotation if you don't click that it'll insert them also for scale and location but yeah i'm going to go and turn on my rotation gizmo and just kind of fold this box up so let's start with these ones i'm going to i'm looking at the top left i'm going to go a little bit past 90 degrees for these inner ones so folding this down you can see the keyframes automatically getting inserted and then these ones i'm going to hold ctrl and snap them exactly to 90 degrees and looks like we're in good shape now i think we might have had a little bit of overlap there those two bigger flaps yeah a little bit too much so let's um let's shift ctrl tab i obviously don't know that hotkey control tab into object mode and then these two flaps needed to come down just a little bit gz and then let's uh tab out see if those are coming together oh okay nice nice to have a little bit of a gap there i just think that looks nice you can see the detail but yeah that's looking good obvious issue is that these are all folding in at the same time so we need to sort of offset the animation of some of those bones so that that does not happen so let's select our armature and then let's see if i can get this time control tab into pose mode so yeah all the keyframes right now are from 0 to 30. but i want these two to happen a little bit later so let's select those two bones and then make sure that these are yellow so if they're deselected they're going to be gray but if i press a to select them all they'll both be highlighted yellow and i can just bring this over a little bit and just have those start on maybe frame 15 or so we just want to avoid any intersection so maybe we can start even a little sooner okay so right there we would be getting a little bit of intersection it looks like right there we're all clear so that is looking pretty good now for one i think i'll go over here into my render settings and make this 30 frames per second and let's just bring this way back so while we're doing our preview we can kind of watch it so yeah that's looking pretty good so let's say you're a box designer or more likely you sell things that come in boxes and you wanted to show all those things to the world well you could do it with squarespace now you've probably heard of squarespace but did you know how easy it was to set up a portfolio site or even an online shop pick from a whole bunch of beautiful templates and be up and running in no time head over to squarespace.com dirk and get started with 10 off your first purchase of a website or domain those kind of fold down maybe just add a little interest maybe this one happens a little bit faster let's bring that in and then maybe we do like the same thing with one of these where it happens a little bit faster just so these all kind of have a nice interesting offset oh and we've got a little bit of a issue there so maybe this one happens faster but also starts later cool now we might play with the curves of these a little bit later so that you know that animation is just a tad more interesting but as you can see we've got a pretty simple box folding animation already ready right there so let's go back into object mode and i want to add in a let's add in maybe let's make this a little bit thicker and then i'm also going to add in a bevel modifier just so that those edges aren't quite so sharp now with the bevel modifier by default it's set to the angle limit method which since these angles are changing that bubble is going to kind of get deleted and added so to avoid that i'm just going to turn that off so that just everything gets the bevel and there's a little bit of deformation happening there you can control if you were really wanted to change it but uh fixing little issues like that i'm not an expert at again i'm an armature amateur so yeah this looks pretty good to me now the next thing i want to do is add in a little bit of like a label sort of slapping down on this thing so the way i'll do that is by pressing shift a and adding in a plane and then let's bring this up a little bit so there's just kind of sitting right on top of everything right around there and then i want to turn off my auto keying too so we don't get those keyframes inserted don't forget to turn off auto keying otherwise you'll insert keyframes on like everything let's scale this down um this is just going to be probably like a pretty simple yeah just like a kind of square label um you can make tape like wrap the edge here but it's very difficult i have done it before but it took me hours to figure out and we're just gonna go for something a little bit more basic today keep it short and sweet um but yeah so i want this to kind of get what's the opposite of peel like reverse slap i want it to be placed rolled onto this scene here so i'm going to have a roll sort of this direction so i'm going to add in some edge loops ctrl r and just add in a bunch something like that i think it's going to be pretty good just so that there's enough geometry to deform with a curve so let's go ahead and add in that curve shift a and actually let's snap our cursor up here shift s cursor to selected let's add in a curve curve curve path looking great now i'm going to tab into edit mode on that path and then where am i looking here that's the front this will do it on this side um so now i just want to kind of move this bend this curve up a little bit so i'm just grabbing that with g and then just kind of creating a nice sort of slap slap shape there and yeah that looks like a good slap shape to me you'll see how it works in just a moment let's go ahead and add a curve modifier to this and the only curve object we have is this nurbs path here and let's see if this works so it's gx okay it is working which is fantastic um curves as i've mentioned in the past are very frustrating if yours isn't working kind of like this right off the bat then you may need to adjust some things in here the deform axis also other things to consider would be the placement of your origins of these two objects right now they're right on top of each other but i think we're going to have to change that in a second the rotation of this object can affect it the rotation of this object can affect it but yeah it looks like it's working so if you've been following along exactly then you should be in the same place but now i want to i need to make it so that it doesn't you know when it slaps down and needs to be elsewhere so let's let's tap into edit mode unless gx i think we can bring this okay that's not doing it let's have this like that okay so it's flat right there and if we bring this back okay that looks like it's working so your origins can end up in sort of weird places when you're doing this but now it should fold with the curve a little bit more nicely and that's looking good um okay so we've got our fold animation happening and then let's say it finishes slapping on right around there so what's that the x location so insert a keyframe on the x location at frame 60 and then let's have it maybe start the slap action maybe back here at frame 20 or so insert single keyframe let's see what we got you just kind of want to have it get to the box once the flaps are flat flat flaps so that yeah that looks that looks pretty good so we pretty much got the whole animation looking pretty good let's go ahead and if you haven't already save your file what i want to do now is add back in a camera object so i'm going to press shift a and add in a camera alt g to make sure that's in the center it's kind of hiding in our box there and then alt r to make sure it's pointing down and then i want to move this out on the y axis something like that probably a little bit more and then rx90 so it's looking straight ahead and let's go ahead and set up our viewport to look a little bit better for us so i'm going to make a camera view down here so i'm going to press n and t and turn off my overlays and then go 0 to see my camera view down here and this will be in rendered mode and i'll go ahead and switch to cycles and make sure it's on gpu compute yeah using 3.1 for like literally the first time right now so some of my settings are not completely set up but i figured i should probably record tutorials in the most recent version so they don't be come outdated as fast but yeah so got the camera looking good what do we do next lighting yes so right now we've got our defaults boring gray world so let's make it pretty much just as boring trend strength down to zero more mysterious our black dark world you can't see anything so to see things we will add in some lights let's add in an area light bring that up a little bit and i'm noticing in 3.1 i don't have my little draggable option things i don't know why but i will increase the size of this right here and maybe give it some more power and let's add in a couple more lamps shifty i've done a box tutorial before some of you may have seen i wonder how close my lighting setup will be to what we did there let's start with that and then i want to kind of rotate this all but i want to keep everything kind of locked up on the axis axes that they are now so i'm going to press shift a add in an empty and let's make that cube and let's bring that down and then adjust empty display size make it a little bit bigger now i want to parent sort of my main objects so the armature the curve the label and i don't think i need to select the box to the empty control p keep transform so now when we rotate this everything will rotate with it but our animation and all will still work so let's kind of find an interesting angle up and it looks like our label did not get fully applied i think we need to slide this out maybe a little bit further yeah so the curve wasn't totally flat where it stopped it replace keyframe boom delicious beautiful looks like the lighting's working pretty well um so yeah just kind of find an interesting angle you know we might add some animation to that but i think that looks pretty good right there um so yeah let's do a little bit of materials we've got a little bit of lighting um so let's make this a shader editor up here and i'm going to work on the cardboard material first so the first part of the cardboard i'll do is actually going to be the sort of some like corrugation so it looks like corrugated cardboard if you're not familiar with that term that's like the lines on cardboard so i'm going to press ctrl t with this principled shader selected and if you can't press ctrl t to add these then you may need to turn on your node wrangler add-on so just search for that and it's it's automatically coming with blender you just need to enable it i'm going to switch this shift s again a node wrangler hotkey to a wave texture and yeah the wave texture is on there it's not up here because you know the default cube automatically has uvs on it which are these sides here but when we made our extrusions those didn't like automatically get new uvs so i'm going to press tab to go into edit mode a just like everything and i'm just going to do a cube projection and that will yeah just kind of do a very basic uv projection we will need a uv editor eventually so let me just show you up here u um so yeah that just kind of projects outwards like the cube so all our uvs are kind of on top of each other which can be a bad thing but it's working pretty fine right now so yeah we've got those lines there let's just scale this up until they're about the size we want maybe something like that and now i'm not going to have this affecting the color i want it to affect the bump so i'm going to plug that into the normal and then press shift a add a vector bump drop that right there plug it into the height and it is working properly but we're going to turn this strength pretty far down and also the distance we're going to turn that way down really really low so that we still get a little bit of a you know gradated wave there so something like that i think looks pretty good you can see if we rotate this around we can kind of see how that bump map is affected with the lighting very beautiful very exciting with the lighting exciting lighting exciting lighting and exciting rhyme i think i say that a lot cool got corrugation let's add some paper readiness to this i'm going to do that with another texture but that texture will be a noise texture so let's also have that run through the uv so we can just plug this into this bam right there and then have this one go into the color looking good i'm going to scale it up quite a bit just until it's papery and then just to make it look even more papery pulpy let's add some distortion to it and then let's give it some roughness add some detail yeah just trying to kind of get a little bit of texture on there something like that i think looks pretty good now i don't want it to be black and white so i'm going to add in a converter color ramp drop that right there and then in this white field let's pick kind of a boxy color something like that maybe bring the saturation down a little bit value down a tad and then instead of having this go to black i'm going to have it go to a similar but dark color so i'm gonna press ctrl c to copy that and then ctrl v to paste it over there and on that one i'll bring the value way down so it's almost black but now instead of going to black it's going to just like a darker brown and yeah i think that looks pretty good you know you could adjust the roughness here to be shinier where you could really see that corrugation or you know a little bit rougher maybe we go with something like a 0.7 looks pretty good my lighting is a little bit flat maybe we need to kind of bring this back a little bit and maybe this one comes like up a little bit you know play with things as you go as you're working with your materials you know you might want to adjust the lighting a tad this power comes up a little bit just trying to get things a little bit more interesting maybe this one comes back a little bit maybe this one does this there's no science to this just practice yeah that's a little more interesting let's see my material a little bit better um so yeah we've got the corrugation we've got the paper texture now the next thing i want to do is add some actual texture because it wouldn't be a dirk box tutorial without some dirk stuff on the box so let's add some like stamp like things i'm adjusting my bump here just a little bit yeah let's add some dirk stampy stuff so right now the texture is just this corrugation so let's add in a image texture and i'm going to do a texture image texture let's open up the classic dirk sticker which if you've never seen looks like that it's just got my website and my logo i slap it on all sorts of stuff and yeah let's have let's just we're going to probably need to change some things here let's just have this plug into the uv and then if we looked at this now yeah it's kind of going based off those same uvs that the corrugation and noise texture are using but i'm going to need to have something else but before we do that let's mix these colors so the default gray or sorry brown is that and i want to do a color mix rgb and i want to mix it with a black color but where do we mix it well i'm going to have this texture where black is corresponding to a value of 0 and white is corresponding to a value of 1 influence this factor so on the mix if the factor is 0 it's the first input if it's 1 it's the second so if we just plug this into the factor we can see that it's actually reversed now so let's just swap this around and make this black of course if you wanted white print you could do that but yeah i'm just going to do that and this is still getting the corrugation because we're not affecting the bump at all you could have it affect that but i think it looks pretty cool just like that so with that together i want to kind of control where my uvs are but if i move this and scale things around it's going to also affect the corrugation so what i need to do on this object is actually add in another uv map so let's name this one uv low goes or something and now i have a new uv map so let's have this instead get let's go input uv map drop this right here and this will be the uv logos and have that go right there so right now by default it will copy the uv we had before but what i want to do is sort of manually just move these around so let's uh we can leave it like that but let's just move everything into a white area so nothing really has it and then let's select which face is this oh it's going to face select so is that which okay so this face and i can actually go up here to my texture so i can see it um so let's have let's actually have that dirk kind of wrap this side here so let's do u unwrap and then spin it around and maybe make it like smaller i don't know i don't know maybe like that yeah that's kind of cool got a little dirk wrapping the edge there maybe like make it a little bigger um and then where do our flaps end up so our flaps it's gonna be that flap right here and that flap let's do you unwrap and then let's have those be dirk.com so like something like that looks pretty good and then we need to make this one over there too let's bring that one up so now we got dirk.coms oh yeah that's sweet um let's just do those for now of course you could repeat the process and do it in other areas and you know encourage you to do your own textures and whatnot but i think that's going to be enough for demonstration am i right and maybe we actually make this a square for the gram and then maybe we should move the camera in or maybe we should add some extra focal length oh but not too much we gotta go see our flaps when we start off oh see this is perfect so the label is out of view the flaps are in view so then boom that's just gonna come in get reverse it gets slapped on there whatever that is reverse peel slap is that what we decided the word was that looks pretty good um cool uh and while we're at it let's just give this a little texture let's have this be the label texture which is going to ctrl t get an image texture let's have that be i think i have a yeah i think this is a qr i don't know what that is i think that's the dirk.com qr i'm literally gonna try to scan it on my phone right now and see if that's what it is i'm currently holding my phone to the screen oh yep there it is i should have made it a mystery but i wanted to make sure it wasn't something bad before i uh literally included in the tutorial um but yeah just scan that puppy and you'll be right there at the best website in the world let's add in a solidify to this too just to give it a teeny tiny bit of thickness just a little bit less okay cool and maybe this gets like a nice shiny texture let's see what that looks like do we catch some good lighting with that oh yeah very nice very nice now there's a little bit of an issue where you can see through on both of these you know what let's solve this one by making it transparent oh my god that's ba i won't say what that stands for so yeah just solve that issue by making this uh transparent should we make it like i guess we make it shinier right turn down the alpha turn your brain up a little bit i'm trying to make it so it's not so dark maybe we in some value color hue saturation bring the value up yeah that looks good um so yeah i was doing that oh and we probably need to you wouldn't really be able to tell but yeah we probably need to shade this smooth and then let's turn on our auto smooth normals auto smooth so the edges stay sharp so now we got a nice shiny yeah so turning the value up here just made it so that that clear was a little bit clearer so now we have a clear label dang that's cool now we can still see you know a little top of the r's and the k's there um but i did want to fix the double-sided issue over here so let's add in let's all right so let's name this cardboard cardboard logos because what i want to do now is add a new material slot and let's have that also be cardboard logos but let's hit this button to make a new one and then let's have that just be cardboard and for this one let's just plug it straight in with no texture so this one now in our modifiers we can go down to the solidify materials and i can change the material offset so that the inside that's being solidified does not have that material so now we don't have the you know it's not on the inside it's empty in there cool cool cool got some texture got some lighting got a sweet qr code on there um oh yeah last thing i wanted to show you very small detail but let's make these edges corrugated now the way we're going to do that which first of all i think i want to bring my bevel back a little bit so that this isn't so big let me bring that back just a little bit okay something like that i'm going to show you how to do a real quick and easy corrugation so let's add in a new material corrugated edge basically it's going to be the corrugated edge the way i do that is with a magic texture shift s texture magic texture and then i want to have that go with the let's just do the generated input maybe we should do i don't remember which one works i think generated should be fine let's shift control left click on it oh and it's not applied anywhere that's why we can't see it i want to also in solidify let's have the rim be material offset two so now the rim has it's looking for the second down from the original so like that that's one cool thing with this solidifies you can control the offset of the you know the main part of the solidify but then also the rim so right now we've got the magic texture so let's bring the scale on this up and i'm just gonna i'm gonna copy the color ramp i had over here so let's do cardboard control c on that color ramp and then let's look corrugated ctrl v pop that bad boy right there and then maybe for this one we make it a little bit darker so let's bring that down and then let's bring this down a little bit too and then let's maybe bring them together so there's some more contrast you can kind of see where i'm going with this making a super super ghetto corrugation you could bring the scale up just so it looks kind of right i guess you could match it exactly yeah i mean look at that looks pretty good now for the specular let's turn that down just so it doesn't get the reflection so it looks a little bit more like it's a a hole or something and the roughness up yeah oh look at that look at that beautiful corrugation right now if we just barely tab through this is the texture moving i don't think it is i think the texture is staying in place okay so it looks like the generated option works well here yeah i think when you do the object input with armature it's going to like slide the texture so it would be moving that's like literally everything did we add in some high contrast did we add in some high contrast we didn't look high contrast look it's high contrast yeah i just i just like to add that because i i always do it in post anyways just because it looks better but yeah hope you all enjoyed this one like and subscribe do all that good stuff share with me on instagram what you come up with would love to see it some good boxes some cool qr codes some cool textures um you know you could add a little animation to this rotation that would be something cool i'm gonna play with those things on my own and of course you'll see it at the probably the beginning of the tutorial of course on my instagram but yeah share with me what you come up with would love to see it and thank you so much for watching i'll see you next time peace
Info
Channel: Derek Elliott
Views: 174,088
Rating: undefined out of 5
Keywords: blender tutorial, blender, blender 3d, 3d tutorial, derek elliott, derrk, blender animation, blender materials, blender principled, 3d animation, product visualization, blender for design, industrial design, best blender tutorials, ducky, blenderguru, polyfjord, blender lighting, full tutorial, blender course, blender product, rendering, 3d rendering, nft, 3d nft, product design, keyshot, rhino, cad, professional, fusion360, packaging, armature, box animation, folding, flaps, animated box
Id: O1em_ijMvUk
Channel Id: undefined
Length: 31min 52sec (1912 seconds)
Published: Thu Mar 31 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.