Blender 2.8 Texture extraction projection painting (part 1)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Figured I'd update. After experimenting with it is works as well as displayed in the video and if you have high resolution photographs it is actually a great way to get textures.

But I think the most applicable use for most of us will be getting textures off of curved surfaces and off of photos that had to be taken at angles to avoid shadows. I'm aware that there are absolutely other ways to do that, but this is the easiest, and cleanest way I've seen that doesn't require Photoshop plugins or expensive software.

👍︎︎ 7 👤︎︎ u/I-Downloaded-a-Car 📅︎︎ May 31 2019 🗫︎ replies

That's game changing. I sometimes freelance furniture models and the end product has to be as close as possible to reference images, that's fine with materials such as leather, plastic and metal as it's easy to generate/replicate without heavy manual tweaking, but when it comes to more chaotic surfaces like tiled wood planks, fabric and other subtle textures it does get tricky to get just right. This diminishes the gap between photographic images and PBR materials as you can quickly create a realistic material within substance designer combined with other great tools that rely on quality input textures. Good job.

👍︎︎ 3 👤︎︎ u/jankimusz 📅︎︎ May 31 2019 🗫︎ replies

Just wait til you discover r/photogrammetry/ ;)

👍︎︎ 1 👤︎︎ u/corysama 📅︎︎ May 31 2019 🗫︎ replies

Mind blown

👍︎︎ 1 👤︎︎ u/Ligorenko 📅︎︎ May 31 2019 🗫︎ replies

Check out Substance Alchemist, be amazed.

