Tutorial 13. UV Tools

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial I'm going to take a look at some of the ways you can create manipulate you bees inside Houdini I'll try to keep this one reasonably short because it's hard to make you bees very exciting but there are some really useful tools in here I would say Houdini's biggest drawback when working with you v's is it could be quite hard to find what you want and the naming conventions aren't as straightforward as I was like but once you know what you're looking for there's some really powerful stuff in there in fact in game studios I've worked in the past I've written my own ODEs my digital assets for Houdini that purely work with movies because it's nice to be able to access the powerful UV tools inside Houdini from Maya so that all the artists can use them now the first thing we want to do is set up a scene to create a UV zin so take a new scene and drop in a file object and open that up and you'll see you have a file note and in here I'm going to load in a model that I've created especially for this tutorial it's a model of a robot that has a nice combination of curves and geometric shapes which we can use to demonstrate setting up movies now first of all we want to be able to see our UVs and the way we do this is if you take a look in your scene view you'll see at the moment it's showing the perspective view and if we open that up and change our view then we have access to UV viewport here so here you can see we have an empty 2d grid it's empty because there are no UVs on the robot at the moment we go back to perspective ideally we want to be able to see both of these at the same time so the way we can do this is open up split our pain so that we have two views inside it and prolongs in pain you're better with two view side by side and then this one we can change to our UV viewport or we can use the shortcut which is space 5 oops I mean on space one takes you back to perspective that's base five will take you to the UV viewport and now we can see our u-visa as we work on our model so at the moment this robot has no you please if we open up our geometry spreadsheet the UVs are generally created in vertex attributes the reason for this is if we created them on points we wouldn't be able to separate them across edges and all our UVs would wrap around which obviously isn't going to give us the results that we want so we except in very unusual circumstances we would say are you beads up on our vertices and this is what you v's do by default so the first two I'm going to show you some ways isn't really a UV tool but it's something that you'll probably use when you're working with you V's and this is called new be quick shade and what this will do is place a texture onto your object and for the quick shade certainly when we're setting them up we quite often just use our grid texture and this will give us an idea of whether the UVs are well distributed and if we're getting any stretching in them if you're setting up an object with the texture on it then you can stick your color texture in here and you can see that your UVs are set up correctly so this is really just a preview it isn't a proper shader so all you're seeing is the color values from your texture so this is purely for setting up your UVs at the end of the tutorial I'll show you also how you can very quickly access the Houdini equivalent of a PBR shader and that way you can see how your all your textures are working on your object but for actually working with you views this is ideal the other thing to note about this is because there are no you V's on my object you a quick shade is aware of that and it's created some for me but the civility to create UVs is very limited so where you can project them in the different axes and we can scale them but that's pretty much all we can do this texture parameters only becomes available if you don't have any UVs on your object already so normally you would stick this on the bottom of your chain and use it to display any UVs that you've created further up and it will use the UVs that you've created rather than making its own when you're working with UVs to start with you all contain the text UV so you can hit the tab and type in UV and you'll get a list of them or alternatively you'll find them inside the material folder so ya see all our UV tools first of all go first of all I'm going to show you three very simple UV tools we have UV unwrap we have ub project and texture all of these will create UVs from scratch and they do it in a very simple straightforward way and you will have come across these tools elsewhere most of the time you probably want something a bit more sophisticated certainly if you're working on a complicated model but if your model is quite simple one of these might do I'm going to look at them together because they're quite similar and they overlap to some extent as well so first of all look at the Evy unwrapped tool and you probably come across this before I know this is one of the tools that I use a lot in Maya it simply takes a number of planes six planes is probably ideal because then you have your positive and negative x y&z planes and for every face or collection of faces it looks to see which of those planes it's most directly aligned to and groups those planes together and projects onto those so you can see trace like this it has its grouped them together let's see for example the the body of the robot is quite a good one to show you because it's actually split it although there's a bevel here it split it right in the corners which is quite a nice result if we we're going to be texturing this the robot buddy I can play around with it a little bit if we change the spacing we can reduce the spacing between the parts but you'll see that the the layout isn't very good there's a lot of big spaces in here so if you're using that you probably want to follow it up with a secondary node which is you lay out and you Velia is basically a packing tool so you can see now it's packed much better everything gets a bit bigger UV space and well book about this later because there's some clever things you can do with it so that's UV unwrap you project again it's very straightforward all it does is takes a series of projection types and apply some to your movies in this case we have an orthographic projection it's projecting everything straight in the Z direction which you're not likely to use very often you'll see there's a collection of different types of projections so for example cylindrical will project from a cylinder around your object but give you some stretching at the top and bottom I have to admit I don't use this very often and there's the occasional object where this will work for example if you're using a cylinder or sphere this might be the best way of setting it up you'll note here that we could also assign it to what let's have a look at our geometry spreadsheet so because I put it on points now it's sitting in our point group but the default is to assign it to our vertices and in most cases this is where you want to work with you you visa just in case you aren't aware of it all the UV consists of is a an x and y-coordinate and which sits in a 2d plane rather than a 3d plane the U and the coordinate are the first and second components of the vector so for each point on the surface of the model you're referencing point on this 2d texture and the texture is stretched so that all those points set directly on the surface final one of our three simple UV tools is UV texture which will do your projections again so there's some overlap between these what's useful about UV texture is it leaves you to do some quite clever things with NURBS objects so let's say I create the torus and hook that up to an UV texture so our Taurus Alexis assigned to splines so at the moment this isn't a NURBS object but if we convert it to a NURBS object you can see that it is now taking into account the shape of the splines on the object and projecting around them and we can play around with this a bit when this is really useful is if you are if you've made a tool that creates surfaces from scratch using curves then you can use the curves that you've built the surfaces from to determine the way the UV sit and this gives you a lot of control over automatically generated UV s so it's definitely worth knowing about this for for those circumstances some of the other options we have in here this might be quite useful if your let's turn this back into a polygon mesh so what face will do is take every face and find the product best production for it so everything is being projected straight on is this isn't very good because you'll get a lot of seams basically every seam is cutting your UVs which is very inefficient but if you're working with a simple object it might be an easy way to set it up so hopefully on this through our UV layout you see we've just got a bunch of separate faces so not something you do very often but in some circumstances it's useful to know about it now I'm going to take these three nodes the UV unwrap you reproject and UV texture and call these simple and then move on to some of the most sophisticated UV tools first one I'll look up fairly briefly is the UV pelting tool if your character artist said imagine you're very familiar with this I'm not so I have to admit it's something that I've never used in Houdini but I'll show you briefly how it works so it's called can you believe help it straight forward and let's plug our robot now what the UV pelting tool will do is it works on areas with a continuous set of UV s it will take the edges of those areas and stretch them out either to a circle or to the shape of a primitive that you've provided it with and you can if you imagine all the points inside that joined by Springs it will try to push them apart so you get a nice smooth distribution of uvz across the surface this works very well for organic shapes which is why I character models modelers tend to use it a lot classic situation would be if you imagine an animal an animal's Pelt removed from the animal and then pinned out and stretched as much as possible onto a 2d surface so when we're working with you these were always taking a 3d object and trying to fit it to a 2d surface and there are just numerous ways to do that show you a quick example so this robot isn't very suitable because he's made of lots of discrete shapes but we can make we can separate out part of this model so if I take let's take his body and delete non-selected so now we have his body and run that through the pelt until at the moment we're not getting any results because his body is a it's a continuous closed object so there aren't any edges for it to graph so what we need to do is up an edge cut group and to do that we hit the little arrow and we can select edges in the viewport first of all go to notice okay no if we double click double click I can select an edge loop so what I want to do here is separate out these faces into will just split them along the edges so that it unwraps nicely and then we've got some edges to work with and then hit enter and you'll see we now have we have our faces later in the middle and we have a bunch of springs pulling them to the outside and we can increase the tension on the string Springs which will pull it up and if we increase a number of iterations again we'll smooth everything out of it so you can see now we have much more realistic distribution of you v's we don't have any of our laughing so if I stick that through my UV quick shade you'll get an idea of how it looks so we're not getting some stretching but not too much let's see if we can increase our iterations no I don't think we can do them anymore I've burned three strings I can play around with them a little bit I think we're getting some problems here so what we could do is add these edges and stretching is still not great I'm not going to play around with this much longer because really this is not how you would want to texture a robot it's much more suitable for organic shapes quickly demonstrate with the pig's head which is a bit more of a suitable object that type help the pig's head by default is split up already so we're gonna stick usually project node in there and reject it from the front and then everything is now part of one new visa so go back into Pelt and we want to make some splits now we've separated practice head we're getting our belting here on his face this these newbies are in the way so the easiest way to get rid of that let's go back to our UV project and after one side the pelt will only work on one discrete group of faces at a time the way to determine which one you're working with is using a hint primitive so if you switch on the primitive numbers zero which were using at the moment is obviously within the face if we wanted to do the base let's say what take 2 6 9 3 and now we're working with the underside of the pic this is a limitation that we couldn't even work on one at a time so if you wanted to do both of these separately you don't have to do the pelting twice and now you can see the results you're getting out a little bit more sensible with a pic though we would want to make some more splits and the write them up you know an easier way to stretch everything out neatly so that's as much I'm going to look at for now with pelting I'll stick him in a new group so the next tool we're going to look at is one that is something I do use a lot which is really useful particularly when working with something slightly less organic like the robot and when working with procedural models which 90 percent of the time is what I would be doing and that is the UV flat until takes every piece in your object and tries to flatten it out as much as possible and in order to do this you will probably need to create seams on your objects so if you imagine a cardboard box you could squash a cardboard box down as flat as possible but in order to texture every size of it separately it can serve to completely unfold it you need to make some cuts in it so you would cut down the sides and then you can unfold it completely so there are several stages to the on flatten node let's hook up our robot so the first thing it does is it takes all the pieces and tries to flatten them as much as possible and then when we start working with this we have the option to add seams so these will be cuts that are applied before the unflagging and then the last thing it does is it lays out into as optimal shape as possible doesn't do quite as good a job as the UV layout tool so you might want to use this afterwards you can set this up so that it's something you do relatively manual so you would interactively set up all your cuts to get the best results possible but it's also there's a way of setting it up so that it will do this more automatically I'll show you some of the manual tools first of all so let's take a look at a robot head you can tell that his head because his eyes are there and we're going to make some cuts because at the moment it's not doing a very good job of unwrapping him because everything's squished together so we want to cut along these seams and the edges to unfold him so here we use a tool so if you if you've got the tool selected you might need to hit enter to enter it and this will bring up a toolbar at the top it gives you two access to some of the tools it's also possible to access them as we normally do by clicking on the little arrows at the end so we could select a group of seams using this arrow or we can do the same thing inside our till so if we grab some seams you can see it's cutting as I go along already you can see a better shape out of this you can see with the pelting tool the different shapes of faces have stretched a bit so we have another tool that's really useful that allows you to straighten out edges and this is the align vertices in U and V direction so if we click this it brings up our vertices we could also do it by opening up vertex pins and adding here but we'll do it interactively in the viewport so what we want to do is take a line of vertices until it that these are to be straight so don't need to grab every one it's unfold a bit in a slightly weird way I didn't do that and just stick rather than being right the way across the top which might confuse it I'll just stick to the corners so like this right on the edges so I'm not sure why that's not working that's right and the people it's quite a few these okay that's doing what we right now so you can see it's taking everything along this line and it's straightened it out underlined it with the P direction if we take the other side let's see it's done the same and we're getting something that's square on the grid now and then we can do it on the other side of the robots well so you can see everything's lining up a bit better let's do it on this face nothing back his head so we're getting we're not quite there yet but we're getting something that is much closer to the shape we were 1/3 ahead no obviously this is far from procedural so I'm going to show you a way you can use this that is more procedural first thing we'll do is currently we've got a neighbor manual layout switched on the reason you would switch this on is because when you turn it off it well every time you change a piece it will try to refit everything and if you're actually working on a piece you don't want it to do that it would be really annoying because you keep losing the piece that you're working on but but now I'll turn it off and it's doing a repack so now we have a non flattening stage and we have a layout stage which are both done procedurally but we don't have any seams so in order to create seams we have another node this is called you biota see the auto seam note uses the curvature of the object to try and pick good positions for seams let's hook it up to the robot you can see an interactive display of where the seams are appearing on the robot and it creates Islands so discreet areas of your object and then since I'm in different colors the way that it works is it takes a scattergun approach to grabbing lots of surfaces and then it tries to merge them together so it'll take lots of random points across your object look at how those points sit relative to the points next to them and then if there they appear to be on one plane it will try to merge them and we can change both the grain tolerance which is the number of scattered points and the merge threshold in order to get different results so if we play around with these we can either achieve more or less different islands if we look in our geometry spreadsheet and go to our primitives then it's created an attribute called island number and these separate the islands out in two grips we can actually display these but we're displaying them anyway but we can persistently display them through I node network using a color node and if we change this primitive stick on random from attribute and then give it the same name so the name of attribute oh just a second I'll restart okay luckily that seems to have done an autosave so I'll just go through it again one really useful trick if you have a file that crashes and every time you reopen it it crashes again if you turn off auto update that will simply load in all the nodes without actually cooking them so you're very unlikely to get to crash and then you can just delete the last thing you did so it's a really nice way of being able to catch something but in this case this needs to be okay so as I say I'm good to the geometry spreadsheet our attribute is underscore underscore island underscore num and then two underscores again so we'll type that into our color and hope it doesn't crash this too that's fine so now we're getting a different color for every island and it's a little bit easier to see I think so if we go to our Odyssey just to turn out display back on here we can play around with some of our values switcher this is update so we'll leave this for now because we can play around with it once we're once we're doing the on flattening I'm going to create a new on UV flatten node because we've set off quite a lot of parameters on that one we should largely be able to use this as the default so looking for color in there for now so we can see different colors of the faces and on this we need to set it up to be more procedural so first of all we have some seams so the UV or two seam group auto zoom node creates an edge group called seams so you can see it's there so we just need to tell our give me a flattened node to use this group and you can see it's using the seams that exist here and then we want to turn off on manual layer so it does some packing for us what we're getting here isn't great and this is because we need to play around a bit more with our auto seams so we want to split things up a little bit more see with grain tolerance set quite high so it's not creating many in this case it wouldn't be starting off with many points on the robot so there isn't much there aren't many calculations for it to do so you can see the head is still being created as one object so we want to make more individual points and then the merge they're sold we'll start merging them back together again you see here we've gone a bit too high pushing things off a bit so that they overlap so we'll bring that back down again and basically we want to play around until we get an optimal difference between having things not overlap but also not in so many pieces that we are splitting things up and necessarily and then as I said before the layout tools on UV layer are a bit better so if we stick it into UV layout you can see it packs it all a bit better it's much does a much better job of filling in some of the ships so obviously there's some tweaking to do for each shape but you can see that if you know roughly what kind of shapes you're working on then it should be possible to come up with some settings that will allow you to procedurally UV and unwrap in an efficient way most of the time one other thing to note is the UV flat until will stick a grid on for you to see your movies in the attractive viewport and if you use your mouse wheel you can change the size of that grid just gives you a little bit of visual feedback so we've run really quickly through this collection of notes the UV auto scene and the UV flatten a little bit more a minute about UV layout but you oughta see my new be flattened really deserve their own tutorial so we may well come back to that at some point and go into some of the more detailed aspects of them but for now we're just looking at some of the ways you can deal with Uli's so we'll move on to some of the other tools so I would put the UE flatten and hatta seam into complex you details now let's quickly run through some of the options on the UV layout camera turn off the editing preview so this is a fantastic tool does a really nice job of packing everything procedurally and you've got quite a lot of control over it so some things you can change we can use the surface area of the model to influence the scale it looks like it's doing a pretty good job with that already we can as I pointed out before it was packing objects inside other objects so if you've got a closed shape it'll pack inside that which most of the time would want to be on that saves a lot of space we can change the padding so we can have larger gaps between our points if for example you if you're creating a light map UV set you might want these to be quite far apart because you're probably using quite low res texture for lighting and you're going to get some bleeding so you want to keep all these nice and flat part if were you if we're texturing then we can keep them a lot closer together this is really nice total so this will find islands that are identical and you've got some tolerance on there as well and it will pack them a top of each other so for example if you were putting textures on that have a surface texture that can be reused on identical surfaces then we can use this to save space obviously this wouldn't work for like nothing and we can also use ones that find mirrors and it will pack them together as well and cut the top you it's currently using the Thule space to align your islands but you can use their position in 3d space as well which in this case actually does a better job of straightening everything up so it's looking at its X Y Zed alignment in 3d space so that's just a brief look at the UV layout will give you an idea of how useful it can be yeah automatically generating movies so the rest of the UV tools all really fall into one category and they're about editing movies so in the same way that you can edit attributes in the 3d viewport you can edit the UVs in the 2d viewport so I'm gonna grab all of these and go through them relatively quickly so these are UV brush and edit very interactive and we have easily transform which is works in the same way as transform node that's pretty straightforward and we have UV smooth which will attempt to even out all our movies and usable I'll just run through these very quickly Danny yes I've got something to work with if your brush if we hit enter to bring up our brush and we can start moving EU V's about in the viewport not something we'd want to do with man-made shape like this but if you have a natural or maybe a pail or something natural shape you might find it useful to be able to shuffle some of the movies about you there's a little button up here that allows you to select points in the viewport and so I can just move these around so again it's just a manual tool for tweaking some of your your visa sometimes this might be the quickest way to fix the AV problem if you don't mind it not being a procedural the UV transform is really straightforward this works on all your ups so you can start moving them around scaling them rotate most likely to want to rotate them around the z-axis the UV smooth node well average out the distances between EU V's so you can do it's pushing everything apart again if you're working on an organic shape this might be quite useful so that you don't get any overlapping UV fuse note you can use to merge your UVs together based on distance we can if we increase the distance you'll see it just start snapping them together I think the most useful use for this particularly if you're working procedurally is if you switch it to grid and it will snap the vias to the neighbors grid so if you're working with really low res textures you might have used for this I can't say that it's one that I've ever used so these I'm going to put in the group editing tools I told you at the start that I would show you how to set up a basic Houdini PVR material so that you can display all the textures but before I do that I'm going to take my robot with his new UVs and take him into substance and give him some nice textures so I'll resume this video once I've got that model ok I'm back now with some PBR textures which I've made in substance for the robot using the new UV set that we created in a minute I'll show you how to hook them up so that you can see all the different textures in Houdini first of all this I want to tell you about something quickly that I thought I should mention and that's the concept of layers in Houdini there used to be a node in Houdini called a layer shop which is no longer available and this was the way you used to move between different UV sets so for example if you wanted a vase texture layer but also a lighting layer with different Uli's you need to create a new UV set and the way the layer shop was you would connect it it worked so you would connect it into your network and then move up a layer and any UV is created after that were created in a second UV set and then if you wanted to go back and work on the first UV set you had to create a new layer shop and go back to an earlier as you can imagine this wasn't a very straightforward way of working and thankfully it doesn't exist anymore so now if you want to create a second UV set let's say we have our UV layout here and we want to just make a straight projection I was taking a UV project note as it is this will overwrite our newbies but if we stick in two on the end we now have a new UV set if we open up our geometry spreadsheet you can see that we have the UV and then we have you negative so these are all separate attributes and if we want to display this in the viewer in place where the camera is you see we now have access to two separate UV sets so this will just read them from the model that you're working on stick back an auto and delete that okay I materials are a huge subject in Houdini so what I'm going to give you now is just a set of instructions to get textures displayed without attempting to understand why we're doing all this which isn't something I normally like to do my tutorials but we will have material tutorial relatively soon actually gives you a little bit more background and how they work we want to open up our material palette and this gives us a link to a bunch of default shaders and the one that we want to use is called a principal shader so the principal shader will allow you to render things like normal maps and roughness real time in the display view so we just drag this into here and we have principal shader you can make as many of these as you want and then let's give it a new name I'll call it robot and then in order to put it on our robot we want to go rather unhelpfully when we went into a material type tab it's taken us to the material menu so we want to go back to our file menu and we want to add a new node called a material node and we hook this up to the material that we just created so these two little icons here the first one will take you to whichever material is connected here which is a useful shortcut and the second one will open up a list of all the objects in the scene to allow you to select material now we've created our material inside the material palette which is here so there's our robot material so we just hook that up and you can see already that he looks a little bit different so if we hit the jump button it'll take us back to our material menu you're seeing a slightly different version here because you're seeing it in the network but the properties pane is exactly the same so by default the principle shader has no textures on it and it uses the vertex color so that's why we're still seeing our vertex colors on the robot so we could turn this off actually that doesn't do much for us probably because the the color that we have here isn't on our points it's on derivatives so let's go back into our object and well delete those colors I can just turn that off and back to our material by default Houdini always multiplies your albedo by base color which is gray for some reason no you're going to multiply it by the base color that wants to be white and now we go to our textures and set them up so our base color is exactly the same name we have a roughness texture and we have a metallic texture and we also have a normal texture which sits in its own menu enable that you have an option to add normal a bump but we want normal and you can see pretty quickly that's inverted the way okay a better representation of that now we want to tweak this a little bit more if we go back to our surface menu this value here for roughness once you've got a texture attached tells it how much of the texture to use so we'll wrap this up to 1 so all the roughness is coming from the texture and metallic assembly will wrap up so that it's using the metal from the texture you're still looking a little bit odd quite the reason for this is that we don't have any lighting setup so let's take an environment map on so I want to go back this time go back up to the object menu and in the lights menu up here you'll see that there's an option for an environment light so we create that and hook it up to an environment map and I've one of the substance of moment maps here and instantly you'll see that our textures are looking a lot better possibly a bit over shiny but generally he doesn't look too bad at all we can go back into our material and play around with some of the settings so you can see that this isn't a true PPR shader it's not doing exactly the same thing as a PPR but you've got far more settings here you can for example self displacement so we could have exported a height map from substance as well and had some proper displacement on him rather than just normals and we have a lot more options here such as an isotropy we can add a coat so a second specular map subsurface scattering and so on the important thing about the principal shader is that it's all in the real-time viewport and it's the only shader in Houdini that can do that it's basically pre-rendered so that everything inside it is optimized for viewing in real time this means you can't actually go in and tweak the settings inside it so if we open it up you'll see a message saying you can't edit it which is different from every other shader in Houdini in fact was every other the shader you would be encouraged to go in and tweak it but the other shaders won't render it fully in real time you have to render them out which is not so useful when you're setting up textures and if you used two games you're used to seeing these things in real time so that's it for this tutorial and hopefully this has been helpful I'm afraid it's quite hard to make movies very exciting it's not my favorite topic but they are something that is really useful to know about so you don't need to think about it next time please like and subscribe and hopefully I'll see you again for a new tutorial
Info
Channel: houdinikitchen
Views: 10,626
Rating: 4.9239545 out of 5
Keywords: Houdini, Sidefx, Sidefx Houdini, Houdini Kitchen, Nodes, Attributes, UV, UVs, Texture, Texturing, PBR, nodes, UV nodes, UV node, Displaying UVs, uv quickshade, uv unwrap, UV Project, UV Texture, UV Pelt, UV Flatten, UV Autoseam node, UV Autoseam, UV Layout, UV Editing Tools, UV Brush, UV Edit, UV Transform, UV Smooth, UV Fuse, Displaying PBR, PBR textures, Principle, Principle Shader, Principle Material, Material
Id: nYr4jX9gvyU
Channel Id: undefined
Length: 57min 21sec (3441 seconds)
Published: Mon Nov 04 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.