Tutorial | Photogrammetry Asset

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] alright so in this tutorial I am going to be giving you a rundown of the entire process for creating a photogrammetry asset and bringing it into Unreal Engine 4 setting up materials doing all of your cleanup in substance painter doing a REIT apology and generating your sparse and dense clouds as well as mesh and textures in Adyar soft and making again game ready asset from that I'm also going to be going over best practices for shooting and processing your images and I'm going to be using this asset that you see on-screen as as the asset for this tutorial so as you can see I'm not using a rock or a tree branch or something like that which most people like to use because it's it's the easiest asset to generate from photogrammetry it doesn't really require a lot of work to get a game ready asset from so I decided to use something a little bit more difficult so this was actually a drinking fountain and as you'll see at the top the the the faucet part of the drinking found is no longer there and the little basin and all its stuff are gone because I manually removed it because it had some issues solving that's another reason I'm using this is because I want to show you how to address issues like that and still get a usable asset so the asset they see on screen is just under six thousand polygons in its highest elodie as you can see it's already been Rita pode and it's completely game ready this has three LEDs the lower to LOD is actually just generated in Unreal Engine as you can see it has full PBR texture set so the water is reflective and shiny as it should be this little metal plate on the back has its metallic value and it's reflective and I did all that in substance painter so if I show you in detail lighting you can see the PBR a little better and if I go into you can see what the albedo looks like deal it and all that now as you can see I didn't go too far with the D lighting this this side and this side are still a little darker than the other two sides the reason I did that is because it didn't really make much difference when I brighten that up and one of the things you need to keep in mind when you're doing asset creation especially if you're working for a game studio or something with with tight deadlines is the cost of benefit so the cost benefit meaning not only money but the amount of time that it takes to achieve a result whether or not that result is actually going to be beneficial to your final asset so for this I didn't think it was worth it to brighten these backsides up and now one more thing to touch on I'm only going to be showing you the process for generating your photogrammetry asset in Adyar soft photoscan all the techniques that I'm going to be showing you and add a soft photo skin can be applied to reality capture as well if you already understand how to use views reality capture and adjus off then you can you can figure how to do the same thing in in reality capture that I'm going to show you an address oft and also I'm using Unreal Engine 4 for the purpose of this tutorial just because it's my preferred engine but you can utilize the same process as I show you for any engine whether it be unity or CryEngine or whichever one you prefer working in everything up until you import it in the engine is going to be the same and then from there if you already understand those engines you can figure out how to apply those to the the workflow for those engines specifically and one last thing is address soft and reality capture there's usually a lot of questioning about you know which one's better which one you prefer using which can give you better results etc etc so in my experience reality capture solves more quickly and it's a more straightforward set up to achieve to achieve an end result but the quality of the textures is usually not quite as good as what you can achieve in a geosoft and it requires more work to to get a level of quality as closest to what you get in address oft at least for the textures a dress off takes longer to to generate solves but to me in my experience it does a better job one thing that reality capture is better at is generating solves from a studio environment so if you capture an object with a you know a camera sphere with a green screen background and controlled lighting and all that reality capture seems to do a better job and a faster solve than a dress off does or exterior for object as you shoot outdoors like this asset for example which was in a park ad just off seems to do a better job solving and gives you a better end result in in most cases so I recommend trying both for your workflow see which works better for you and also check it out per asset and see which one you receive a better result with based on the assets are actually trying to to to recreate so that being said let's let's jump into the initial part of the process which is actually setting up and taking your images of the asset that you're going to be creating so as you can see on the left of my screen I have the folder open with all the raw images that I shot for for this asset as you can see I took 34 pictures one of the big mistakes that people make when they first start doing photogrammetry is they think they need to take as many images as possible and get as much coverage as possible but that's actually not a good practice to to to follow and it ends up creating more problems for you in the future during your workflow and it ends up taking longer because you have larger data sets to work through that aren't really adding anything to your final asset another thing to keep in mind is when you're taking your images a good rule of thumb is to try to get 1/4 to 1/3 of overlap between your shots so if you look at my thumbnails you can see that this was the first picture that I took and then the next picture that I took I stepped about 3 or 4 feet to the left and then took another shot there's around 15 degrees of separation between the images so you don't have to specifically do a certain amount of steps or anything like that you just kind of want to eyeball it when you're shooting and make sure you get you know about a quarter to a third of overlap between your images because what address off is looking for one of the main things that it does when it pairs these images together before it generates a solve is matching detail between images so like this image to this image to this image should have similar features that it can correspond the it can correlate the position of those images to so it's using this plate here in the middle choosing the texture of the surface and it's using the silhouette to do that but one of the biggest things is the feature overlap in the images so you know just kind of eyeball it and as I said for this asset which is probably about two feet by two feet by four feet I did you know three or four steps to the left and then took a picture every time another thing that I like to do is I like to do three rings when I capture and then I do some detail shots so I do a high ring a Meade mid ring and then a low ring and then when I do detail shots I use it for things parts of the asset that I think are gonna require more detail in the image in order to solve correctly so you'll see that I took another eight shots down here of just the top of the drinking fountain because I knew this the basin and the faucet and all that stuff we're gonna require more detail in the frame so for these I only took eight images so I took one at each side and then one at each corner so basically every 45 degrees and another thing that you'll notice now that I've gone over you know your general setup for the we're shooting is that all these files are D and G so D and G is a RAW format it's Adobe it's Adobe's RAW format Adobe Digital negative which you'll see over here on the right I have the site open form and I'll put the direct link in the description as well so Adobe Digital or a Adobe DNG converter which I'll open for you here looks like this so it's a free it's a free program from Adobe you can go here and download it and it'll automatically convert any of your RAW files regardless of what camera that were shot with into Adobe Digital negative the reason I like to do that is because it's the most compatible with all the Adobe products so Adobe Digital negative will work with any thing that that can import a raw file that's made by Adobe some of the other file formats especially if they're from numeron cameras and all that sometimes you'll have to convert them anyway so it just gives you a nice standardized format that you can use for your RAW files now I always recommend shooting in RAW if you can if you're shooting on a cell phone some cell phones allow you to shoot in RAW some do not at the very least you want to shoot an uncompressed PNG but if you have to you can shoot in JPEG as well if your phone doesn't support either of those one thing you should do though that can really cause issues is you always want to shoot in full manual mode whether it be on a DSLR or your cell phone and most modern cell phones you can download an app for or some of them have a built in natively where you can control the camera manually the reason you want to do that is you don't want any of your settings changing like your f-stop your ISO etc between images for a single asset so for example if I shot this fountain and my ISO or my f-stop changed between shots then when I go to run the solve on it that's going to show on the asset so the texture will look weird the silhouette I'll actually start having issues because the depth of field would be changing and all that good stuff so you want to make sure that you always shoot in manual mode when you can now the camera that I shot with is a 42 megapixel which is seven thousand nine fifty two by five thousand 304 pixels and shoots a 240 dpi and I shot this with a kit lens which is a 16 to 35 I shot all these at thirty five-millimeter I recommend always trying to shoot with somewhere between 24 millimeter and 50 millimeter anything wider than 24 or narrower than 50 is going to start giving you issues and you're gonna have to do manual lens correction and all I could stuff what you want to try to avoid so I already recommend shooting between 24 and 50 millimeter if you can now when I load up a just soft you'll see exactly where my cameras replaced and you'll see what I'm talking about about doing the three rings and the detail shots and and all that so for now let's let's load these up into Camera Raw and I will show you some of the settings I use now you can use either Lightroom or Camera Raw whatever raw editing software you like to do to do your initial adjustments I prefer using Camera Raw which is built into Photoshop just because it's free and it has pretty much all the same features that you get in Lightroom there actually going to use and it just makes a workflow much faster so so let's jump into that so I have all the images loaded up here in Camera Raw and as you can see they're all here on the left all 34 of them and if you look down here on the bottom it shows all the main meta information for how they were shot so as you can see it was using Adobe RGB 1998 version it was shot an 8 bit the resolution is seven thousand nine fifty two by five thousand 304 which is forty two point two megapixels at 240 PPI and if you look over here in the top right it has the lens information or what actually shot it with so I shot it at an f-stop of six point three with one 640 this of a second ISO was four hundred and I use a sixty sixteen to thirty five millimeter lens which I had it set to thirty five-millimeter now if you look over on the right side these are all the adjustments that I already made to all these images so you can you know do modifications to individual images or you can select and modify all the images at once so since I saw all these with the same exact camera settings and the lighting didn't change and everything was the same I modified them all at once so if I go back to the initial settings by clicking this here go to Camera Raw defaults this is what the default settings look like so everything is zeroed out the temperature is at six thousand three fifty and the tent is at plus nine so as you can see the image itself is much yellower than it should be I didn't really go in and bother doing white balance and all that because I knew there would be enough information in the raw to pull that back so the modifications I made if I switch back to the image settings that I added I pulled the temperature down more into the blue I always like to bump up the clarity vibrance and saturation so I do 30 2010 respectively as you can see I want to modify the cleric the the clarity if I change it to zero back to thirty you can see that just makes the the differentiation between the colors much more apparent and vibrance this is different than saturation but it's kind of like a modifier of the saturation it bumps up the values in a way that doesn't kind of blow out your Blocher image and then saturation I just bump up by ten to bring a little bit of the color intensity back now if you look down here at the resolution and the bit-depth some people like to say oh you know you need to always keep it at the highest resolution the highest bit depth and all that stuff but it doesn't usually benefit your end result especially creating an asset for a real-time engine you're not going to notice the difference between 16-bit and you know five thousand pixels compared to you know 5k compared to 8k but you will notice a workflow overhead increase by keeping it at such high resolution so what I like to do is actually try to restrain my images or constrain my images to a maximum pixel height their width of five thousand five thousand pixels and I keep my bit depth at eight and I don't change the the PPI though you want to keep your pixel density so I'm gonna load one of these into Photoshop okay so now I've got the image loaded into Photoshop with all the settings that I set up in my Camera Raw and if I go over here on the right you can see I already have an action set up to do this so normally I would load you know 15 to 20 images at once and then I run it through these actions and I also have a save and close action that I've drawn here by deleted just for the purpose of this tutorial so that way it'll automatically apply all of the you know the image size and the shadow and highlight adjustments that I make and then save it as a PNG or yeah PNG and then close the file so I like to save my files as the actual working files that I bring into photoscan or add to soft I like to save them as I'm compressed pngs with a maximum pixel height their width of 5,000 so if I go into image size and adjust the size here you can see it's still at its at its raw pixel width of 7,000 952 so I would make that 5,000 if you shot in portrait then your height would be 5,000 you just want to make whatever your highest value is 5,000 and as I said to keep the resolution or the PPI at 240 whatever the default raw PPI is so the next thing I do is I run it through a shadow highlight filter so this is going to go towards the d-lighting now you can go in and do your own shadow highlight adjustment but I usually just use that default settings and they seem to work pretty well so if you go into image adjustments and shadow highlights these are the default settings so as you can see it removes most of the harsh shadowing and all that good stuff so if I turn it off back on and toggle between the two so what this does is it gives you more of an albedo type texture look to it and that that's what you want because all of your lighting or shadowing your reflections everything should be done in the real time engine through the material so you want sure your base color to be as shadowless as possible and let everything else be handled in the real time render all right so I'm going to run this action to show you what it does alright so as you can see it to the image size under the shadow highlight adjustment so we go into image size you can see the maximum width is 5000 and as you can see it did the shadow highlight so I do a step backwards that's it before and after so then after this as I said I have a save and a close action and those will save it as an uncompressed PNG which if you go to save as and you select PNG and then you save it it's gonna give you this dialog so you don't want any compression which means you click none and then you save the file and it'll save pretty quickly if you're not using compression and with these actions you can also you know you can either create an action here and just run it by doing a file automate batch and then selecting that action what you can see it's already selected here and you know tell it where to save and all that good stuff or you can create a droplet you can just drag the files into with raw images it's still going to bring you through the raw dialog if you have it set up by default so you want to modify that if you're just gonna draw drag and drop the images in there alright so let's jump over into the PNG folder ok so this is the PNG folder this is where I exported or resaved all the images as PNG with a maximum width of 5,000 pixels and I did my delight process on them so as you can see if you hover over them it's got a 5,000 by 3,000 335 resolution and file size is 40 7.7 Meg's so this is going to be a much easier data set for add to soft work with and as I said your result at least for real-time engines is not going to be noticeably different from using uh higher res or higher bit depth datasets so this is going to improve your workflow quite a bit now if you'll notice up here this is the file structure for how I have things set up so what I do is I like to create a folder for whatever asset it is and then within that folder I have all my subfolders so you'll see I have a folder for the PNG a folder for the raw a folder for the actual textures folder for the meshes and then these folders up here these top four folders actually generated by a geosoft and then you'll see these are the agile soft projects so I saved one of each aligned dense cloud and then the full working project and then a low poly version which I'll get to later for the purpose of this tutorial normally we would just have one or maybe two projects in here and then yeah you wouldn't be having you know a separate one for each process in the workflow I just did this to show you the different steps in the tutorial so now I'm gonna go in and load address soft okay so this is address oft if you haven't loaded it before this is what it looks like so most of the things are gonna be doing it at just optical media this workflow tab up here and a few of the things you'll do will be other tools the very first thing I recommend doing when you load add to soft however is to set up your your preferences so if you go to tool tools preferences and then you go to the open CL tab you can see that it lists all of your graphics cards so I have a geforce 980ti and an intel iris which is an integrated graphics graphics trip which I'm not using and you'll see down on the bottom it says using our when using open CL please deactivate one CPU core for each GPU and use for optimal performance so what this means is if you have a eight core processor which I have here you want to disable one of those cores for every GP of the essence and since I have one GPU I'd only want to use seven cores out of the eight the reason being is that it's even though most of the task is being run on the GPU it requires CPU process this process is to facilitate that task being run on the GPU so it still needs a freak or to allow the GPU to do its job so I have it set to seven out of eight cores because I have a single graphics card so as make sure you set that up if you don't have this set up correctly then your performance is going to be very bad and can actually cause crashes so the next thing I want to show you real quick before we go to import the images is if you go into view you have a list of show/hide items where you can show or hide cameras markers region trackball info or grid you also have a perspective orthographic switch which is the v key which is the v key you can also switch into stereo mode where it separates the colors out for stereoscopy you can reset your view and you can adjust all your pain your visible panes here and over here as you start running through your workflow and you generate your dense clouds your meshes etc all these will become available and you can switch between which view you want to show in the 3d viewport and then up here you have your select tools you have your rectangular selection you have your circular selection you have your freehand selection your move your rotation your object rotation and then over here you have your delete selection and your crop and then these are just redundancies of your show/hide for the most part up here over on the left you have your workspace hierarchy now this is going to show all of your cameras once they're imported and it'll give you information as to whether or not they're aligned etc this will show your camera or your images down here and this will be all the meta information or the details for whatever you have selected all right so let's go to the first part of the process which is importing images alright so now we're going to import the images now in order to do that I'm just going to open the PNG folder select all the files and I'm going to drag them in here now another way you can do this is by for someone create a new project if you go to workflow and go to add photos you can do it this way as well and then just select the directory that your images are in and you can select all the images together and then import them another way that you can do it is by doing the same thing go to workflow and add folder this way just selecting the folder that the images are in and then when you do this it's going to give you multiple options so you can either create a camera from each of those images or you can create a multi frame camera from that folder so basically that folder will become a camera and each image in it will be a different sequence so if you have multiple cameras and recording video for example you can record an object from multiple cameras and each camera will be represented by a folder you can output the the frames from that camera into into that folder so for now I'm going to create a camera from each file which is going to be one chunk of 34 cameras now as you can see over here on the left after imported them it says that I have 0 out of 34 cameras aligned and the na means that they're not aligned and down here all of my my images are located to view so if you want to you can also import masks you can create your own masks for these if you want to go in and path them out or use an alpha Channel so if you right click and go import masks you can do that you can also bulk select and import masks you just I would just name them the same name and then give him like an underscore mask or something like that and it'll it'll assign them correctly now when it comes to masking for most use cases it's not really going to be beneficial especially for the amount of work that it requires some people prefer to use them but in my experience for most assets you're going to generate it's it's not really that beneficial but it is a feature in here that you can utilize if you're having problems with silhouette carving alright so now that all the images are imported and everything's ready to go we want to start our workflow so if you get a workflow and the line photos it's going to generate your sparse cloud and put all the images in the correct position so I've already done that and I'm going to load that project for you so I don't have to sit through the solve time I this is after all the images are aligned now as you can see if I hide the cameras it's it's going to solve basically anything the camera sees that it can overlap enough to create a restructuring from so what we really want to focus on is this right here which is our water fountain which is a very small part of what it actually captures you can see their points going on almost forever it looks like so what you want to do is you want to crop down your sparse cloud which was what's generated here and then solve your dense cloud from that but before I go into that I'm going to bring the cameras back up so you can see here the positioning of all of my cameras now as I said before I normally do three rings for this one I did two rings and then I did some close-up shots the reason I did that is because the object wasn't extremely complex and I knew I didn't need that extra coverage for any reason and it allowed me to capture it more quickly so as you can see I have my top ring which is just basically eye height are a little higher a little lower than I height and then I took some more spread out lower images and then here I took some closer images these were the eight images I talked about for just the top of the fountain because I want to make sure I got got all that detail in there all right so now I'm gonna hide these images again and I'm going to go to the top of the fountain since this is more of a square object I'm going to use the rectangular selection tool to highlight the points okay so that's going to bringing in tighter to the object so that way if you keep all these points in here you run your dense mad ends clad and your mesh and all stuff from here it's gonna take much longer solved because it's solving for more data obviously alright so I'm going to hit crop at the top here as you can see it cropped it to just those points now since I did it from the top any points going vertically we're going to be inside that rectangle so it's poking out points floating off to the top and all that stuff so I'm also going to go into the side and I'm gonna crop it down around there and then hit crop again all right now you can see it's cropped to pretty much the object that we want we're still have to go in and clean up the get rid of the ground and all at once it makes a dense cloud and everything gives us more detail to work with so now that all that's done I'm gonna bring the cameras back up and I'm going to go to tools reset region this will bring the actual region closer to basically the bounding box to to the new cropped points then what I'm gonna do is I'm going to go to tools and optimize cameras okay this is just gonna optimize the position of the cameras in case there's any you know shift or anything like that it gives you a just a better result and it's more refined alright so now that all that's done we've got everything cropped down to the points that we want I'm going to go into the next part of the workflow which is building the dense cloud so you go up here and you click on dense cloud so one thing I didn't show you before with the line photos that is what the dialogue looks like so each of these when you click it has its own dialogue that pops up so when I hit a line photos these are the default settings which I usually keep it set to but it allows you to modify all these options if you want to since we're going into dense cloud I'll click on that same thing it gives you a different options quality lowest all the way up to ultra-high I usually keep it at default settings unless I need something extremely high detail or low detail adjust to do it there and whether or not you want the debt filtering to be mild disabled moderate or aggressive all right so build dense cloud so we click on that run it once that's done it's going to look like this all right so the cloud has been generated but we still see the sparse cloud because we have to go to view and change it to dense cloud so this is our dense cloud and you'll see if i zoom in you can see where the point starts separating the reason you see color is because all the colors from the images are baked into the points so they're actually just vertex colors basically and it's gonna allow us to carve out the point cloud and and cut our object out of it a lot more easily now that we have all this detail so I'm gonna do is I'm going to start with the freehand select tool and get rid of this obvious when I get rid of this whole floor down here so I'm going to start with the freehand select tool I'm get a good angle to start editing with so I select the freehand tool and as you can see the freehand tool allows you to make you know freehand moves but it also has a flat edge on one side so we're gonna utilize both of those so for getting around the base of these rocks I'm also going to use a little bit of a curve to it so I'm gonna go around the edges like this obviously we're doing years gonna be more precise I'm just doing this to show you for the tutorial and then once you have all the point selector you just hit delete and it remove them from your from yourself so now this is part of the floor over here has got a straight edge so I obviously want to get rid of that and I'm going to use a straight edge of the freehand tool I'm gonna start here at the very corner of it I'm gonna go out a little bit and then I'm gonna go this way as you can see I'm dragging the straight edge with me and I'm gonna line it up with the the little part of the step here that hits the floor and then as you can see it's selected all those points and then I hit delete and those points are gone so I'm not gonna go through the whole process of doing this is I think that gives you enough of an idea of how to do it on your own and you can obviously utilize the you know the circle tool you can utilize the rectangle tool you can select you know individual points using those as well as you if you want to and then you just go in and cut out any of the pieces that you don't you don't want to be part of your asset and if you see any smaller pieces like these over here if there's hanging out by themselves then obviously you just want to get rid of them just highlight them and then delete them but really small piece is our gonna be ignored for the most part when you generate your mesh anyway so you know not to be extremely strict about it but clean it up as best you can as you can see here the whole top of this didn't solve very well it's missing a lot of pieces but we're not gonna worry about that because when the mesh is generated and we project textures and all that it's going to fix a lot of those issues because the the data is still there in the cameras but it just wasn't able to restructure it so as long as you make geometry to compensate for it it'll project it'll project very well so I'm gonna get rid of this basin and the faucet in old stuff anyway so I'm not too not too worried about it all right so then once all that's done you can generate your mesh so in order to generate your mesh you got a workflow build mesh and then this is the pop-up that comes up is the dialog so you can adjust your surface type between arbitrary and height field you can adjust your source data between sparse cloud and dense cloud obviously one use your dense cloud you can adjust your adjust your final outputs polycount what type of interpolation you use and what point classes to use so let's do that you hit OK and it'll generate your mesh and then we'll jump over into what that looks like all right so the mesh has been generated but as you can see we still are looking at the dense clouds so I'm going to go to view and then shaded so shaded is going to be your mesh if I switch over to wireframe mode you can see the wireframe and all the color you see once again is just vertex colors so if you're in shaded all the color you see it just for text colors so this is not the texture when you project the textures gonna be much higher resolution and I'll like it's tough because it'll be pixel based and not vertex based so you have different views for your mesh you have solid you have shaded you have wireframe and then you have textured so the next part of this is going to be projecting your textures but before I do that I'm gonna go over one more thing with the mesh as you see here it filled in the holes pretty well at the top but it didn't fill this and so there are a few ways to go about doing this since I'm going to be creating entirely new geometry for these because it doesn't need go into wireframe doesn't need anywhere near this density of polygons for you know basically a rounded cube for the top and bottom and this metal plate in the back I'm actually gonna go make that geometry myself and my works just gonna be to Polly's per face with rounded edge it's basically a rounded cube so to reduce the poly count quite drastically and then I'm gonna do a lower poly version of these the stone base in ZBrush using zremesher and you can use you know if you wanted to you could go in and auto reach off of this with something like simply gone or ZBrush but if you want really good results and you want the lowest possible poly count with the the best silhouette and all that stuff it would be better to make you know this this top be surrounded cube this bottom piece about a rounded cube and this piece back here you know a rectangle without a back face and then the rest of it you can retell pologize however you want as I said I'm going to use as your measure for that so the next part of the process is going to be e and instead of back to shaded you're going to workflow and build texture so with build texture this is a dialog that pops up as you can see you can tell it what to exercise you want it to be and how many texture sets you want or how many different material IDs basically UV splits that you're going to want and you can have you know for 1024 textures you could have one for 96 texture you could have a single 8k texture however you want to set it up and down here you can tell whether or not you want to enable color correction I always just leave it all out the default settings and then just set this to 4k and for your mapping mode you can tell if you want generic which is what I always leave it on you can use single cam you can use all these options here you can use keep UV so keep UV is when you import your own mesh and you want to use the UVs that you already set up on that mesh if you don't do keep UV it'll generate its own you v's and you'll get that output with your with your texture and then blending mode which is mosaic average max intensity min intensity and disable so when you go to build your texture I would recommend just looking at these settings unless you have your own mesh you're gonna do keep UV but we'll get to that part later so you hit OK and it's going to generate your textures which will jump into next okay so the texture is finished generating so if you go to view textured this is your mesh with the texture projected onto it now that you have all the data that you need to export your mesh and texture we're going to go to file export model it's like the folder you want to save it into and I'm just gonna give it a fake name but you always want to name it whatever your mesh is gonna be and then I recommend using FBX format it's the most versatile most optimized and it's it's the one you want to use for for your workflow if you have to use something like an older format like obj or something like that only use it when necessary there's certain software packages like ZBrush that still require it for import but you want to try to avoid it if you can it's not as optimized doesn't compress as well and file sizes larger for for obj format so I recommend using FBX and then for your textures I recommend using PNG so make sure you have export texture selected if you've generated texture and then select PNG and then once you hit OK it will export your mesh and texture together in whichever folder you selected ok so now that you've exported your high poly mesh with your high quality texture we are going to decimate this mesh to a lower poly count in order to reach a poet in Maya so you don't want to bring a 600,000 plus point or polygon mesh into Maya it's going to bog down your performance so since we're gonna be doing retopo we just need a guideline for where the surface is of the geometry so I'm gonna go into tools mesh and then decimate mesh and here it I'll give you a target polygon count so I have it set to 60000 polygons so you hit OK that's going to decimate your mesh if you look at the wireframe you'll see that the wireframe is much less dense than used to be because it's only 60000 polygons rather than 600,000 plus so we're going to export this mesh we're not to worry about regenerating texture a lot because we're not actually gonna use this for anything other than surface reference so you go to file export model and then once again export your mesh and then call this one low or we top over however you want to name it because we're going to bring this into Maya to do our Rita follow G so once you export that will load up Maya okay so I'm actually going to be using Softimage for this part of the tutorial because my Maya is having some issues that ought to take a look at later but the principles going to be the same I'm not going to show you I'm not gonna go through the whole thing of creating geometry and all I'm just going to show you what I did so you can do it on your own and you have an idea of how to set it up so as you can see here this is the sixty thousand poly mesh that I exported out of add just soft you can see there's Polly's all over even these rounded cubes or using a lot of polygons which they don't need so what I did is I went in and I created cubes around those surfaces as you can see they're just rounded cubes and on the back I made this plate as well as a single single surface it's basically just a rectangle with no back face to it which you can see on the inside of the mesh and the reason I'm using the original geometry for for guidance in here is because when you go to project your textures you want to make sure that your new geometry is as close as possible to the surface of the original geometry now obviously you'll see there's some distortion here where the edges of the original geometry were kind of bubbled out but we want to make the surface flat on the actual retablo geometry so so having this rounded bulb up here it's going to be a flat surface with rounded corners and all that so that takes care of those rounded cubes and then this part this stone Center portion of the drinking fountain I'm actually going to use ZBrush to retie pologize using zremesher and get rid of these cubes and then bring that in here and then add that into the into the three cubes that I've set up here to make the geometry extremely optimized so let's jump over into ZBrush oh and another note before we jump into ZBrush when you bring your model in that you're using for surface reference do not rotate it change its scale or anything I thought you wanted to say the exact same that it was when it came out of a dress off because when you bring it back in it needs to be in the exact same position we project your textures so you can do all of your scaling and repositioning and all that stuff after you've already got your your game ready mesh with the textures projected and all of that so in here with these cubes I didn't actually create UVs I'm gonna let add to soft of all that and make it a lot more automated and straightforward alright so now let's jump into ZBrush and I'll show you how to Rita pologize its base Before we jump into ZBrush real quick I want to show you what I did so I went back to the dense cloud in a geosoft and I removed all the sections of the mesh that I already Rita apologize using the rounded cubes so it's literally only this this main part of the water fountain with the stones that I kept so I got rid of this cube down here the whole main block at the top and this panel here and then I recreated regenerated a mesh from just this part and then I'm going to export this and then bring this into ZBrush to do my zremesh on so if you look at it in wireframe you can see it's still a high poly mesh so you just export this as an obj this time because that's what ZBrush requires to import and then you load up ZBrush and run your zremesh on it so let's jump into ZBrush now all right so this is ZBrush when it first launches so the first thing you want to do is get rid of lightbox you want to go over to import and then you want to navigate to the folder where you exported the meshes you're going to retopo in my case it's going to be base hi the one that I just showed you in a dress off where I cut out the cubes and the flat surfaces that are ready top up and you're going to open it now what it's going to do is generate a tool for you so it'll automatically select those your main tool so I have to do is draw it out by left-clicking and then by default that's not going to be 3-dimensional until you hit T on the keyboard and then you have a three-dimensional object that you can rotate around so once you've done this you can now go in and zremesh your surface now zremesh is an automatically topology tool in ZBrush now keep in mind anything you bring the ZBrush it's going to lose its UVs you can do auto UV generation in ZBrush but I recommend letting a dress off do it when you bring it back in rather than doing it here so if you go into poly view you can see what the density is now so what I'm actually going to do is I'm going to make it even more dense it's currently 24,000 quads which means it's close to 50,000 polygons because when it mm triangles which is what's going to be used in your real-time engine so you have to keep that in mind whatever it shows here is going to be double that in your real-time engine because it's gonna split all those quads into triangles so I'm going to subdivide it down by hitting ctrl D as you can see up at up top the active points is increased every time you subdivide it's going to go higher so I'm going to do it to around two point two eight million which is going to be subdiv level of four so you can scrub through your subdivision levels all the way back to the original one you had and all the way back up top by going into the geometry tab here and I'm going to delete lower because I don't need any of those and then I'm going to zero mess this this higher poly subdivision level that I did the reason I subdivide is because it's gonna give me a little bit cleaner detail and just make a better just make a better zremesh so in order to zremesh you go into geometry again and you expand zremesher now down here you have all the options for your zremesher you have your target target poly count once again there's gonna be quads so you want to make this half of whatever you actually want your poly count to be adaptive I usually disable because it kind of gives you its own poly count based on what your input it doesn't give you exactly the number you want so if you uncheck that are you unselected and then you'd put in your poly count it's going to be more accurate so for this since I want the entire mesh to be under 6000 polygons I'm going to run this at a lower level so I'm actually going to make this say 500 so 2.5 so everything here is a thousand so two is two thousand four is four thousand so two point five is going to be twenty five hundred so once I entered that in I'm going to click zremesher and up here you'll see the progress at the top left but this it should be pretty quick it's not it's not too intense of the not too detailed or intricate of a geometry all right so zero zero meshes completed now as you can see it made a much lower poly surface and it actually has really good edge looping and all that good stuff this is probably the best reat apology tool that I've used as far as having really great surface reconstruction so if you look at look at the lines that it made edge looping and all that stuff is is really well done now if you want to get a different variation of this and see if we can do a better job another thing that you can do is if I do a step backwards if you hold alt and click on zremesher it's going to use a different method of reach apologizing which it's doing now sometimes it'll give you a completely different result that'll look better sometimes it'll look pretty similar to the standard zremesh reconstruction so but you know it's worth testing to see which one gives you a better result and yeah I'll just give you a better round it'll give you a better all-around at end result if you mess around with it and find out which works best for your geometry you all right so now the step that that's done we can see that this is our low poly mesh and has a total point count of two thousand eight hundred and forty nine which is going to be double that in the final geometry and the cubes that I made are very low poly so altogether this is going to be a little under six thousand polygons right now that's generated we can look at the Pali view all right so now I think this is gonna be good to go and we can reproject you know we can use this and reproject alright so now I think this is gonna be good to go so now we can export this and then use it to complete our low poly mesh and then bring it back and add your soft and project the textures and all that good stuff now another thing you'll notice is that our there are some holes up here which you can do fill holes if you want to in ZBrush for this I would probably just rerun zremesh and let it do its thing to fill those in if it doesn't then you can do fill holes so if you want to fill the holes you can go into geometry and then you scroll down and click on close holes now if you do that it's going to close all the holes in the entire mesh which we don't want so I would just leave it as is or rerun the zremesher until it fixes those holes the purpose of this tutorial I'm not going to worry about it but keep that in mind when you do your zremesh other thing you can do is a dynamesh and then zremesh on top of that but that's also going to close all of your holes and I want to keep the top and bottom of this and this side panel open so I'm going to leave it as is for the purpose of this tutorial and then I'm going to export it bring it into Maya and combine it with the rounded cubes already did alright so in order to export it you can scroll up to the top go to export and obviously select where you gonna export it to and once again ZBrush uses obj as its default format so you can have to work with that until you export your combined mesh which should be an FBX so you would save and then load your obj into Maya alright so now we go back into Maya or in my case Softimage because my my is giving me issues at the moment and you can see I've already imported the mesh that I exported from ZBrush that I Rita pologize was zremesher and I've merged it with the three cubes that I created for the flat surfaces in the in the asset so everything is ready to go as you can see I haven't rescaled rotated or anything from how it was when I export it from Idris off you want to keep that all in the same place until you as I said you reproject your textures in a Drosophila that's not going to know what to reproject its textures on to so once you've done all that you obviously want to name your appropriately and then you want to export it and then you want to bring it back in to address often projector textures so let's jump back in to address off and I'll show you how to go about doing that okay so now I'm back in address soft and what you want to do is import the REIT apologize mess that you just exported from Maya or whichever 3d package you're using so in order to do that you would go to tools import mesh and then you would select the mesh that you just exported and then you'd hit open which I'm not going to do for the sake of this tutorial but once you do that it'll import the mesh for you which I've already done and as you can see if I go into wireframe it's the REIT apologized mesh that's just under 6000 Poly's and if I go into workflow again and hit build texture now as I said you can generate your own UVs if you like in Maya or whatever 3d package you're using and then project onto those or you can have a dress off generate them for you for the purpose of this tutorial I'm gonna have a dress off generate that you v's for me but if you import a mesh with your own movies then when you go to build your texture you want to make sure that mapping mode is set to keep UV this will keep the UVs that you already have on the mesh that you imported once you do that you would hit OK and then this is what the mesh will look like so this is a mesh that's just under 6000 polygons with the 4k texture projected onto it so now that we have the mesh which by the way I did not change any of the scaling any of the positioning or anything of the original mesh because if I did you wouldn't be able to reproduce on it because I just off will not know what the positioning of it is so I did not change any of those values since I exported from ad to soft all I did was lower the poly count andreat apologize to surface all that good stuff but I kept it within the same area of the original surface so now that you have your game ready mesh along with your newly created you've ease done by address oft you go to file export model then once again you would select a name for it and make sure export texture is enabled just before select PNG and then export everything and this will export the message you have in there now Yuri topologies mesh along with its its texture based on its new UV so you would hit okay so now we're going to jump over into substance painter where I'm going to show you the next part of the process alright so now we are in substance painter the best way to think of substance painter is Photoshop in 3d but rather than just allowing you to paint you know certain colors at a time a certain texture at a time it allows you to paint full materials at a time so a texture set so you can paint your roughness metallic and normal all in one go and it also has materials that you can apply directly to objects it has masking procedural material generation and a lot of really cool advanced features I'm not going to touch on on most of those for this tutorial I'm just going to show you how to use it as it pertains to photogrammetry asset creation so what you want to do is go to file new and you're going to select your mesh those gonna be your game ready mesh that you still haven't rotated or done any scaling or anything too so in my case it's going to be drinking fountain zero zero one low and then here you can add any other asset you want to bring in with it such as texture so I want to go in and bring the texture along with it so the texture that I generated earlier is going to be this one right here this is the albedo and the document resolution all the default settings and everything your here so substance painter is a non-destructive editor so regardless of what resolution you're working in you can always go back up to the maximum resolution without losing any of that information so I recommend working in 2k and then before you export bump it up to 4k because working in 4k can can bog down your system even on high-end systems so normal map format should be set to DirectX your template I always use Unreal Engine 4 regardless of which engine I'm actually exporting to but it has options for a bunch of different templates in here so I'm gonna set it to our limited Unreal Engine 4 normal format as DirectX compute attention Speights per fragment all that stuff is default I'm gonna hit OK alright so as you can see it loaded in the mesh and over on the left you can see your material ID I didn't actually give this one a name such just the default material name but it will bring in whatever material name that you give it if you have multiple materials you can show hi based on those materials if you like so by default it gives you just a standard layer here we're gonna delete that and we're going to do a new fill layer now for this fill layer we're gonna disable everything except for color so this is this layer is only going to be adding color into the layer stack or into the material as a whole and then since we imported that albedo texture we can go to click on base color and then do a search for albedo and the texture I want is right here if you hover over it for a second I'll give you a higher-quality preview so we want to click on that now as you can see it applied the albedo that I created to the to the mesh and you'll see that it's so glassy a lot because we don't have a roughness layer and it's just defaulting to 0.5 out of 0 to 1 so we're gonna fix that we're going to fix that afterwards so I want to name this layer albedo ok now the next thing we're going to do is we are going to generate the normal and AO from the high poly mesh so in order to do that you go under your texture set settings and which is over here and you would scroll down now I only have this layout because I'm using a single monitor to record for this tutorial I actually normally have the the palettes and all that stuff on a separate monitor but just see you guys in serie think I have it all scrunched in here so you would go to your texture set settings click on baked textures now you can do this process in Ex normal as well which I'll I'll show you also but I prefer to just do it all in substance painter it seems to be faster and gives pretty much the same results so by default you can have everything selected here on the left but we only want normal and AO so I'm going to click on done and then I'm gonna check normal and eh oh I want its output size to be 4k to match the albedo texture and then you want to select your high poly mesh now you could bake from your low poly to your low poly 4ao if you like and it actually gives you a you know pretty good results most of the time but if you do have a high poly mesh that you have all the details on you want to bake down from then that's that's obviously a better thing to do so you click on this button here and select your high poly mesh in my case it's uh checking fountain H and I'm gonna delete that because I already had had that in there so you would add your high poly mesh in here and then down here you can either bake all or it'll only bake for the material set that you are the material ID that you have selected since I only have one material ID it's only giving me this option so once you have all that set your AO your normal you have your output size to 4 K and you have your high high poly mesh uploaded then you can hit bake materials and it's going to go in and bake your AO and normal which is actually a very quick process it's quicker than what X normal does most of the time all right then I'll say baking finished now if you look down here back in your texture set settings you can see you now have a normal and an AO which is automatically populated from what it generated so if you click on the X you can see the difference at the normal map makes put it back add it again back ok and then if you hide your AO you can see the difference that makes as well by clicking on the X jolzi bring in fact so as you can see it it makes quite a bit of difference on the surface and and you definitely want to do that for very much as part of your PPR workflow now another method of doing your high to low bake is using X normal which is also a free tool and I'll include the download link for that in the description as well X normal looks like this so it's a little less user-friendly as far as the UI goes than substance painter but I will give you a rundown of how to use this as well because some people won't be able to purchase substance painter or will prefer to use this so the first thing you want to do is go into your high definition meshes and you want to select the high res measures you can use so if you have any in there just right click and remove then you can right-click an add mesh so I'm going to go over into my mesh export directory and I'm going to import drinking fountain zero zero one high and then you do the same thing for your low mesh and obviously you import the low mesh now make sure once again that your meshes are in the exact same position in the scene so this is before you do any rotation or scale it or anything like that any go right click and you add mesh and then mine is going to be l2 proj low to project and then if you go under your baking options you have all the options that you can bake out from X from X normal so if you do want to do a height map you can have that checked you can do all beyond occlusion all that stuff so I'm going to uncheck heightmap and just do normal and occlusion you can select your output size right now it's set to 4k and you can select your renderer now keep in mind some of these renders work with some maps and some work with others so you can test and see which one which works better default bucket renderer works with everything CUDA is faster but it only works with certain Maps I don't remember exactly what they are but you can go through and test it so I leave it set to z2 default and I'm only baking on my own occlusion and normal so then you also want to select your output directory obviously so I'm just gonna hit desktop for this one and I'm gonna give it a name call it D F and then obviously the file type that you wanted to export to and as you can see you can do PNG BMP pretty much all the main image formats so once you've done all that then you can go to generate maps and what its gonna do is it's gonna compare the surface differentiation between the high poly mesh and the low poly mesh and then generate the normal and I mean occlusion whatever Maps you have selected based on that as you can see it just finished generating the normal map now it's saving it the AO takes long as you can see here and I'm just going if the rest you get the idea so once this outputs your a a oh and nurtures you can bring those into unreal engine or you can channel pack the AO with roughness Mattel itself using Photoshop so pretty much sectional hide the locate so once all that set up now we want to go in and we can finally reorient the mesh because we're done using all of the positional relationship that it had with what we exported out of badges soft so now we can save this and we can go back into Maya or as I said in my case Softimage because I'm on my is having issues and then we can reorient scale and position this exactly how we want it to be so let's jump back into mine alright so now we are back in Maya aka Softimage so I've already gone through and scaled and re oriented the mesh so it's going to be ready to bring in Unreal Engine once it's once we're done cleaning it up in substance painter and doing our PPR modifications to it so what I did is I basically just centered the translation gizmo to the center of the polygons i rotated it around and I moved it over into the very center of the scene so as you can see this is the top view this is the front view this is the right this is our perspective view so I'm using the front as you can tell by this cube I'm using the front as this this part here that has the step on it I'm using the step is the front of the mesh and then I'm orienting everything around that you'll see that there is a slight tilt to it and all that that's actually in the object that I captured in the real world it's got a tilt to it and it's all you know it's not dull you know perfectly aligned now I also set this to about four and a half feet tall just guessing the height if you were wanted to you could you know measure the object obviously after you capture it and save all the measurements if you wanted to get it exact to scale but but President Oriole I just guessed that it was around four and a half feet tall all right so now what you want to do is export this and one thing to keep in mind is if you're importing in time for lunch and Unreal Engine is going to set the root of this object to wherever the center of the scene is so I put the base of it right at the center of the scene horizontally and vertically and then I dropped a little bit below it because it's gonna you know it's gonna sit below the surface a little bit so now that all that's done you want to make sure you also freeze all of your transforms you can see everything scale is set to one rotation transform all that set is set to zero after I moved it around so that way all that stuff converts over into Unreal Engine this would be the same in Maya or whatever a 3d package you're using then once all that's done you would go and export it export it out as an FBX and then we're going to bring that back into substance painter to finish our cleanup and PBR painting and all that good stuff so now we're back in substance painter so what we want to do is import the newly oriented and scaled mesh and replace this one with that so in order to that you go to edit project configuration it's select and then you select the mesh that you that you exported from Maya so in my case has drinking fountain zero zero one and since I it's going to be completely different positioning and all that stuff you want to uncheck this preserve strokes positions on mesh and another thing that I did that I kind of messed up on when doing this tutorial is I didn't give it a material ID that matched the unoriented mesh so you want to make sure you do that as well so you don't have to worry about reassigning your layer which is not that big of a deal since we haven't really done any work with the layers yet so I'm gonna uncheck preserve strokes positions on mesh hit okay as you can see it brought in the newly oriented and scaled mesh and I'm gonna have to go in and reassign these normal man and are the normal map in the AL so if we're not normal and then you click on I'll be on occlusion and all right now those are reassigned and then we need to recreate our albedo texture layer you won't have to recreate these layers as I said if your material IDs match it will just automatically keep those layers attached to that material ID so once again we're going to unselect everything except for color change our base color to drinking fountain and there we go so this is our newly oriented and scaled mesh with the texture we created earlier applied to it as you can see one of the biggest issues with this is that this water fountain Basin is still projected on there even though the surface is flat and we want to get rid of that and just make it solid solid piece of concrete so what I recommend doing is before you start doing edit any editing make sure that the viewport looks how you want it to you want it to be as neutral as possible so when you're doing your editing you don't see any color values affecting it from your Sibyl which is your image based lighting and things like that so what I like to do is go over to under viewer settings and change my environment map to Studio 2 which is a default Sybil or a spherical image and then if you hold shift and right click and then drag you can actually rotate the position of that that image here to adjust your lighting so I'm in a position in a place that I like which is here and then what I want to do is use clone stamp to get rid of this this base in the spring projected on the top so I'm gonna name this layer once again to albedo and then I'm going to create a new regular layer so in order to do that you just click on this this add layer button and I'm gonna call this patch you can call whatever you want and I'm gonna use this as my my clone stamp layer so in order for this to work you need to create a regular layer above your the fill layer that you want to clone from and you select its blend mode and you change it to pass through so this is going to do is it's going to pass through any changes that you make on top of the other layer so go over to your clone stamp tool which is up here and then a few more tips as if you hold ctrl and then right click and you move the mouse up and down it's going to adjust the softness of your brush and you can obviously bump up the size of your brush with the left and right brackets just like you wouldn't Photoshop so those are the only two things you really need to know for doing for doing clone stamping so the next thing you want to to do is you want to select your sample location just like you would in Photoshop but rather than hitting alt like you do in Photoshop you hit you hold V and you click on an area and you'll see that that's square shut up that's going to be your sample location and it's you can set it to be relative or not relative to the position of your cursor but once you start painting it's going to be relative to it so I'm gonna start going in and painting the same thing over here you want to make sure you select you know an area that makes sense for where your where your painting over it you don't want to you know select from this side and start painting over here it just doesn't look right so you want to blend it in really well so you go in and you cover up that whole thing using this method obviously gonna have to adjust the scale of your brush as you go along to make sure you don't you don't paint over or select a larger source than what you need Hey obviously that's pretty rough but you get the idea you want to go in and blend it make your brush size larger get different sample areas and just kind of blend it in make sure there's no repetition and just clean it up and make it look make it look authentic so once you're done doing all that that'll clean up the texture projection issue that you have and another thing that you want to do is or at least something that I like to do is I like to go in and sharpen the texture just slightly and I do that in substance painter because you can actually see what it looks like in real time in 3d on the mesh so in order to do that you select your albedo layer and then you click on the little icon here which is a defect click Add filter and then as you'll see it says filter empty so in order to add a filter you click on filter down here under filter and then you want to find sharpen so just type in a sharpen and you can see there are two versions of sharpen it's just one on the right because I'm not sure what the difference between the two is and then as you can see it's sharpened up our surface but we don't want it to be that sharp because that doesn't look very good right so that's without sharpening that's with so the default setting for sharpen intensity is one we're gonna set that to 0.25 okay so now if I disable it and then enable it you can see it's very subtle keep in mind I'm still working in 2k so once I bump it up to 4k it's gonna look even better right so that is the initial setup for our albedo texture and also if you want to go and do some more advanced D lighting you can do that as well all right so now we're gonna do some more advanced d-lighting in substance painter now in order to do that we have to create a curvature and world space for a wall map so we don't really have to worry about what those those maps look like they can just be based off of your low poly mesh we just need them in order to the to do the D lighting I'm going to show you so once again we go into baked textures uncheck everything except for your world space normal and your curvature and then rather than using this mesh which is the high poly I'm just gonna select use Pauline low poly mesh as high poly mesh and then baked materials okay so once that's done you'll see that world space normal has been populated and curvature has been populated so in order to generate your D lighting you want to select your out betta layer go back up to effect again or a defect go to add filter and then you for your filter you want to select baked lighting so once you do that it's automatically gonna populate with a curvature worldspace normal etc so what this is doing is it's basically baking light into your albedo so you can use that for D lighting to compensate for shadows and I'm not like it's tough so if I disable it a blood again you can see what it's doing so what I want to do is change the position of this this light so you can adjust the sun intensity and adjust its angle that good stuff now if you position all this correctly you use the correct colors intensity and things like that you can compensate for for shadows that they still exist on your surface now obviously we wouldn't want to do this to the entire service we only want it to affect the areas that are darker than what we want so in order to do that what I'm going to do is actually make a duplicate of this albedo layer okay and this duplicate is only going to have the baked lighting on it and the sharpening the other one will not have baked lighting I'm gonna get rid of baked lighting from the original one and this one I'm going to call albedo real it and then this I'm going to apply a black mask to this is going to completely mask it out so nothing from this layer is showing unless I tell it to and then I'm gonna go in and start painting the mask into this layer so you want to make sure when you're painting that your color is set to white white is going to show black is not going to show so we want to go in and paint just this area that's darker into the mask so I'm going to do that now as you can see as I start painting the area is already starting to brighten up because all that baked lighting is is only showing on that surface and the mask is now coming through now this parts gonna look darker because I haven't positioned the light and everything how I want it to be but we can modify that after I just want to make sure that the area that it's affecting is the area that I want it to affect and then we can go in and modify all those values afterwards you and that should be good enough for the pros of this tutorial I think you get the idea so you just want to go in and paint the areas where you want to remove shadows from okay so now if I hide the albedo relit layer and showed again you can see the difference in brightness now something that's doing that we obvious don't want to do is it's changing the color so we going to go in and change the color of the lighting and all that good stuff to make sure it matches everything else so light one I am going to make sure it's set to zero to set to zero okay it's the only light affecting it is going to be the sunlight so I'm going to adjust the Sun color and I'm going to match it as close as possible to the color of the default lighting on the surface I'm going to adjust the sky intensity and the sky color as well because we want to do is we want to brighten up the areas we don't really want to change the color too much let's the intensity a little bit as needed okay all right now as you can see you can go in and fine tune as much as you want but this is before we did any D lighting and you can see the back side is a lot darker and this is afterwards a brightened up that back side a lot makes it look a lot more like a consistent albedo with no shadows all the way around so you know go go in and fine-tune as much as you want if you even need to use this this part of the process but that's how you do it now keep in mind I didn't use this process for the final asset I'm just letting you know that this is something that you can do in substance painter and it can come in quite handy if you if you use it correctly okay so now that's done let's get into painting your PPR so we want to go in and make this water shiny and we want to make this panel back here metallic and also give a little bit of shiny shiny value to it I'm modifying the roughness of it so let's go in and do that now okay so now we're going to go in and start painting our PPR surface so we're going to as I said before make this water a little bit more shiny and we're going to add some metallic values and some shininess to this metal panel back here so I'm going to get rid of this relit surface just to the purpose of the tutorial so it keeps a consistent okay so the first thing you want to do is create an overall roughness so I'm going to make a new fill layer now what's gonna make sure all of the layers you currently have all of your albedo your patch and your albedo relit if you're using that are set to only show color we don't want it to affect roughness metallic height or any of that so create a new fill layer and drag it all the way down to the actually view at the top of the stack to begin with so what you want to do now is uncheck everything except for roughness because this is going to be our master roughness layer as you can see right now the surface is still shiny so if you go down here and drag your roughness around you can see it's affecting the roughness of the surface so since the surface doesn't really have much Sheen to it I'm gonna set it to a higher value I'm gonna set it to 0.8 just for the purpose of this tutorial which we still won't have a little sheen on the surface but not too much because Mosley's rocks are kind of polished another thing you could do is take the albedo make it grayscale and modify it to be a roughness mask but I'm not gonna go into that in detail right now you could you know also make that a mask for your roughness layer in here and get some more varied roughness for the entire surface if you want but this is just gonna be our overall roughness layer so I'm gonna leave it as is and then name that layer and I'm going to drag it down to the bottom of the stack because we there's no need for it to be at the top because what's gonna happen is any layer above it is gonna supersede it for whatever is enabled but nothing is enabled for roughness above it so you can put the roughness although at the bottom it's still gonna affect the entire the entire surface now what we want to do is go in and create a new layer which is going to be the roughness for our water which is what we're going to start with so I'm gonna create another new fill layer call this one roughness roughness water and I'm gonna drive this to the top of the stack to begin with and I am going to uncheck everything except for roughness and color the reason I'm leaving in color checked is because we're gonna use it as a visual aid for where we're painting our roughness so I'm gonna set it to a bright color like red I'm going to right click at a black mask which will completely mask it out and then I'm gonna go in and start painting where I want it to show but it's gonna be wherever this water is so I'm not gonna go ahead and paint all the water I'm just gonna give you an initial idea of how to set it up and you can go in and paint the rest of it as you want and obviously whatever your asset is it's not necessarily gonna be water and you can you know refine it how you like and I'm also going to set the roughness all the way down to zero so I'm starting to start painting it's gonna be very glossy so with the black mask selected you can start painting so I'm gonna shrink my brush down make it just as big as I need for the surface and I'm going to start painting as you can see it's already reflective and I'm using red as a reference for where I'm painting and then afterwards we can disable the color Channel once so we're done painting in he's gone and painted you know wherever you think it should be shiny or however you want to modify the roughness same thing as going to go for metallic which will jump into in a minute now we've got this little pool of water at the top and it kind of runs off the side and streams down the whole side of the side of the drinking fountain so what you would do is go in and paint you know obviously the whole thing down which I'll show you saw in the final version of the mesh and then you know paint all this in and that's going to be your your roughness for the water so now that we've done that we can go back to our layer I'm just assuming that you know we painted everything go back to your layer and you can disable color by unchecking it and you'll see that the surface is shiny now let's say we want to add a little bit of a variation to this because it's shinier than we want it to be it's too consistent so what you would do is create a new folder you would drag that roughness water inside of there and then you know obviously give that folder a name just to keep everything organized so roughness water and then we're gonna copy this mask by right-clicking on it going to copy mask then we're gonna do a new black mask and then we're going to right-click on that and then paste into mask which will copy the mask we just made for this one so for this I'm going to set it back to black mask for the actual layer so the folder has the mask that we just painted and the actual roughness layer has just a black mask on it so we're going to do with that black mask selected on the layer is go into a defect ad generator then down here we can click on generator and we're going to do mg dirt so this is going to do is going to generate a dirt mask for the roughness so as you can see here it's still reflective but it's got a little bit more breakup to it looks a little more natural we want to modify that a little bit so we're going to adjust the grunge amount the grunge scale a little bit there as you can see it just gives the the water surface much more realism and it's going to apply over the entire thing so basically this mg dirt is going to apply to the the entire surface so if I get rid of this mask up here you can see it's doing it to the entire surface the entire surface is glossy with that mg dirt mask that's the reason you create a folder that's masking it to where you want it to be and then inside of that mask is where it's going to generate its dirt all right so we're gonna do the same thing for this panel back here now since we just did the roughness I'm not going to show you how to do the roughness here I'm just going to go in and paint the mask and apply metallic to it but it's going to be the same principle you so I'm gonna do the same thing back here and I'm but this time I'm going to create a layer that's got metallic and roughness value so I'm gonna adjust my lighting again just to make it so it's a full lit I'm going to create a new layer this one I am going to disable everything except for color roughness and metallic at least to start with and once again I'm going to use red as a visual aid when I call this one roughness metallic panel okay and then I'm going to give this a black mask once again and I'm gonna go in and paint where this panel is so if you click somewhere I'm gonna just make this a little sharper because we've got a harder edge here so when you click the first time and then you hold shift you'll see that you'll get a line that allows you to paint in the straight line so wherever you click next it's going to draw a line between those two points I'm gonna go down here basically just creating the border around this edge and that'll fill that in I'm gonna do the same thing here yeah so we have a rough border around I'm just gonna go fill in this whole area here and fill in the little areas here that require a smaller smaller brush you I was even be more precise in this and you'll see that there's some projection areas but the texture isn't all that but I'm not really going to bother messing with that for the purpose of this such a trial you you okay so that's going to be our mask for roughness and metallic for the panel so now what I'm going to do is go in and adjust the roughness of metallic values so we want this to be shiny but not too shiny and we want it to be metallic I'm going to set the metallic value to 8.8 okay and then another thing I'm going to do is same thing that I did with the water I'm going to create a folder you get that same that layer we just created into it I'm gonna copy the mask going to black mask and then paste into mask then this I'm going to set back to black mask add a filter I'm sorry generator at a generator the generator mg dirt and same thing is going to apply to this we're going to go in and modify the values a little bit something like that we can also invert the values if we want to okay so now that that's done we're going to go back to our lair we are going to unselect color and as you can see we have a metallic reflective panel and we can still go in and modify it if we want to now that we know what it actually looks like so you know we can adjust the grunge amount make it shinier just a grunge scale all that good stuff you all right so that's pretty much it for substance painter now that we have everything done in here we're gonna go into exporting the textures and I'll show you how to set all that up okay so now we're going to go into exporting textures and the most optimal way to do that and best practice is at least from my experience so one thing you want to do before you go to export textures is you want to set your texture resolution you're working resolution to 4k so in order to do that you go under your texture set settings you set your size to 4k so I'm not gonna do it for the purpose of this tutorial but once you do that it's going to recompute everything as I said it's non-destructive so it's just gonna recompute everything and you'll get your 4k textures without any any loss of quality I'll actually you know improve your quality because you're bumping up to 4k obviously so once you do that you set it to 4k you go to file export textures and in here you want to create your own configuration so it has a bunch of default configurations I don't recommend using any of those I recommend creating your own and I'll show you why so I'm gonna go to one that I already created so this is one that I created for Unreal Engine so I named this one you e4r mah so are mah stands for roughness metallic ambient occlusion and height so you're not gonna be using height for the purpose of this tutorial but if you are using height it's already got a set up ready for it so what you want to do is create I'll set up according to these textures so any zero to one check zero to one texture is basically black to white values like roughness metallic on me and occlusion you want to bake into a single channel of a texture so this texture here is our mah is actually going to be a single PNG file with the roughness metallic ambient occlusion and height baked into it which I went into in a previous tutorial that I put up your normal is obviously going to use RG and B your albedo transmission or your albedo translucency is going to use RGB for your albedo and translucency can be your alpha layer are your alpha channel so in order to actually create these you just I'm going to create a new one for you real quick just to show you so let's say this is your new your new texture export config so up here you select what you want to create so for albedo trans you want to click RGB plus a and then for your normal map you just want to use RGB and then for your R mah you want to use RGB a separated like this and you want to name them accordingly if you click on this little number sign it's gonna give you the default codes that you can use so you have project mesh or texture set what this is going to do is get the name from whichever of these that you select so if it's your project it's gonna be whatever the name of your project is and then it'll be whatever you type in here so mine for example is drinking fountain zero zero one underscore test so if you go back to the RMH setup that I have you'll see that it says underscore albedo trans and it's using the texture set so the texture set is this over here so it would be material underscore albedo trans material underscore normal etc so that's what all that means so for this I'm going to use texture set and then I'm going to copy that at all these okay then I'm going to do one risk you know trans underscore normal aah okay and then this last one down here I'm going to recreate because it gave me the wrong one there we go okay so now in order to populate these you need to tell it what goes where so over on the left you have your input maps and your mesh maps so the input maps were we're going to use so base color is going to be your albedo so you would drag that over into your RGB and then select what channels you want to fill so it's going to fill the RGB channels your transparency is going to be your opacity but you would drag into your alpha and say you want it to be the a channel your normal map is going to be your normal hhor-- RGB channels for that for that slot your roughness is going to be your are for your are mah and you want it to be the great channel because that's just going to render in the are only going to populate the our channel your metallic you want to drag into your G channel you may say I want to correlate this are mah with your RGB a over here so then your on beyond occlusion your going to put into your blue channel and then your height your gonna put into your alpha and as I said if you're not using height you don't worry about it that's just I'm just giving you an example we'll full set up so once all that's done you have your texture export config so then if you go back this is the one they already created so I'm going to use this which is the same setup I just showed you so when you go to export you want to select that from the drop-down list so the one that I created is ue4 are mah and if you expand this it's going to show you what it's exporting so as I change these you'll see that that changes okay and then up here it's gonna tell you what your document sizes and what's your it'll tell you what your exporting to what resolution you're exporting to so you can change it to any of these resolutions but it's going to sample it from whatever your document sizes so currently the document size is 2k so it's telling me that but you want to use 4k as I mentioned before everything else as far as format all you want to leave as defaults of PNG at 8 bits is perfect your output directory is self-explanatory you just select where you want to export the files to and then once you're done setting all that up you just hit export it'll export your textures and whatever folder you selected and then it'll tell you when it's done and once it's done it'll give you the option either just hit OK to get rid of the dialog or you can open the folder that you just export it to so now that all that's done we're going to bring all the assets into Unreal Engine 4 and I'll show you how to set them up there ok so now we are finally in Unreal Engine 4 where all the magic is going to happen we're going to put everything together that we just created and you'll have a game ready asset so the first thing we're going to do is bring in the textures which we just exported from substance painters so depending on where you have them you just drag them in so a quick note on dragging assets into unreal engines especially textures is when you first bring them in you'll notice you'll notice a little plus symbol pop up and you'll see a crossed out symbol and then the plus it will pop back up you want to wait until the second time pops up or else it's not going to get your drag command it just seems to be a an ongoing bug with Unreal Engine but just keep that in mind or else you'll be frustrated as why you can't just import through drag and drop but you can so just do that drag it in there it'll automatically import your textures now it also automatically recognizes when a texture is a normal map and I've never seen it fail but if it does I'll show you how to modify the texture so it's actually being utilized as a normal map as you can see that I'm here already gave the notification that was imported as a normal map now if it did not do that what you can do is double-click on the texture just going to bring you this pop-up and over on the right side the compression settings you can change to normal map this is the default for all textures but if it notices its normal map which it does every time in my experience then it'll auto it'll set it to so if for any reason it doesn't you just set this general map and then you click Save and that's it okay so I'm going to delete these textures because I already imported them and have them all set up and I recommend keeping a very organized structure in Unreal Engine so as you can see here and I've mentioned it in previous videos I have my my root content folder because I release assets on the marketplace this is actually going to be part of a photogrammetry prop asset pack I'm going to releasing in the not-too-distant future so keep an eye out for that so I haven't named C media then props PAC Edition one and under that I have all my subfolder soive Maps materials meshes textures and under each of those I have all the subfolders for the different categories so under meshes I have generic nature sports etc and all these are correlated with what I have on our material instances texture as much as all that stuff that all the names are shared based on those assets so I've already imported the textures and they are in my textures structures folder structure folder as you can see here I've got drinking fountain albedo normal and RMA H which we just created in substance painter so now we want to do is import the actual mesh so I've already got that imported as well which is right here so I'm going to show you how to import it just for your reference alright so once again you could just drag and drop or you could actually go to the import dialog so if you click import and then navigate to where your mesh is and you double click the mesh it's going to bring up this dialog now it'll automatically detect what kind of a file it is that you're importing and give you the necessary dialogs when you import so since this is for a static mesh it gives you all of these import options so what I normally like to do is I leave it all at default sometimes I'll uncheck certain things like you know combine mesh and all that but I'm going to leave it all default for now I'm going to let it generate light map movies etc but you can go in and modify all these settings which you know I recommend going through and see what all these do and get the best options that you would that you want if you've already exported multiple LEDs you can import those as well along with the mesh but I'm going to show you how to generate those LEDs in unreal engine so go ahead and click import or import all off you're doing multiple meshes and since I've already done it I'm just going to close this out and my meshes here so this mesh already has LEDs generated already has a material sign to it and all that but I'll go through and show you how to how to set all that up so the first thing you're going to want to do is apply your materials so now the first thing you want to do is go in and generate your LEDs so as I set the beginning of this video this mesh has three LEDs so you can see the base LED if I go into wireframe and you can see over here the poly count so triangles are 9600 and vertices are just under 6000 so the beginning of this video and throughout the video I think I've mentioned that it's just under 6000 Poly's I was looking at the vertices and not the triangles so it's actually just under 10,000 Poly's which is still extremely reasonable for a room mesh of this type so yeah just under 10,000 Poly's so if I switch over to LOD 1 you can see that the Polly's dropped to 1900 1900 Poly's if I go to LOD 2 you can see it drops down to just under a thousand Polly's so in order to generate those LEDs you want to expand elodie settings and then you set your number of LEDs to the number of LEDs you want I think three is a good number you have your you have your high medium and low so you set that to three and then once you change this it's gonna activate this apply changes right so you click on apply changes and it'll allow you to go in and modify those LEDs so since I've already got the LEDs generated I can go to each one so as you select them here it's going to populate down here as you can see this LED is changing you can also change it from this drop down here so if you want to modify what each LOD is you just have it selected up here you can't modify the route led by the way it has to be one of the LEDs that you generated and then here you can say percent triangle so basically this is a percentage of the original triangles that are going to render for each LOD so as you can see I typed in 20 it automatically changed it to 19.99 but I typed in 20 cuz I wanted to be 20 percent for the first LED and then the last lowest LED I wanted it to be 10 percent so that's pretty much all you do is type in the percentage that you want you can also change it to you know you can adjust your max deviation pixel error etc etc and then you can modify all this stuff which I didn't even touch and then once you select the percentage that you want as you can see down at the bottom apply changes becomes available and you just hit that and automatically generate your LEDs and I believe Unreal Engine is still using a simply Gon's algorithm which is also one of the best in the industry and I recommend looking in that tool if you haven't already so once you do that all your LEDs are generated and if I go back into auto LED and you pay attention to the triangle count over here as I pull away and you'll see it drops if I turn off wireframe you can see how seamless it is you don't even see the Polly's dropping but does a very good job of auto-generating LEDs and yeah that's pretty much it so once you have all that generated you just hit save and your LEDs are set and it's ready to go when you bring the messenger environment so what I'm going to do now is I'm going to bring the mesh into the scene you know just do that by dragging dropping I'm going to set all of its location information and rotation all that to zero so you just literally tap through it and hit zero as you can see is telling me to build lighting which I'm not going to do just yet so when you first bring it in until you set up a material it's just going to have the default world material which looks like this those are what the mesh would look like when you first drag it in since I already create the material and assigned it that's why it showed up when I drag the mesh in but when you first do it it's going to look like that so talking about materials let's go in and generate a new material for this objects you so as you can see I have a materials folder and then I have an instances folder with all of the subfolders underneath it so the materials folder I reserved for my master materials and then instances are instances of those materials so basically you can have a single master material for PBR and then create instances of that where you can change the textures and values and all that that way it only loads the master material once and then it just loads the modifications that you make for each instance which creates much lower overhead so you should always be using material instance rather than a master material for your for your objects or for your assets so I'm going to create a new master material as I said I've already create one here but I'm going to create a new one just for the purpose of this tutorial I'm gonna call this test master the one that I used for this is actually PBR master but I'll set up the exact same okay so now that we've created the master material which is this test master you want to double click it to load up the material editor so I'm going to do is make a replica of the material that are already created so the very first thing that we want to do is create our texture samplers so I've already created what a placeholder texture so basically you create a texture sample it has to have a texture and put it into it even if you go to add textures into a material and since if you don't have a texture already assigned to that note and the master material it's not going to work so I create a placeholder texture for standard color maps like normal albedo RA H and all that and then I also create one for the normal map which is compressed as normal and they're both just 32 pixels by 32 pixels and you can just assign those to your texture sampler nodes and your master material so since I've already created them I'm going to have them highlighted I'm going to create my texture sample as you can see here the texture is already populated because I have it selected in the content browser so in order to create this texture sampler you just hold T and then you left-click so I'm gonna make three of these you can also create them by right-clicking and then tighten typing in texture sample you and you have it right down here okay so I've made three of these now I want to turn these into parameters that I can expose in the material instance so I'm going to select all of them I'm going to right-click I'm going to click convert to parameter and as you can see here it has a parameter name it's multiple values all like it's tough because they call it none one none and none - so all of these are going to start with texture - some of the name alden texture - to start with okay and then I'm going to sign them to a group called textures so this group is going to be a way of grouping things in the material instance whatever you type in here is going to be populated in this drop-down so once I start typing more things you'll see them show up in the drop-down so each of these now have to have their own individual name obviously I'm going to call this one texture - albedo armed aah and normal now as you can see I named these pretty much in order of how they appear in this root node over here which is the only thing that shows up when you first create a new material now for some of these values we can just plug them straight into the texture slots for the AO we have to do roundabout method because AO over here doesn't actually doesn't actually worked in under lunch and the entire time I've been using it which is ever since is released and I'm not sure why they still have it here because to my knowledge it's just it doesn't work at all so or do you actually have to multiply the texture on top of your albedo so let's plug in the roughness first which is going to be the red channel of your our mAh because it's our mah red green blue alpha we're going to plug in the metallic which would be the green Channel and then we're not using height but if you were you would plug in your height input into the Alpha over here and have your node tree set up for that then I'm going to plug in normal to the RGB of our normal texture sampler now for base color since we can have to multiply AO by the base color to get I'll be inclusion we're going to do a an extra node tree in here so we're gonna do a multiply by holding M and then clicking I'm gonna do a power by right clicking and typing in power because I don't know what the shortcut is and then we're gonna plug the B channel from multiply into power we're gonna plug the a channel into the RGB of albedo I'm plugged the base color from the master node and to multiply and then we're going to plug the base of power into ambient occlusion which is the blue channel of our mah so now what we need is an exponent for power to adjust its power bias we're gonna create a 1 vector so you hold the 1 on the keyboard and left-click and Verte that to a parameter this one's going to be called AO intensity and I'm going to create a new group for this called main and I'm gonna set its default value to 1 which will just be a oh it's normal settings and we want it to show up by default so I'm gonna plug in exponent from power into AO intensity and then that is our basic material setup everything is good to go and now we can go create a material instance and populate with our textures and get everything set up so you just hit save you can close out your material now back in the content browser we have our test master here which we just can finish setting up so in order to create a material instance you want to right-click on it create material instance and it's gonna generate a new file here and then you can name that whatever you want I named mine specifically for this asset and since it's already created I'm just gonna jump over to that drinking fountain zero zero one so as you can see my material instance matches the name of the mesh and it also matches the name of the textures that I created so as you can see the naming is all consistent so for the textures you just add underscore albedo underscore normal etc and scoot it all a lot more organized so if you're ever looking for everything to do with a single asset you can just type it in and then it brings up all the assets tied to that asset all the files attached to that asset so I'm going to go back to my material instance which is the one I just created off of the material the mass material that we that we created and then I'm gonna load that by double clicking it now as you can see I've already got it populated with all the textures and all that but what you would do is by default when you first load it up it's going to look something like this all this is going to be unchecked now you can see these are the groups are created so main and textures and everything is organized underneath that to make it a lot easier to to filter through everything now this toggle you can ignore this is something special I created specifically for this pack and we didn't go over that and the master material so you can just ignore that so AO intensity I'm gonna check that I'm going to check all these textures because I want to replace them so the textures are over here in order to put them in there you literally just drag and drop them so you drag them into their appropriate slot so the albedo the albedo the normal to the normal and the RMA h2 the RMA H now as you can see here I am using since I have this unchecked it's not gonna let me do it there we go so I am using the AR mah texture which we generated in substance painter so once all that is populated you have a fully functional material instance that you can apply to your mesh in order to apply to the mesh you can select the mesh either in the viewport or in the content browser how you want to do it and you can double-click the thumbnail if you have it selected in the viewport just going to load the mesh editor and then you want to assign the material so since we have the material open I can just click on browse which will find it in the content browser and I can just click this arrow here which will apply it to the mesh as you can see our material instance is now applied to the the mesh they just hit save and the mesh in the scene has been updated with with the material instance that we created now you can also go in and swap out the material obviously per asset and the scene if you want to by doing it here but I'm not gonna go too in depth with that one more thing that I will go over with the asset creation is your light map density this is normally something I do when I first import a mesh but I'm doing it out of order here because I forgot to cover it when we first imported the mesh so in order to adjust your light map density if it's going to be a static object you want to make sure your light map density is appropriate for the asset it's in order to do that you load up your ascetic mesh again and then if you go into general settings under your mesh editor you can see that you have light map resolution by default this is gonna be set to 64 but sometimes you want it higher sometimes you want it lower so in order to visualize this if you go back into the viewport and your mesh is set to static under mobility which this one is and you go under lit and you go into optimization view modes and you select light map density you can see what the light map looks like so you can see that the general plane on the floor has a really really low light map resolution and then the mesh itself has a high light map resolution so as I go on and adjust this you can see it modifying in the scene or you can see it updating in the scene that's the default setting I've bumped it up to 85 just to make it a little bit more dense and it's using the UV z-- from the standard V's good because I disabled generation of light map UVs which I unroll engine will do itself if you want it to but for this instance I didn't have it do that so once you've adjusted your light mapper resolution you can hit save another thing you can do is reassign the light map coordinate that it uses now light map coordinate index is the UV that it uses so if you have multiple UVs in here and you want to have one specifically for light maps you can do that by inputting the number of the UV here so as you can see it's set to zero because there's only one UV but if you have one two or three just put those numbers and it will use those for it's for its light maps okay I'm sure they're doing that all that hit save and now we have a fully game ready asset from photogrammetry as you can see it's got all the PBR surface all that stuff is his working cow it should and it looks just like it should the poly count is low enough for gameplay it has its LEDs everything is good to go obviously I need to build lighting but I'm not going to do that for the purpose of this tutorial and one more thing is if you want to lower your texture resolution I always recommend working in 4k and then you can always change it and Unreal Engine before you actually go to compile your your build so if you go into your textures and you find the textures that you want to change you can either do it one by one by double-clicking it and if you go in here it'll tell you what Max and game resolution is displayed resolution import resolution right so if you want to change that you can actually under compression if I collapse all these just expand compression you can see that it has maximum texture size if I modify this let's say if I want it to be a 2k instead I do that and I hit enter it's gonna take it a second to update but then you'll see that the imported resolution is 4k but the display and Max in game is 2k so you can go in and adjust all that and then when you're actually working it's going to still keep the 4k original texture that you brought in but what you'll see in your editor and when you build and all the stuff is going to be the 2k or whatever you set it to notice that that back to my default so there you go I hope you found this this tutorial helpful and hopefully you have a really good grasp of how to generate game ready assets from photogrammetry now and if you have any questions please let me know in the comment section and once again this is one asset that's going to be part of a asset pack that I'm releasing of photogrammetry props that you can use for your games or whatever project you're working on and it should be available within the next month or so so keep a lookout for it and it's going to contain probably around twenty different assets all right let me know if have any questions in the comments once again and I've put all the relative links down in the description as well as timestamps for everything
Info
Channel: C-Media
Views: 118,170
Rating: undefined out of 5
Keywords: Photogrammetry, Unreal Engine, Maya, Substance Painter, 3D Modeling, 3D Asset, Texture, Delighting, Photography, Adobe Digital Negative, Camera RAW, Photoshop, Game Development, Game Dev, 3D Asset Creation, Videogrammetry, Volumetric, XNormal, Tutorial, Image Processing, UV, Retopo, Retopology, Texture Baking, Agisoft Photoscan, Reality Capture, ZBRush, ZRemesher, Digital Asset Creation
Id: BrRzeMY-aQI
Channel Id: undefined
Length: 109min 5sec (6545 seconds)
Published: Sun Mar 11 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.