👍︎︎ 1 👤︎︎ u/Collegia_Titanica 📅︎︎ May 31 2019 🗫︎ replies
Captions
so this is the first part of a three-part series about projection painting and the reason this is going to be three videos is because projection painting has tons of applications pretty much any time you want to texture something from real-world photos this is the method to use and basically what we're gonna be doing is projecting from an image onto some kind of mesh so this is a technique for texturing but today I want to look at it from a different angle and in this video our goal is gonna be texture extraction I'm gonna show you how to pull out any texture from an image and make it look like it's facing you and this also includes curved surfaces as well so again this is going to be an introduction to projection painting and in the next two videos we are gonna go over some more advanced techniques so let's hop into blender and get started first of all delete everything except the camera and in the camera options set up your background image to be the image you want to extract from and in my case you can see that this picture is distorted but that's just because our scene is by default set to 1920 by 1080 and distant a one by one aspect ratio so I'm gonna choose something like a thousand by thousand instead and let's say that we want to extract the texture from this sign notice that it's not facing the camera so we need to somehow turn it so it's facing us and this is the first reason projection painting is gonna be so powerful we can actually turn it so it's facing us so let's add a plane object and set the shading to hidden wire so we can actually see through it and while I'm still in the camera view what I'm gonna do is I'm gonna position this plane so it's outlining the sign and make sure that while you do this you stay inside the camera view and do not move your camera so again just slide the vertices until you're happy with the fit and when you're done with that we're just gonna head over to the UV editing window and you can see that by default when we added this plane we got this simple UV map and I'm just gonna scale this a bit horizontally until it looks like it's the same aspect ratio as our sign of course we can measure the dimensions of the sign and make it perfect but it's not super important now in our UV maps I'm just gonna rename this to original and add a second UV map and call it project and what we want to do is hit U and then project from you while we're still looking through the camera and if we add in our background image you see that our UV map overlaps perfectly with the sign and this is exactly what we want the basic idea is we want to paint from this project UV map back on to our original UV map so now in the texture paint window I'm going to set the mode to single image and create a new image we're going to put our extracted texture in this case the thousand 24 by thousand 24 resolution is fine now we're going to assign our target UV map to original because that's what we want to paint on to and in brushes I'm going to select the clone brush and you can also do this from the toolbar and now you can see that our settings on the right change and we just want to enable the clone from paint slot and set our source map to the projector UV map and our source image to the background image so now we can paint from the project UV map with the background image onto our original UV map and part of what makes this so great is we can do this in the camera view or just in the plane 3d view both work and this is doing exactly what we want it's extracting the texture and reorienting it so it's facing us but you can see that there's definitely some distortion here for example the parking text should be written in a straight line and this texture just looks warped and the reason for this is projection needs a lot of geometry to be precise our plane is only a single face so what we want to do is divide it up a bit using ctrl R and now when we do the projection painting again you can see that all the distortion is now gone so now we can finally save our extracted texture and that's basically the end of the process but again we could have done this with any texture in the image so this time let's try to extract the side of the house over here again in the camera view we're gonna set up a plane so it outlines exactly what we want to extract I do recommend doing this in hidden wire mode and once we're happy with that we're just gonna go over to the UV editing window and add a second UV map called project and do a project from view on that map and then in the texture paint window we're just going to add a new image and set up our clone brush just like before and just like last time you see that we get some heavy distortion when projection painting so we want to add more geometry and once we've added the loop cuts and repaint you see that the distortion is gone and we can save out our extracted texture and so far all we've done is deal with planar textures and that just means textures that are on a single flat surface this time let's try to do multiple surfaces on this box type object and the process is almost exactly the same so this time let's save our cube and just delete the light and in the camera options let's add in our background image and set the output resolution to be a 1 by 1 aspect ratio now hit end to open up our properties menu and enable lock camera to view and now we just want to move around our until the cube matches roughly with the box and once you're happy with that just pulled the faces of the cube so it better matches the dimensions of the box now we're going to delete everything except the front two faces because I just want to project onto those and then in the UV editing window we can unwrap our mesh to get this automatic unwrap but we can definitely use our UV space a bit more optimally so add a seam in between the phases and then UV unwrap again and this time we get to larger separate islands in our original UV map now back in the layout window I'm just going to better align our mesh using hidden wire so we can see through it and while you're doing this make sure that you stay inside the camera view now back in the UV editing window add in a second UV map where we're gonna project from view while in the camera view and just like last time you see that all our you these line up perfectly with our image now in the texture paint window I'm just gonna add a new image set our target map to the original UV map and switch to our clone brush using the clone from paint slot with this second UV map and the background image as sources and when we do our projection painting you see we are painting on both UV Islands exactly how we'd expect and again to get rid of the distortion we just add a bit of geometry and paint again and now finally we just save out our extracted texture now this time I want to take it up a notch and deal with curved surfaces so for example we might want the texture of the bark on this tree but obviously this texture is wrapped around what is essentially a cylinder and the cool thing is with projection painting we can actually unbend this texture so it becomes flat so same setup as before with our background image and this time I'm going to add a cylinder and move around our camera until it looks like it's lining up with hidden wire shading we can just add some geometry and pretty much have the cylinder sweep up the tree and once that's looking good we just want to delete any faces that aren't visible from the camera so that's the top face the bottom face and the face is in the back so what we're left with is just a selection of a curved surface and now let's try to unwrap this in the UV editing window we're going to do an initial unwrap but as you can see the UV island is somewhat distorted and to fix this just choose any face in the UV island and straighten it so it's a perfect rectangle this just means to take all pairs of vertices on this face and line them up by scaling to 0 on either the X or the y axis finally we select this rectangle and use follow active quads next the second uv-map which I'm gonna call project and then just do a project from view while still in the camera view now in the texture paint window just like before we need to add a new image set our target UV map to our original and switch to clone brush with clone from paint slot with our source project map and the background image and then we can start projection painting but of course we do need to add some more geometry to get rid of the distortion and really what we've just achieved is we are unbending a curved surface and extracting the texture from it and in this case you can see that the edge of our cylinder looks pretty weird but that's just because these faces aren't actually facing our camera and to fix this we just turn off clone from paint slot and then use the clone brush like normal and to use the clone brush you just control click to sample the texture and then you can just paint with it anywhere you want and then finally we just save out our extracted texture and this is how to do texture extraction with projection painting again this is just the introduction to this technique so hopefully you found this video helpful and in the next one we're going to be dealing with actually texturing a model using projection painting so thank you for watching and I'll see you in the next one
Info
Channel: CGMatter
Views: 455,282
Rating: undefined out of 5
Keywords: blender, 2.8, projection, painting, tutorial, texture, extraction, part 1, cgmatter, uv, unwrapping
Id: gz4qV5_zuMo
Channel Id: undefined
Length: 7min 42sec (462 seconds)
Published: Sat May 11 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.