Projection Mapping 1 - Texture Extraction Concepts | Blender 2.82 Quarantine Series 1-7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to the wonderful world of hair cut blender frenzy as you can see my hair has been cut and it feels amazing believe how long it's been since I've got air so yes I went in got my hair cut they were very safe about it ever desert masks you had to wait outside go get something to eat like I did and wait in the parking lot to like come they call you and then you go in I don't care how it looks I actually think it looks good but if you don't think it looks good I don't care it feels great okay no about the hair this is blender frenzy I am Justin by the way in this video we are going to be talking about texture extraction and I need to give a thanks and a shout out to CG matter who is the one who I heard this from and I just drooled over the first time I saw it I was like oh my gosh this is the coolest thing ever but his tutorials are really stinkin fast they're good but they're fast so I wanted to make a tutorial about this and slow it down a bit so you can kind of see the some of the concepts and follow along and this is also going to play out in the next video where we do this same thing with our toilet paper so this one we're going to kind of take a step back look at the concepts and then apply it in the next video so I'm going to open up a new instance of blender delete that default cube going to top you come up to view go to a line view and a line active camera to view or just use the shortcut I can select the camera by selecting the border of the camera here or I can select it in the outliner come down to camera properties add a bar background and then add an image to the background open and then open up your image for this one I'm actually using an image I got off of pixabay I'll leave a link to it in the post so that you can download it and follow along if you want to so I'm gonna come down here to our background image area where it says alpha I'm gonna pull that up to 1 and then depth back and then frame let's pull this out just a little bit here and I realize I forgot my screencast keys so I'll be right back okay back with you with these screencast keys and we're gonna move on here so I've got the Alpha at one depth at back and frame method at stretch then I'm going to come up to our overlays uncheck floor and then uncheck our axes and 3d cursor just so that we can see this a little bit better okay so now this image is being stretched because our original image here was nineteen twenty by twelve eighty and if we come over here in our output our resolution is 1920 by 1080 so we just need to change this to 1280 and there we go now our image is set to the appropriate proportions aka aspect okay so what I'm gonna do here is we're gonna extract some textures from this image and I'm going to start with this cupboard here these doors so I'm gonna add in a plane and then I'm just gonna move that plane over to those doors and then let's zoom in here a little bit and go into actually let's just do x-ray mode there I don't want my box select on I want the tweak select so that I can just click and drag these straight away and just start moving those around and I'm just gonna position them around these covered doors or cabinet doors whichever way you say that okay so now that's lined up let's go over to our UV editor aka workspace and we're gonna have to do the same thing so I have to go into camera mode and then change this to tweak and then undo the floor and the axes or not undo on hide hide them because you have to do that in every workspace individually which is a bit tedious but oh well so let's reposition here okay and I also move my big head out of the way so that you can see more of what's going on and I don't cover anything up unawares so let's enable enable our x-ray mode and then come over to our UV maps here you see we have a UV map already created for us automatically when we added in our plane so if we select everything here you can see our UV map right here and our UV map is just a basic on rap that stretches to the boundaries of the image and it doesn't matter how big the image is so if we add in a new image here and then title this placeholder and then full because this will be for the full image so I will make this nineteen twenty by twelve eighty and we don't need the Alpha and okay so let's scroll out and you can see those UVs stretch the boundaries of this even though we've resized it and that's exactly what we want so this will be our flat UVs that we want to paint onto so I'm gonna rename this to flat okay and so we're gonna paint onto this for the final one but we want to paint on from a projection so we're gonna duplicate this and then we're gonna name this projection and now with our projection selected and our plane placed where we want it to we're going to unwrap it by pressing U and then select project from view and now if I scroll out you can see these two images are the same size nineteen twenty by twelve eighty and then our plane is placed at exactly the same spot with our UV s so this is where our UV czar and proportionally they are identical which is exactly what we want also so this will be our projection and then we have our flat which is the boundaries of our image but for now let's make sure our projection is selected and it's the active render let's come over to our texture paint and we're gonna have to do the same thing here again so zero to go into camera view let's disable our floor or hide our floor and all of that stuff there and then let's zoom in just a little bit here and now what we want to do is make sure we're in our active selection our mode is single image and then let's select our placeholder okay so I just realized that it's kept the other one that I meant to delete so I'm gonna go ahead and fix that I'll be right back okay so this is what you should have now so go ahead and choose your placeholder full and then reposition here so we have kind of the same thing that we had in our UV editing here with our proportions the same and we're gonna paint onto our placeholder full with our projection UV map now instead of painting with a color or painting with a texture using a stencil we are going to clone from an image so press the clone button here and then come down to clone from paint slot you can see under brush settings and then open that up and now you see source clone image and this is where we can choose our image and we're gonna choose our pixabay image which is what you see here by the way pixabay image - shout-out to solomon rogers who is the person who took this picture or uploaded it or whatever the rights belong to him but as open source for free and commercial use as you desire so thank you so much Solomon for your generosity but anyway so we are going to clone from this image and we're going to paint it onto our placeholder full and we're going to use our projection UV map which is here and then project it on to this projection map which is here so our source is down here and our destination is up here let's just go ahead and close I think that's all the things that I can close here so sources at the bottom the destination is at the top this is our source this is our destination and we can go ahead and start painting but before I do that I want to change my fall-off to something stronger something like that okay so I'm just gonna go ahead start painting and tada now we have extracted our cupboard doors here from this image and then pasted them on to the UVs here in our placeholder image so that is simple texture extraction but we're gonna take it one step further because what we've been doing so far is using our projection to paste on to our projection but in order to truly extract this texture we want to take from our projection and paint on to a flat image to turn it around and make it face us instead having the perspective that it has in the image so to do this I'm going to create a new image and then I'm going to title this place holder txt for texture and then we're gonna do 512 by 512 and no alpha and okay so now we're going to take our cupboard doors with this shape and paste it on to this image so the source doesn't change we're still using our pixabay image and we're used still using our projection UV map but the what we're pasting onto is going to change we're going to select our placeholder image which is this image here and then instead of projection we're going to use our flat UV map so we're actually going to be pasting from our projection to our flat and be careful which one you choose here because if you go back to your active tool you're going to have to probably change it back here again so change this back to flat and our source is from the projection and we are good to go again our source and our destination source and our destination and let's just start painting and see what we get and tada we now have truly extracted this texture into one of our own textures um and I don't know if you can notice but the you have some like artifacts kind of going on out here and on this edges and if you kind of go around the size of the edges that'll take care of it but what I've seen happen is if I do one side then it messes up the other side so yeah so the way that I found to fix that is if you come down here to your options and then where it says bleed to pixels I'm just going to type in zero there and now when I start painting these edges it doesn't have an effect on the other opposite edges which is good usually things like this take me like two weeks to figure out and that one actually just took a couple minutes because I was just I was like huh bleed well it's bleeding so let's just try that one okay and then when you're done with your texture you can save your image but we are not done yet because there's still a little bit of warping going on that we need to fix and it's not that apparent in this one but if we do it again so let's come over to our layout and let's duplicate this down here and we're gonna reposition this just like we did with the cupboard doors up there and I'm going to bring down my x-ray here just so that I can see a little bit more what's behind there okay so now let's go to our UV editing and select everything and here you want to make sure that you don't override your flat UV map because it's in I've done it you're gonna do it probably I did it while I was practicing for this tutorial it's just something that you forget you forget that you have this selected if you have this selected and you press you and unwrap it it's gonna override this and then you'll have to reset that so what I'm going to do a couple things first I'm going to create B of our flat so just flat and then we're just gonna call this flat B K for back up and then we'll just hide that there and then I'm going to select my flat and make sure it's intact so I have a little saying make sure your flat is intact and your projection is selected flat is intact and projection is selected okay so with our projection selected and our flat intact we can you to unwrap and project from view and now you can see it projects that from view just like we would expect and now let's go to texture paint and just for demonstration purposes let's go up to our destination and let's just go to our placeholder full again and make sure our source is the same which it is projection to projection and let's just up this a little bit and we're just gonna start painting doo-doo-doo to and so there we go we extracted it just like we extracted the top cupboards so now we're going to switch our destination from placeholder to the texture one and from projection to flat but before I start painting I want to resize this to make it a little bit more of the shape of the bottom ones here so in as in November to open up that 200 you can see you can see what I'm pressing so anyway I'm gonna go ahead and discard this one just so that I can change the size here so I'm just gonna mess with the size and bring down the Y so that it's more roughly in the shape of here I'm not too concerned with the actual dimensions of it but I'm just kind of eyeballing it there I think that's good enough and now I think we're ready to go ahead and start painting so I'm gonna paint do it and tada we now have our texture let's quick get these edges here so that they're not creating artifacts if they are okay but now obviously you can see there's some warping going on and the reason for that is we don't have enough geometry projection mapping needs to have a little bit more geometry than just one plane so let's go to our modifiers tab make sure our plane is selected still go to add modifier and then subdivision surface and then now you can see it's having an effect but we don't want it to lose its shape so let's click simple here and then let's change the render and the viewport to four and you can see what's going on if I go into wireframe now we have a lot more geometry to work with instead of just one plane and the reason I'm doing it with the modifier is because I can always hide it disable it re enable it I can apply it if I want to or I can just get rid of it it's kind of like fake geometry because I can still go in here to edit mode and move these around just just the points and let's go into wireframe so you can see that so you can see you have the geometry the fake geometry moving around with the real geometry but anyway for our purposes it helps us when we start painting which is what we're gonna do now so I'm gonna select everything and tab back into texture paint mode and now let's start painting again and as you can see as I paint it straightens everything out now of course I move to that corner down here in the bottom when I did in when in edit mode and I think I messed that up so let's go ahead and fix that here real quick okay but now that I've changed my geometry if you move your geometry around at all you need to unwrap again so let's select everything and remember our motto flat intact make sure flat is intact and then projection is selected okay and then you project from view and now back in texture paint mode we can start painting on this again and it just painted down here because with projection selected once we come into texture paint mode we now have to select flat again okay so now let's paint again and there we go everything is flat as a and cake is a square cupboard shape pancake so this one is ready to save so I'm gonna go to image save a copy go to our materials and label this counter drawers this can be a JPEG and five is fine yes okay so let's do the same thing up here again this one was the 512 let's go back and do that let's just discard this because this is our placeholder we can discard it since we've saved our image so we got we want 512 here and come back up to this one make sure this one is selected in object mode and then add our modifier here cuz we didn't add it to this one yet simple render and viewport at 4 we didn't move any of this geometry but I'm going to go ahead and unwrap it anyway just in case so tab in the edit mode come to our mesh properties make sure our flat is intact which is it which it is and a projection is selected you unwrap project from view on to texture texture paint workspace and we do want the placeholder and we want flat projection everything from the source should be the same because it should always be these two things we're always going to be painting from this image and from our projection okay so let's go ahead and start painting - - - and voila beautimous ok save a copy will say cupboard cupboard cup board - cupboard cupboard ok so now that we have the technique down let's try it on a couple more so let's go to our layout and do a little bit of modeling I don't know what X and that was don't don't pay attention to me okay so I'm just going to duplicate this here and you can see that if I bring that x-ray up just a little bit and then go into edit mode okay so I've tried to position everything as best as I can I tried to avoid the edges too just so that we don't have anything from the surroundings kind of bleeding in there on this glass case here with this candle it's bleeding in there but I will take care of that later okay so let's go to UV editing and select everything here flat intact projection selected you project from view texture paint and for this one we want to make sure our place holder is roughly the same size or shape I mean as that one so let's bring those and like this something like that if you really want to be accurate you can come over here to the transform and look at the dimensions and right now we've got point seven in point one our one point three four meters and then you can do the math and set them up here I'm not gonna be that accurate because I don't need to be right now okay so now remember in our texture paint mode we have to go and make sure our placeholder texture is selected which it is and then projection we don't want that we want flat okay and again we're not going to change our source so just start painting oh not this one this one and tada just like magic we have a little placard image that we can save but like I said I want to fix this piece of it here so a couple things we can do is we can actually clone from the image itself here in the 3d view so if we uncheck clone from paint slot now it's just the regular clone brush so let's resize this and now I can pick any place on here to clone from just like shop or if I press ctrl and then left-click it doesn't do anything or seemingly doesn't do anything but that's because they turned off my 3d cursor and it uses the 3d cursor so let's display that again and now you can see the 3d cursor is there that's where we will be copying from actually I'm gonna do it down here on this edge here so then I'm going to right and this edge start painting and that seemingly doesn't do anything either but it is doing something you can see over here why do I not see it in here I think I think it's because yeah so you got to turn off x-ray mode apparently so there's our clone right there and then if I maybe long from here instead this part can get really tedious really quickly okay there you go we have now successfully cloned out that piece of glass but that is pretty tedious and there is a better way to do it at least in this instance so I am going to just go ahead and paint over that again with my regular clone from paint slot paint paint paint paint paint paint and we're gonna paint that glass right back on there you can see and let's come over to our layout again so we can adjust this tab an edit mode and then I'm just gonna move this guy just like this right over there so it's still straight from up-and-down but it's just slanted a little bit to miss that glass and of course since I've moved my geometry I need to re project so select everything flat intact and projection selected you unwrap project from view it's kind of like a little song advanced that you learned a little ditty to help you remember it's that is going to help me remember in the future projection to flat and yeah we're good to go so let's go ahead and just painting our new projection hyung and tada boom voila voila however you want to say it cool so let's go ahead and save this image and we're just gonna save a copy and we're gonna title this be okay so now that you know the technique I'm gonna do it one more time and I'm not gonna explain anything you can just watch my workflow and see how easy it actually is so alright I'm gonna do the microwave over here so I'm just going to [Music] [Music] [Music] [Music] [Music] okay so let's see what we've got so of course we've got all of our textures that we did before for our UV map and you can see we now have textures extracted from this image that we can use on our own 3d models and once you know how to do it it's actually really pretty easy and so in the next video we're going to use this technique to extract textures from a single roll of toilet paper from a single image just like we've been doing here and create one of these UV images here with it so you'll see me on the next one
Info
Channel: Blender Frenzy
Views: 7,981
Rating: undefined out of 5
Keywords: Blender, Blog, Blogging, Tutorial, Open Source, Free, Project, Website, Editor, TP, toilet paper, UV, UV map, roll, Quarantine, COVID-19, coronavirus, isolated, sickness, texture, texture paint, paint, Extract, Extraction, Texture Extraction, Projection, Projection mapping, Projection Painting, Fix, Warp, Warping, Custom Textures, Image, Photo, Pixabay
Id: Mn2P8g1_IOQ
Channel Id: undefined
Length: 25min 43sec (1543 seconds)
Published: Sat May 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.