Parallax Occlusion Trim Sheets (UE4 Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Hello! We recently created a material that utilize multiple UV sets to provide seamless implementation of trim sheet items as part of our mesh generation process in Grimmstar. Because of the labor and problem solving involved, I figured it'd be great to share what we did with the community so others can utilize the same or similar techniques within their own asset generation processes.

In the video, I go over how to generate geometry and bake that geometry to create the textures we'll need for the material. Then I go over the material I made for this. Lastly, I go over some of the slight changes needed to be made for assets that utilize this technique (multiple UV channels) and how to ensure they'll work correctly within in the engine.

Hope this can provide some help!

👍︎︎ 2 👤︎︎ u/GrimmstarDev 📅︎︎ Dec 14 2020 🗫︎ replies

Bookmarked it for later, thanks. Btw - you a smooth voice

👍︎︎ 1 👤︎︎ u/Feral0_o 📅︎︎ Dec 15 2020 🗫︎ replies
Captions
hello alex here from astronauti games and i want to welcome you to another tutorial series video which will showcase grimstar's use of combining trim sheets with parallax occlusion mapping rendering techniques in layman's terms we're going to create a trim sheet which we can not only use to speed up the detailing process of mesh development but it will also allow us to increase the level of detail for these pieces as well as cut down on overall polygon counts for our meshes for those of you who may be wondering what parallax occlusion mapping is well think of it as normal maps but on crack while normal maps by themselves can alter the way lighting reflects off a texture or material parallax occlusion mapping actually gives a 3d depth effect to a material even though the material itself is 2d just take a look at the difference in the overall effect between a just a normal map on this flat plane and parallax occlusion on the same flat plane downside the parallax occlusion mapping or palm for short is that it's actually fairly expensive as a rendering technique palm uses screen space calculations to give the depth effect that you see so in effect we can actually cut down on the performance cost rather drastically by ensuring that the shader is only taking up small portions of the screen this makes the shader perfect for detailing meshes and is becoming a commonly used practice for modern video games star citizen is a great example of this they use palm everywhere palm palm palm palm palm palm palm palm palm palm palm palm look you can even see the outline of where the palm starts so how do we go about making pawn materials within unreal engine it's actually not all that difficult let me show you everything is going to start in maya well by for me you can use whichever 3d program you want whether it be blender 3d studio max you know whatever you use because we're making a trim sheet what i'm going to do here is i'm actually going to start just by making a cube i'm going to size the cube so that it will remain perfectly square while looking down on it from the y axis so here i am at a top down view i want to give myself some extra room to work with then we'll go ahead and just size that up a little bit and then i'm going to give it some extra height just so i have a little more room to do boolean operations to dig into the mesh the last thing i'm going to do to help with booleans is just give it a few more divisions here and this way there's a few more vertices for the boolean to work correctly without messing up the mesh so we have our cube and this is going to be used to create and lay out all of our pieces whether it be additional height or additional depth and just for visual reference additional height going up additional depth going down okay now because this is going to be essentially working as our high poly mesh i need to create a low poly mesh to bake this information to the easiest way to do that is just to create a plane or in this case i'm going to duplicate my cube here and then i'm just going to delete all these faces here all right i've got my cube and then i got my plane i'm going to call this one plane now this guy's fine i'm going to go ahead and clear everything and center my axes on here so now it's on the same layer as the top of the cube which is going to be our midpoint or 0.5 everything that goes below 0.5 is going to be depth and everything that goes above it is going to be height so since we're not going to mess with the plane i'm going to go ahead and just hide it now from here we can begin making our geometry however we want in order to simulate that depth effect so if i were to bring up a little cylinder here i could easily just turn it into some sort of screw thing i'm not going to spend time on this but if we wanted a screw to protrude from the mesh and give some height information we've got that going there if we wanted to dig it in i can just turn it around i can perform my boolean operation right and now i've got some depth in there too go ahead and undo all that i'm gonna leave this part up to you your meshes and your designs are up to you to use you can also purchase kit bash objects and you can use those as well just so you know when you are developing in this stage where you're creating those details you can go as highly detailed as you want remember you want to treat this as a high poly mesh because we'll be using it for baking for the sake of this video i'm going to bring in some of the completed geometry that we use for an existing trim sheet you can see what this looks like notice i have a couple of areas where i booleaned into the geometry of the cube such as these three objects here while some pieces go upward other pieces go down i'll go a bit more into detail on how this interacts with parallax occlusion mapping in just a little bit but for now i just want to make sure we pay attention to some things that are rather important one of the things you may notice is that i did get rid of the sides on the bottom of the cube because i'm done with the mesh i don't need that information anymore and i just feel like it's going to help me disregard any potential errors when i do the baking process so while i generally had all of these sides down i just got rid of that so every mesh that you see here has actually been altered so that no piece runs straight vertically up we're going to be generating a height map for the parallax occlusion effect to work and in order for the height to actually look natural we have to give a good three-dimensional shape and and we want gradations from the bottom to the top rather than abrupt changes and what i mean by that is that if we were to take an object like this guy here and we were to look down from a top down view we can see that the sides here these side faces are actually extended slightly outward from where the bottom is and i did this for every mesh on here and it's really important to get this done in order to get a natural looking effect the same goes for this portion here this goes inward a bit now the reason why that is is that if you are using height map information and you're looking straight on it might work it might look okay but the thing is is that very rarely will you have a perfectly straight on angle to anything in a game you're moving around in a 3d space you're going to be looking at it from the side but because we're generating a texture the texture will not have that information if you're going straight up vertically or down you will not be able to say apply a material to that because that information is missing this vertical information so rather than going from a value of what's basically 50 gray which is our level value and again i'll get into that a bit straight up to 1 which is our highest point we have a gradation which is able to sell that effect from any viewing angle and as long as you make the bottom area slightly larger and not too noticeably larger it won't even be noticeable when you view it in engine so there are many ways to go about you know doing this effects um within maya you can use the lattice tool if you haven't used that you can look it up very simple and you can basically just arrange the bottom so that it extends outward but there are a bunch of different techniques that can be used for this and the same thing is going to be used for the booleans that go inside the cube too for a depth we want the lowest part to be squeezed in a little bit already go to this you can see i have all of these faces kind of squeezing inwards just so we can have a good accurate effect with that too so let's assume that the trim sheet is done which this one is what i will be doing is basically just combining these two meshes and then exporting to obj now what i've exported to i just named it as both as i did so a couple of different variations just for some experimentation i want to working the easiest using both on there i did one where i had the base which was the base cube and then i separated the up areas which are these white meshes didn't work out quite the way that i wanted so i just combined them and exported them as one and now that we're here we also need to go back and export our plane i still have my plane here i'm going to unhide it you can see that it covered up with the other areas because it's on that same level and i'm going to export this plane as well there's my plane now what we're going to do is i'm going to boot up x normal to bake some of this height information you can use whichever baking application you prefer xnormal is pretty easy to work with for me and it's free so i kind of just go with that to set up everything in xnormal the first thing that we're going to want to do is select the meshes that we want to bake now i already have mine here but i'm going to go ahead and remove these so that i can just add them as if we were from a blank slate now we're under the high definition meshes so this needs to be the both obj that i exported i'm gonna go ahead and choose that you don't have to worry about these settings right now you shouldn't need to change anything for this the low definition meshes we're going to choose the plane now the plane likely will need some adjustments these adjustments will be the maximum frontal rate distance and the maximum rear rate distance right now everything is set to 0.5 i'm going to go ahead and bake this at 0.5 just so you can see the errors that can occur uh the missing information that will occur during this bake so that when this happens you'll know what to do so we have our high definition mesh we have our low definition mesh now we need to figure out what we're going to bake here in our output file we can bake whatever file name and format that we want i'm going to go ahead and just give those different names i'm not overwriting anything for now i'm going to go ahead and make it as a 4k map and what i usually do is i start with the normal map alone because the normal map is pretty quick to generate but i'm going to go ahead and do the normal height and on top of that i would recommend doing the ambient occlusion map as well but that one takes a little more time so i'm going to skip that for now so for now i'm going to bake the normal and the height information i'm using default bucket render with 2x anti-aliasing i'm gonna go ahead and hit generate maps and we will let this calculate for a quick few seconds here one of the things that you're going to notice as this starts generating is that some of the height information is going to be missed pay attention to the meshes up here and put that into relation of the texture that's going to generate here and you can see what's missing if you look up here and here and here all of this is very flat this is what i was talking about when it came to the ray distance so because we're missing that information and we can see it missing in our height map as well which is generated right here there's no information here i'm going to close out of this we're going to redo this and then i'll go back into that hype map window that just opened in a little bit so i'm going to stop the operation i'm going to close i'm going to go back to my low definition and i'm going to increase these to 10. and then i'm going to go ahead and hit generate maps again now this time around we should see that information actually being recorded accurately in both the normal map and the height map already exists that's fine we just did that there we go see now we're getting the information that we're looking for and override the height map as well that's looking much better too all right so now that we have that this is our interactive heightmap tone mapper this is going to allow us to kind of crunch some values if we want so as i was saying i was going to explain the whole heightmap value differentiation when it comes to parallax occlusion mapping as you can see the base value here is a 50 gray now this is going to be our level our level base height information anything that goes above 50 gray towards the white range is going to be closer to us so it's going to be higher up anything that goes below the 50 gray is going to be further away from us so it's going into the mesh you can see the areas that i had booleaned are actually darker so if i go back to maya see these areas let me hide the plane these areas are going in so therefore they are going to be darker values now what you can do with this tone mapper is you can actually crunch these values you see everything's black so everything's going down here next normal does provide a pretty useful little debug thing here so we can see anything that's red is basically values that are being crunched below their actual natural value so anything that's red is going to be pure black now i'm okay with leaving this as is and a lot of the times i wind up maxing these out because i want all of that height information but this is kind of a special case this guy is a little bit higher than everything else and it doesn't really need to be i kind of want to be able to get a little bit of additional height out of some of the other areas in here so i'm going to crunch this just a tad bit and looking at the values here just about there so now we've got a flat top that's going to be here and it's going to help bring up some of these other areas as well now one of the things that you may notice or may not there is a gradation on the outside of every single one of these objects that's when i was mentioning breathing out and making larger the bottom area of everything that we're going to be you know recording height information for now that we have this set the settings that i want to keep i'm going to go ahead and just close this window and it will store those settings and generate the height map for us back to here let's see it's releasing the data and those textures have been written so if i were to open up my final explorer here and go to my outputs you can see i have these three maps now of course i have three because i generated an ambient occlusion as well and i'm going to go into this in just a second but here's our height our normal map and then our ambient occlusion now the ambient occlusion is going to have ao effects on the flat plane too what i went in here and did is actually erased all of the ambient occlusion that is outside of these objects and the reason for that is that because we're going to be selecting just simple squares for uving if we have a bleed over in ao and we're and we get an abrupt change that's going to be very noticeable when we place these as either decals or you know whatever the purpose of the trim sheet is we do not want that we want just the base material to be under and to have this on top without any weirdly occurring cut off effect for the ambient occlusion so it took a little bit of time uh i probably missed some areas like over here but this isn't going to be seen so not a not a big deal um but just something to keep in mind as you generate these maps um specifically the ao map you need to kind of clean that up a little bit and before we move on any further i did just want to show that i did create a color mask and baked that into a texture as well so that the black here will be using the material that these trim sheets are going to go against which i'm just referencing by calling it the base material and then i have red green and blue masks for different color options that i can customize within the material instance itself um so completely optional to you but as i go through the material generation process and show you the material that we use just wanted to let you be aware of what we did for our trip sheet regarding color masks and now that we have all of our masks created i have my ao my height my rgb and my normal map all listed here we can go into the engine and we can start developing that material so as you can see i'm in the engine here i'm in one of our asset test levels where we just test a bunch of different materials and other assets i've got my trim sheet here and go ahead and full screen this we can get kind of a better effect i'm going to look at what's going on and you can see i've got this deception of height going up on this mask here well this material and so i'm going to go and open up the master material that we use and i'll go through it step by step um i apologize ahead of time if things get a little confusing it took me a while to get it put together and i'm just using a pre-existing one but i'm trying to go over every node that we use to create this and explain what's going on with that so let me go ahead and bring that over here all right so here's a look at the entire material now there's a lot of spaghetti going on here but it's all pretty simple um especially if you lay it out i have everything grouped together by other different effects um so we're going to start by basically just going from left to right unreal has a built-in material function called parallax occlusion mapping if you just type in parallax you can see it right there right so this is what's going to be handling all of our parallax effects [Music] there's going to be a couple of more advanced things that i do there are plenty of tutorials about how to set this up but there are going to be some more advanced things that i do regarding the trim sheet development because we are developing assets that have multiple multiple uv channels once you put in this parallax occlusion mapping node in you need to connect a bunch of things over here we're going to start by creating our height map so you want to put in a texture object you can start by putting in just a regular texture by holding t and doing a texture sample and then you convert it to a texture object if you want be right here or you can just look up texture objects we're going to use the texture object here we want to make sure that the texture object is set as the grayscale sampler type and within the image itself that we're using um this is going to be our height map that we put in here now the height map we need to make sure it's set to grayscale we actually need to turn srgb on it's going to give us some warnings for some reason it just doesn't work without srgb so i'm gonna leave it that way don't worry about the warnings it still works as you can see here but the effects we still have our depth going on so then we're gonna start by creating a bunch of scalar parameters for height ratio and put in palm height ratio set that to 0.02 for the min steps for minimum steps this is how many steps are going to be coming out vertically from the base well i say vertically but outwards from the material but there's a certain number of steps and then we're going to blend those steps in just a little bit so the minimum steps right now is just set to 20. 20 is very high uh quality lower performance and we can always change that with the material instances that we use but just for now we're setting it to 20 and then the max steps we're setting to 32. now the next steps is going to be a little bit more so with the max steps we're using a multiply node here which is then feeding into the max steps input of the palm node right here but the bottom of the multiply in that b channel we go all the way over to the left here we created a scalar parameter called dither threshold we're setting that to 50. the different threshold is going to be connected into a dither temporal a a node here now the input node being alpha threshold so we're controlling the alpha threshold via this dither threshold uh scalar parameter value on top of that we have another scalar parameter value that i titled temp aa steps multi basically temporal anti-aliasing steps multiplier and we're going to set that at 1.2 and plug that into a lerp our dither temporal aaa node goes into the alpha temporal aa steps multi goes into the b value and then the top of the lerp is just at the zero the output of this slope goes into the multiply which then goes into the max steps here this is going to allow us to control the quality and the number of steps for the outward effect that palm is going to give us we're using the dither temporal a a so that each slice doesn't appear independently we're basically in effect blurring the effects a little bit which gives it a much better cleaner look overall now here's where some things are going to start changing from a lot of the parallax occlusion mapping setups that you'll see generally they'll do something like this but the texture coordinate node here is going to be a little bit different so we'll get to that in a bit as for kind of standard tiling techniques um i have a couple of scalar parameter nodes one set the uv tile x one uv tile y they're both defaulted to values of one they go into an append so they can become one basically a vector two float and then that goes into a multiply which is multiplied by the texture coordinate which goes into the uvs now the thing is different about the texture coordinate here is i actually have the coordinate set uh the coordinate index set to one generally it's set to zero that's kind of your your default because your most assets or simplified assets i should say are generally set to just use one uv channel we are actually using two uv channels for assets to develop with this so i'm controlling that by setting my second uv channel to be the actual trim sheet whereas the first uv channel will be the basic uvs for the assets by basically i mean the base material so if we have a procedural metal material that is what we would be applying to uv channel 0 and then our trim sheet itself will actually go to uh uv channel one so we're using essentially in a way two different materials within one material by utilizing this technique and i'll get into that in the asset creation process for that a little bit later now for our height map channel this takes a vector for so we need to take a and pull in a vector4 and parameterize it as a height channel that's what i called it and then set the we're setting basically the height map channel to the red channel but we want to append these the uh overall color with the alpha and then input that into the height map channel so that we have an appropriate v4 there i just have red turned to one and the rest turn to zero and again we can parameterize this by using our material instances in the future our reference plane reference plane which i apparently misspelled here oh well a reference plane actually sets which way we want the height information to go if we set it to zero all height information will go outwards if we set it to one all height bet information will go inwards we have it set to 0.5 because we actually have height information going out and going in so that way when i said you know referencing that 50 gray of our height map which can i find that if i open this back up again so anything that's kind of a i don't really have pretty much 50 probably this this color around um 50 gray is gonna be our our level area where um things aren't going to go up or down but anything that goes below 50 gray towards the black is going to go down anything that goes up towards the white is going to go up and so we can set that with this now we can enhance the effects by parameterizing this um and if we had a channel or a height map that only went down or only went up we can actually get a little bit better uh results a little bit further out and better looking results by doing that but because we're using both we're setting it to just be 0.5 and the results came out still pretty good so um it works just fine that way now for the specify manual texture size we're just putting in a static bool false you can just search static bool it just defaults to false and just plug that in we're not using a manual texture size all right next up we have our light vector that's another built-in node type in light vector plug that into the light vector and then we have our shadow steps this is for the material to create shadows based on lighting and viewing angles shadow steps is set to 16 again this is a scalar parameter that is used for that and then our shadow penumbra is just set to one plug that into the shadow panel right here so that's a lot of stuff to just get this going and it's just going to be a little bit more now it looks like a lot more but it's really just kind of copy pasting things so we have a few outputs here we have our parallax uvs offset only shadow pixel death offset world position engine light vector material complexity this is for debugging um we're only using two of them and actually i'm not even sure if we are yes we are using the shadow steps in here so we're only using two of them the shadow output and the parallax uvs the parallax uvs are going to be the main one that we're going to need now what i did if you can remember um i created an rgb mask this is another one of our materials if i were to go to where this is at it should be able to let me unfull screen this this is the other one this is the one that i just referenced earlier in the video and you can see here we have our rgb mask now by using by using the rgb mask we're able to separate different colors and different materials that we want for each different color of the rgb mask now what i do is i start out by doing my uv tiling for each individual channel now we can start with the base uv the base uv is going to be anything that's black on that so if i pull this back up this is going to be anything that's black on here it's going to be our base uv color so i'm doing a simple texture coordinate node and multiplying it by our base uv tile and then i okay nope we'll leave it like that this multiply node is not needed it's just because i copy pasted from the rest of these we're going to put this into a diffuse map and our packed ao roughness and metallic map here we're going to use a texture for this what i did for these is actually created a very small just white texture you can see here's here's how big it is 16x6 um just as a placeholder for all of these on here so let's start by copying and pasting this so that we have red uv channel green uv channel and blue uv channel and by uv channel i just mean mask the different masks on here red green blue and then anything that is not containing any color information whatsoever we have those copied the only thing that's different about the red green and blue is that the parallax uvs are actually going into these multiply nodes that are further along make sure to connect that parallax uv to all three of these multiply nodes and then make sure that the texture coordinate unlike the one over here which is set to uv coordinate index one all of these texture coordinate index need to be set to zero because this is using just basic material stuff we're applying the basic material and then multiplying that to the uv parallax effect material so that we can control um the different colors of different things and give us a little bit more flexibility so starting with a diffuse map we have our base connected into the uvs of a base texture um this is just going to be a regular color texture map and then that is going to go into a multiply node which is multiplied by a vector 3 parameter actually i believe this one's a vector 4. um and so that way what we can do is actually control the color of what's going on let me go find so here's the test material that i have and because i have to do this seconds okay you can see under my base parameter here i have a color multiplier so because i have this color multiplier this is probably not the best example because this doesn't have much of a base so let me actually open up this one here all right so here's this one let me get the same lighting information here all right so now as i change this you can see i'm able to control the layer behind it the base material color be whatever i want so we're just multiplying that firebase texture and then we're going to do a little bit more with that in a bit but because we have this we can just copy paste and put it into here now i have diffuse map r which is connected to the red uvs so red to red so the red uv i'm able to tile the red channel of this rgb mask as much as i want connect it into here and this is just copy pasted these three nodes are the same as these three except that there's a different texture input and then the same goes for green and the same goes for blue now what we want to do is we want to have these different channels only affect the areas of their appropriate mask color what i did is just added some lerps here and you can just hold al and click to get a lerp we're going to learn from our base which is going to be our starting point so it's going to be plugged into a of our first lerp and then our red is going to be plugged into b so everything is going to be a unless we designate things to be b and that designation is done by the alpha input here and we're doing the alpha input by our rgb mask and because this is red we are taking our red channel and plugging it into the outfit here and then we're going to take it a step further and say that we want to add green anything that's green we want a green or a material to be placed into the green channel so we have our diffuse map our multiplier you know same thing going into b of the second lerp and we're going to grab the green output of our rgb mask and plug it into that alpha and then the same is going to go for blue with one more lerp so this lerp outputs into this slurp and then this one outputs into this one and then we're just grabbing our blue information and then our blue mask is going to go into the alpha okay so next up is the occlusion roughness metalness map this is going to be pretty much the same thing except with parameters set for the roughness and metalness they're going to be a little bit different on here um you notice i actually haven't hooked up the occlusion which is usually on the way we do things this packet on the red channel um you notice that that's not hooked up with so that might save us a little bit of time but if you want to add that um you're more than welcome to so for this i have our base or map or map base here which is another texture input that we're able to input and make sure that this input is set to linear color so that you can divide the pack channels because all of these are just reading the rgb information uh red channel green channel and blue channel we don't need srgb on them we just need like the same thing with the rgb mask linear color we're only grabbing channels based off colors here so we're feeding out our green mask into a multiplier which is being multiplied by a scalar parameter called rough strength base and i went ahead and just stuck a slider max on here so that we don't go out of control when trying to slide in the material instance and then the blue is going to multiply which is set to metal strength base so we have these two and what we're doing with these is a kind of the same thing we did before here we have our red mask green mask and our blue mask which are all the same setups see and we are lerping these again so these three lerps are all for the rough mask we can see we have a multiply going out falling here to the a input which is our our base and then b is going to be our red at the b and we're taking our red from our rgb mask and applying that to the alpha and then green going into the next one and using the green alpha and then blue going into the final one here and using the blue as the alpha and then i did the same thing for the metal masks again doing the base going into the a right here and then the red going into the next lerp with the red output of the rgb mask as the alpha and so on and so forth so it's kind of rinse and repeat that way here's where i have the ambient occlusion um this ambient occlusion is actually only affecting the parallax maps so the base materials all of these separate materials here aren't actually using ambient occlusion i simply have this plugged into the uv output of the parallax uv the parallax occlusion mapping node so that's going in here we're taking the rgb information i'm actually doing something different with it rather than plug it straight into the ambient occlusion input node here for the material which you can see i don't have anything going in i'm actually putting that into a power node and then setting a parameter for ao power so that i can control the contrast of the effect and i'm actually multiplying this by the color output of multiple channels um the first being the shadow channel i'm sorry not the shadow channel so we have our color output right go in here and this is the output here is being lurked into this multiply node and the multiply is taking our shadow and multiply it by that and then we're taking the output of this power node and multiplying the ao strength by the color here this just helps give a little bit more depth into the information that we baked in we get a little bit of darker areas into further back areas and it kind of feels like some self-shadowing now the reason why i have this note here is because i have a couple of switches used for color masks if we want to simplify the material and not worry about color masks we can simply go into a parameter here and if i find my i believe it would be under [Music] global here so if i turn off color mask you can see a lot of this information go away and now i just really simplified it but this only allows me to control one color for the entire trip sheet so that's why these are here and that's why this multiplies here as well so we have the outputs of these final lerps going into the true value of these switches and then we have only the outputs of the base going into the false of all of them and that is why you see two multiply nodes going in or the ao power i hope that makes sense for you the last thing is controlling the normals now we're using our parallax occlusion map that we baked for the first normal map here it's not that one again i set this up with a different material with the one that we baked it would look like this and i have a flat normal mo the flattened normal node here which is just set here by this scalar parameter which is default set to zero just gives me a little bit more control on the depth effect that i want and then what we're doing is we're actually using a base of a normal map uh from our uv tiling our base uv tiling for a a lower for our base uh metal normal effect and we're using the blend angle corrected normals between the two and then outputting that into the normal input here all right i know that's a lot to take in but it'll all make sense once you put it together play around with it the only thing else that we need to do is go over asset creation and using multiple uv channels to set up a mesh to utilize this trim sheet as we're using one single material for trims and base message meshes so let's get started on that so as far as mesh generation goes i am back in maya here and what i have here is a simple little test cube that i'm using to just test the effect now i created a cube and i just put some lines in it all right so let me just go ahead and make another one real quick over here we'll make it a little bigger just so i can see it alright and i'm just going to start cutting some lines because again this is just basic kind of test thing so i have my cube here what i want to do is go ahead and open up the uv editor i have over here huge i used two monitors so i'm going to go ahead and just give you these little separately in fact i'm going to do auto and then we will find tv set here grab my tool kits and i'm going to stitch all those together and then just stitch those together heading out and there's our box uvd right simple okay now we've got that sitting there what we need to do is actually create an additional uv channel for it um actually before i do that i'm going to take these uvs i'm going to go ahead and snap that there and i'm going to move this up to here outside of the one to one uv channel index now that i have that there i'm going to go to uvs i'm going to get to my uv set editor that over i'm going to copy these i'm going to rename this one trim sheet rename it all whatever you want now i have two different uv sets if i drag this over here you notice as i switch between them the uvs change now what we want to do is assign a new material let's take actually cut out a couple of faces here first and cut those out so now that those are their own uv islands all right i'm going to drag these off just for now what i want to do is create a new material material over here maya is fun and doesn't like to put me on the proper thing right away let me go to my bump mapping i click file go to the file and i'm going to find a normal map that we use for the trim sheet but it is there now turn on my preview for noaa maps and i should be able to see it in here all right so we're going to take our unused mesh the parts that are not going to be using the trim sheet and i'm going to scale this way down again i don't know not sure why that went away uh it's because it's not assigned that material so we're going to go up to window relationship editor uv linking i'm going to go to uv centric these uvs that i have on trim sheet are going to use file 1 for the normal map well i thought that would fix it anything i'll just assume they want to show up for that okay well either way what the objective is is that we want to take this make it all small and we want to put it onto a place with the flat uv area on a texture we can see now it's on a flat area it's not going to be affected by anything now what i can do is blow this up take these uvs and i can start assigning them to pieces of my trim sheets now the more concise you are with the actual uv islands the better the effect is going to be sold and i'll get into that a little bit later but as i'm placing these over here it's kind of squarish might be able to get it to fit in here not quite this i do kind of want to maintain aspect ratio especially for these circular pieces and if we can get this piece in here not quite we could probably fit this one in just fine though okay there's that one bigger to make sure and let's find a home for this one here now you can see with my box i have these trim sheet pieces here so i would go ahead and export this as an fbx which i've already done with this test cube here so i'm going to go back into engine here and here is my test cube so let me go find where this is as you import it do not import any materials we find with that there will be a couple things you will need to change with the asset itself so you want to double click on it and you want to open it one of things you might notice now at least for me when i did it everything was fine but we want to double check and make sure everything's set up properly our uv channels we might just have uv channel 0 and uv channel 1. now by default unreal engine is going to set our lightmap channel to be uv channel one and that is set by this little thing right here destination light map index it'll probably be on one if it is we wanna change it to two and then as we go down here we want to make sure our light map coordinate index is set to two as well what that means is that it's going to create a new uv channel and use that just for light map infrared information now our game grimstar has no precomputed lighting so lightmap doesn't even affect us but it does override the channel which would have been for our trim sheet so instead of seeing this on uv channel one you might be seeing something like this by setting the light map coordinate index and then the destination light map index to uv channel 2 it's making sure that this uv channel is set to light maps and we can still have access to our channel one for our trim sheet so every asset that you utilize with this trim sheet um every mesh that you use with it is going to have to be set up this way and that's where it comes into effect when we were using our coordinate indexes and changing that so you can see our quarter index is set to 1 on this material the reason being is because uv channel 1 is our actual trim sheet uvs or as uv channel 0 which is what we used for our other coordinate indexes is the base the very first channel of uvs so i hope that makes sense for you um all you have to do at this point is plug in the material itself always recommend just creating an instance one of the things you might notice when you do make material like this and you do the preview as like a cube it doesn't look quite right because it's not the entire material one face but that's just because of the different uv indexes being utilized so we just look at it as a plane here we have all of these controls for all the different things that we want um i will leave that to you to play around with everything else should make pretty much decent sense i will give you the settings that we use for our parallax occlusion trim sheet for this piece here now they will vary based upon which trim sheets you make and the depth information that's used with them you can see that our dither threshold was turned down and turned it down to increase performance our max steps was turned down significantly to eight and then our min steps was turned down to two so if i were to turn these down even further you can see we start getting these like layers of information there if i were to turn off the dither threshold now we get a the dither effect on everything and it looks really weird now if we turn it up it's starting to blend it so as we turn this up we get a smoother effect but at the cost of performance between 15 and 20 wasn't that much of a difference as long as i set the max steps back up to eight you can go between these two not really too big of an effect and to me it's worth the performance saving to just turn it down a little bit our reference plane was kept at point five but if i were to set this to one the entire material itself is going to be inset now one of the bad parts about that is that you can see i have these holes over here but already over here you can see because it's inset it's applying that effect in a tiling manner and i'm able to see that over there so if i just turn this to 0.5 as it's supposed to be normal that's supposed to be flat we get rid of that effect it may take some playing around with to get that last thing i did is you did notice that i put in the normal flatten i actually move this to negative 0.5 so i can get a little bit more um normal effect on it and i just liked the effects overall just gave it a little more oomph a little more emphasis on the effect of the normal map on there and the height channel has remained the same and then here is where the ao power comes into play so if i were to set it leave it at one which was default see i do have some nice dark areas in here to give some depth but it's just a little bit too much for me so i bring this back to where it was this back i like this effect a lot more just able to control that it's basically a contrast setting and then everything else is pretty self-explanatory on here we have our diffuse maps so if i wanted to change the map of the material for color information i could do that right now let's just set the white so that i can easily change the color as a solid color throughout the material and you can see i've set different colors for the different maps as i just go through these you see all that information is there and then on a couple of them i did adjust roughness a little bit but it's all to your liking here's where i mentioned that you get that warning height mass symbols textures grayscale srgb should be disabled um if you turn it off at least every time that i've tried to turn it off and save we now know no longer have a parallax effect you can see that srgb needs to be enabled even though it's on a grayscale in order for this effect to work properly so that's a lot to take in there's a long video if you guys do have any questions if you have any comments if there's anything that you think could have been done better or if there's anything that you need help with troubleshooting please feel free to put those into the comments down below i will be sure to get back to them as best i can i hope this can help you with developing future assets into getting some detail pieces you can place them really easily as you can see by the simple development of these cubes here all i have to do is designate edges on my uv channel and just put them to where whatever i need the added benefit of that is that if i don't like this one now i have a different one it took me one second so there's a lot of benefits towards using a process like this all right guys well thank you very much for watching i hope you have a wonderful rest of your day week month and year and i will catch you next time thanks
Info
Channel: Grimmstar
Views: 5,205
Rating: undefined out of 5
Keywords: Grimmstar, Space, Unreal Engine, Star Citizen, Rebel Galaxy, Indie Game, Game Development
Id: vwR0pDPKzeQ
Channel Id: undefined
Length: 54min 39sec (3279 seconds)
Published: Mon Dec 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.