Maya 3D Cave Interior for Unity with Substance texture

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys so I wanted to run through a tutorial on how I would tackle making a cave um I'll take it all the way from Maya to Unity and we're going to use substance painter to texture it although we'll also look at um what it looks like with just a repeating texture so I'm going to start with a cube I'm using uh D to relocate the pivot point so I hit D for a dog on the keyboard and then I'm holding V to snap that Pivot Point uh to a vertex and then I moved it up uh by holding X well first I hit W to go to the move tool and then hold X to snap it to the grid and that'll have the cube flat on the grid um now I was going to start with a sphere but the problem with the sphere is the pin wheel shape on the top so instead I'm going to start with um a cube and then divide it up um using the subdivide operation so that tool is up here on the toolbar right it looks like uh two planes one white and one orange um but I don't really want just a pure sphere so I'm going to undo that really quick and make more of a longer shape right so that I can have kind of that cave like feel to to it um I'll add a few subdivisions in here just to keep the shape a little bit better right you can think of those um like almost like support beams right when you have subdivisions and you're going to divide subdivide something um it's going to help keep the shape a little bit closer to a cube rather than shrinking straight to a sphere so after subdividing a few times I switch over to my sculpting tool right now the tool is too large so I double click on the icon on the bottom underneath the scale tool and I test out the size and the strength of the tool notice I also have my direction set to camera um you can either use camera or the normals selection uh either one should work then I'm just going to go ahead and um mash up the shape a little bit so that it has um a little more of that cave wall texture to it or cave wall shape right um where things have been kind of molded by centuries of of water um erosion so um not being too specific in my case uh you could go and grab um some good you know reference photos I was looking at some photos of caves yesterday so I had an idea what kinds of shapes I was going to go for um but you can see really it's just a bit of a Blobby shape and then I leave the cave floor relatively flat right especially if I'm going to be placing objects down on that cave floor like uh later I'm going to put some barrels on there um if I have a really kny cave floor then it's going to kind of jut into my um object geometry which I don't want so I can always uh hold shift to smooth out uh any sculpted areas like here where it's gotten a little bit folded um and I can hold control to push inwards right otherwise the default operation is going to pull that geometry out towards the camera but I've got a shape I might also um change up the brush size and strength a few times right just to make sure that the the mold isn't totally uniform then I'm going to prepare another Cube which is going to be um something I'm going to subtract this shape out of right so I'm going to push this shape into the second cube move it into place here select the main the large Cube and then shift select the small cube go to mesh Boolean difference and hit apply it's quite a complex shape so it may take a second to compute but there you can see you get that nice uh walls of the cave shapee without too much effort it's a lot harder if you're trying to sculpt something from the inside right if um you use this method of sculpting from the outside and then using Boolean subtract you get quite a nice result so here you can see in wireframe mode uh what that's accomplished I'm just going to squeeze in the geometry of this box that I'm not flying around too much um next thing to do is to unwrap this object so um the reason to do that is since cave walls are so complex there's going to be a lot of stretching you'll see I turn on checkerboard mode here and once you have that enabled right you can see the pixel stretching that's going to go on if I just apply texture to that object which we don't want so next thing to do is to choose a line uh or an edge that we're going to cut along so um I actually after I finished I realized I should have picked a slightly different edge here I'm just going to do a quick U camera based UV so that I can have all of that um geometry mushed up in one place that's going to um just going to make it better when I want to unfold it then I'm going to go looking for an edge to to cut along um now I ended up picking one kind of near the top Corner ceilings right like the upper left and upper right ceilings you'll see when I double click on the edge I could pick one that's straight down the middle but the problem is that there's going to be a visible seam um so what I end up doing is opting for something in the middle kind of just above eye level um although often what you'll see in um in cave textures is they'll actually make the cut closer to the ground um you'll see especially if you look at a photo of a cave right that typically the ground has a slightly different texture than um the walls usually I mean especially if it's been um walked on right like let see that quite obviously so next thing to do is to um use the unfold operation to um start to get rid of the stretchiness on that texture I mean the the cube got all stretched because it's still attached to Pieces so I'm just going to separate that out so it's not so distracting I selected those faces and then just do it UV camera based and move that UV shell out of the way so it's not um it's not so distracting then I'm going to come back into my main object uh for some reason I got that little uh pinching problem um up on the corner so it's kind of formed a a mouth shape so I'm going to zoom into that pinch and go to uh UV or vertex mode um select those two vertices that are bound together right and then just perform a cut operation on them right under the cut and so menu so now those two vertices will be separated so I can actually treat those um shells as different objects once I do the other side so same thing on the other side select those ver es cut them to separate them and then I'll go into UV shell mode select one of the halves and perform an unfold operation on that I can also um use the optimize operation after I've done an unfold um that just helps flatten out the object even more so I'm going to use substance painter to texture this um just as a demo so I'm booting that up while Maya thinks about the unfolds click the unfold button on the second half and then I'm going to move those two pieces into the U1 V1 space right that's the um place where all the um the UV Maps need to to reside so I'm not going to uh scale them separately just because um they should still be using the same scale right I'm just checking kind of as well in the viewport it looks like the squares are all about the same size there so select them both using UV shell scale them down and then move them into place um this scene has a lot of um polygons in it right so it is chugging it a little bit you can see in in the bottom left uh that little percentage bar ticking away right as I perform operations uh it is have having to like stop and calculate that stuff so um yeah so don't be surprised if my slows down a little bit and you can see I turned off checkerboard and an effort to um minimize that that lag so the other pieces also need to go under the U U1 V1 Square so I'm just going to move those uh other parts of the cube in there and I'm really not going to plan on showing those right I'll I'll move my camera in such a way that I don't see that flat face of the cave um but you could use a similar technique right of of the sculpting tool um to to create the outside of the cave if you wanted to show both the inside and the outside so with my UVS in place I'm going to export my file so file export selection and Export that as an fbx into a folder that you can easily find it in give it a name say export and then we can jump into substance painter so in substance just's close these windows go file new and choose uh select I went to template by mistake so I hit select and then find that fbx file that you just made hit okay and it will import that 3D object into your scene now first thing I did was check um for materials that are built in to see if there are any cave or rock materials or smart material materials that I could use um so you can do that by searching on the Shelf at the bottom there that's what it's um that area is called that houses all of your materials smart materials brushes Etc I wasn't able to find any stone or rock materials in there um so it doesn't look like those Ship by default uh there might be something hidden in there that I didn't spot but um when I couldn't find anything right went to the internet and substance 3D has its own um user based sharing site right for free materials or paid materials uh which is share. substance 3d.com there you just need to log in uh to be able to download these materials so I found a quick Rock one that I liked Hit download as me to log in you just use your uh personal Adobe account there to log in it won't let you use your lsbu account U it's going to give me an SAR texture um or file that contains all the different material files in there that needs to go under documents algorithmic substance painter shelf and that kind of file actually was just a material it was not a smart material so I put it into the Shelf SL materials folder once that's pasted in I'll be able to find it under the materials Tab and the Shelf you can just type in the name of that texture and you drag it into your layers area right so this adds that material as an layer rotate around see how it looks you can also shift and rightclick uh I didn't demonstrate this but if you shift and hold right click you can move the lights around in uh substance and it gives you a nice uh effect so then you can go to file export textures under the config uh section once you've picked um a place a folder that you're going to export to right you want to choose the config type of where you're going to be using that file so as you guys might have noticed right unity and Maya used different um kind of slots or files um to create the same kinds of textures so since I'm going to be using this in unity I'll do the unity HD render pipeline right hdrp told it to stay at 2048 by 2048 especially since it's a large object right I want to use a higher resis um texture for a large object next I'm going to start up my Unity project if I haven't already checked that the files are there and okay so it's given me base color a normal map and what Unity calls a mask map which is four different texture types um in one just while Unity boots up I was going to test it out in Maya since I have the color map so I can select my object go to the hypers shade and apply that color map to the object just to see what it looks like in my as well if I want to so hypers shade I made a blend texture just because um you know sometimes cave walls are a bit shiny they're a bit wet uh if you have a a dry cave you might want to just a Lambert then I I need to figure out where I put those um files right which sure so first I'm just going to demonstrate with a plain old seamless texture that I found on the web right this actually produces a pretty nice result because I the UV wrap is doing the job right but you can see the seams along that edge where I cut uh made those cuts and they are obvious from up close but from a distance um they kind of blend in a little bit so that's a point where I realized oh maybe I should have used um the edges along the bottom right to have the cave floor be where the seam is the other advantage to using the floor or the junction between the floor and the walls as the um as the seam is that you can put like little rocks and things to cover up the seam um rather than having it be exposed so I'll make another texture in here apply the substance painter texture and see how that looks see this one is just a little bit grayer the seam is still in there maybe not quite as obvious from some angles next thing to do is to bring uh the text Tes and that object into my Unity scene so this was the test scene that I made um the other day I'm just going to delete the stuff that I not going to be using in this scene right so the more modern stuff can go next thing remember you want to bring your materials or your textures into Unity first although in this case I'm not using the the export uh with embed media in Maya so I'm just going to be making a new uh material anyway so really it doesn't actually matter which order I do this part in going to grab that fbx cave file the same one that I imported into a substance painter and bring that into my project notice right since I'm using my scale that everything is way too small by a factor of about 100 times so here I'm just moving my objects around right to kind of create a similar scene um the the barrels with the sword jabbed into it and I wanted to test the the lighting and the kind of fire effects uh just to show that those will will also look good in an interior environment right in fact it's it's usually um more effort to light an interior environment just because you don't have that sunlight to do you know all the shadowing for you so you can create a lot of interesting um moods with an interior environment rather than just uh having pure sunlight I might have even wanted to delete my uh directional light to get rid of the sunlight next I'm going to go to uh create my material I right click inside assets go to create material give it a name and I can drag each of those those texture files into their respective slots base map mask map normal map and drag that material onto my object and that is my result so hopefully for you guys working on caves um you know this only took about 15 minutes 20 minutes to complete uh even if you've already made some walls right maybe this will inspire you to go back and kind of try this Boolean method to get more of that natural shape for your uh your cave walls right um so good luck guys um please let me know on the channel if you run into any difficulties or um can show me progress right this one this tutorial came about because I saw a few people were working on um different kinds of cave scenes so please let me know if you need anything and I look forward to seeing your work
Info
Channel: Mark Simpson
Views: 1,485
Rating: undefined out of 5
Keywords:
Id: JM3keQQ4j2M
Channel Id: undefined
Length: 21min 4sec (1264 seconds)
Published: Sat Jul 29 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.