Modeling in Maya - How to Boolean

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

[removed]

👍︎︎ 2 👤︎︎ u/[deleted] 📅︎︎ Feb 08 2021 🗫︎ replies
Captions
hey everyone today i'll be covering in my professional opinion the best and right way to use booleans in maya i'll be covering key concepts on how to prepare your geometry for different boolean operations like union difference and intersection as well as how to avoid messy boolean geometry and maintain clean sub d ready geo at the end of the video i will also demonstrate a quick and dirty method to get better looking booleans that doesn't require subdivision modeling so make sure to stick around for that so with that let's get started okay so here we are in maya and we're going to begin with going through each one of these ways of using the booleans and the main rule that applies to really any boolean operation are preparing your geometry and then cleaning up the geometry but the better and more effort that you put into preparing your geometry for bullions the less you have to clean up so if you do basically neither of those rules you're going to be spending a lot of time uh either cleaning up or having just bad overall models so let's go ahead and start with the cylinder primitive example that i have here okay so i'm going to go ahead and hide the final versions i want to jump to these primitives here in the simplest form you'll see that i have these three these three cylinders okay now i always always recommend to use subdivisions of powers of two so that means using you know obviously not 2 but 8 16 32 64 and so on and so forth now for these we're going to make sure just to stick with 16. now all i did for these other two cylinders which was just rotate them 90 degrees so you'll see if i hit ctrl d and rotate them you'll see that they're in the exact same position okay so i'll delete that one here so we have our three cylinders and we want these to be to combine now obviously you want to make sure that they're also in the same exact position this is what i mean about preparing your geometry you'll see that the edges here are all are basically exactly aligned okay and the vertices should merge at exactly those points so you'll see that here i have all three of these edges basically coming from the xyz all merging at this one point so when they come together they'll merge nicely especially for subd models so i want to kind of do this one at a time so you always want to start with the object that you want to have the boolean operation applied to in this case they're pretty much the same so i'll select the vertical cylinder going in the up and uh or the y axis and i'll grab the one going in the z axis then i'll go to mesh boolean and i want to do union okay so you immediately see what it's doing here okay now if i hit three here and i'm just using the default boolean settings you'll see that the vertices aren't quite merged here okay so we're going to want to merge these but they did merge on the other side you can kind of see how it's doing that on the opposite ends here all right so what i'll then do before moving forward is cleaning up this geometry so jump to vertex mode select all your vertices hold shift right click merge vertices and then merge vertices right here to the right i want to use a small distance threshold of 0.03 and let's see what that does and there you go you can see that it merged all these vertices nicely so i'm going to go ahead now and do that with the third cylinder here i'm going to go ahead and also delete history so that's all cleaned up i'm going to select this cylinder here that we already have the two combined or booleaned and then i want to select the third one now if you do it the other way around it's it's not going to behave the way that you want so take a look and if i go ahead and do union well union won't matter here but if i for example do difference you'll see what happens okay now actually if i accidentally accidentally select the wrong one i can always change this here and change this on the operation and i typically leave classification as edge i don't really use normal and really that's all you got so if i go ahead and hit q or right click to exit and go ahead and hit three and you'll see the same thing happening here you'll see that these vertices here if i go into x-ray mode that you can toggle right here for x-ray mode you can see that i have two vertices selected right here so that's why i want to select everything here hold shift right click merge vertices merge vertices using the distance threshold of 0.03 hit q hit three there you go so in this is how to use booleans in the simplest forms now what makes it easier is since that we've already have the prepared geometry we've cleaned up the geometry by merging vertices now i can simply go ahead and select these edges here that where everything can join and give this a nice bevel um with a chamfer a chamfer all right so i'm going to select all of these edges here make sure that i've selected it all the way around and it looks like i have and i can hold shift right click and then we can do a bevel edge okay now we go ahead now i'll probably use maybe point one here with two segments and then i want to make sure to use uh chamfering off actually okay so you'll see how that we get these nice 90 degree lines and we get the holding lines on our corners our 90 degree corners and there we go now of course we need to simply hold shift right click multi-cut we can simply add our uh holding lines here at the edge of our cylinders that's going to help hold our form okay you can also turn on symmetry to save a little bit of time i think you get the idea all right and then now we can go ahead and hit uh three on the smooth preview and look at that we have this nicely combined three prong cylinder kind of coming in or this three cylinders from different axes coming in all joining with perfectly clean topology and we can continue to do whatever we want i mean honestly if you wanted to maybe have you know these two faces kind of connecting you certainly can you know i'll just go ahead and give this a little bit of offset maybe 0.5 and then go ahead and extrude that in all right so you can see where i ended up with that and i'll just go ahead and again kind of just control left click with the multi-cut tool but i think you get the idea with this one you can see the final model for a little bit more detail alright now on to the next example which is a little bit more complicated so if i go ahead now and look at the holes and box one here so you can see kind of what i have i already have these uh already created just to save a little bit of time but this is simply a cube okay with uh a few segments added okay so if i went ahead and created kind of a new cube to be roughly this size i would go ahead and create it with these dimensions so i go ahead and do a width of 40 height of 100 and a depth of 200 and then give it a width of two three and five of with height and depth subdivisions okay so that's exactly where this is at here and i can go ahead and actually drop that down in the same exact position and i can go ahead and if i wanted to because it's the same exact one is just delete the old one all right so i have these cylinders here and you can see how i have these cylinders set up now the key thing about these cylinders are i'm again using a power of two so i am using eight uh eight edges for all of these and you'll see why here pretty shortly okay now i know that i want these to kind of combine and go in and actually so if you get a better idea here if i go ahead and grab the done version you'll kind of see what i'm talking about over here right you can see that i have these going actually all the way through in some and some cutting through at 90 degrees and actually it gets even more complicated which is why i did this cross section of having all one two um and three of these cylinders kind of coming in each direction okay and you can see it comes out really nicely now the way that i go about this is is i'm essentially i'm applying all the same principles here all right now the first thing i need to do is prepare this box okay now i already know that i have this box here and i'm going to be com you know cutting these holes out in each one of these faces here all right now i don't want to just outright go ahead and cut a boolean in instead i want to prepare this box so there's a couple things i want to do i'm going to go ahead actually and add in some holding lines first so i'm going to cut in these holding lines using my multi-cut tool using ctrl and left click and actually let me go ahead and turn on symmetry on the world c okay so now that i have that i can save a little bit of time here and use use symmetry okay so i'll go ahead now again is add these holding lines like so and this is going to help hold the form of this box okay we can see that we have that all set up like so okay if i hit three on the smooth preview you can see that it's a pretty good i just need to add one more edge there okay so there i have this nice subd ready cube and now i need to cut these faces in now before i do that what i actually want to do is select these faces like so i'm going to start here with the these top faces okay um and then these front faces i should say and go ahead now and extrude with an offset here okay so i'm going to hit ctrl e or shift right click and do extrude face and just offset here real tight something like so okay so that gives me these faces here and i want to go ahead and actually do that with these faces on running the other way okay i'm gonna probably did it at the same time and i go ahead and hit g to repeat last and i'll go ahead and do another offset something like this okay so just so we're consistent you can always make sure just use the same offset here as we did on the last one which i think is i'll use six between the two to make sure that we're good here so six and six all right now keep in mind is i still don't have enough edges running down so what i want to do is grab my multi-cut tool and i can see that i need another edge running this way and then another edge running the horizontally so vertically and then horizontally now i'm going to hold ctrl middle mouse and that adds it right along the middle here okay and i want to go ahead and do that on each one of these squares and you can see there we go so that pretty much took care of all of that and now again you'll see i'm preparing my geometry i have eight edges right here and i want to basically eventually merge these with these edges here now it says 16 but keep in mind i have symmetry on so that's eight so i have eight and then eight okay great now again what we can do is i can go ahead actually let me isolate this so we can see this a little bit more clearly and i forgot to do this one down here so control middle mouse there to do it right in the middle and what i want to do is basically grab these faces and i want to merge faces to center boom just like that and i want to do that essentially for all of these faces here and i want to make sure to use g on my keyboard okay and we'll make sure of course i forgot the bottom one here and just use uh again q and merge faces to center all right so we have something like this and i'll do that running along the top here merge faces to center all right and i'll just go ahead and skip ahead here on these last sets okay and there we go we have all of these merge to center now i also want to give a shout out to frank axis jr on art station he has a lot of good hard surface modeling uh documentation and tutorials so i'm actually using um his version of this cube that i got the inspiration from and i'm just kind of showing how i would create this using uh the boolean workflow uh and his is very similar uh so yeah go ahead and take a look uh just in case that you've come across his and you kind of see me doing something similar here all right so moving forward i have the box prepared and now i want to combine these now the main thing that we need to understand is that i need to do this in a certain order because again if we look here you can see that there's certain channels running inside okay so what i mean by that is i need to select all of these cylinders here and then combine them in a certain order so what i'm going to do is isolate these cylinders here and what i want to do is grab the ones that are perpendicular to each other first and go ahead and run a boolean union on these so i want to go ahead now and actually combine these first so i'll hold shift right click combine then i want to run or select these and i typically do this just so there's less for it to worry about as far as objects go delete the history and then i run the mesh booleans union go okay so if i isolate that we can see that it unioned pretty well and if i go to vertex i'd want to make sure just to run a vertex merge vertices merge vertices on that and i'll use maybe 0.03 and hit three check everything make sure all my vertices are merged and it looks like it is or it looks like it has and so now i'll go ahead and select the next set which are these running uh perpendicular okay so i want to go ahead and select these and these two running horizontal and go ahead and do a combine combine these two delete the history then i want them to attach to each other so i will select both of those and run a mesh booleans union again and there we go so this is basically the exact same thing that we just did um previously but except we're going to use these to cut out of another object so i'll go ahead and go to vertex mode select all my vertices and merge vertices again using 0.03 03 okay so we can see that we don't have any loose vertices everything's looking good now i can take these now keep in mind these ones here are just floating and just cut right through so i can shift right click combine these delete the history on that then i can grab our cube here and now we can run that boolean operation on this now i want to cut out of this object here so i'll select the cube select the cylinders that i want to cut out of and then go to mesh booleans and then do difference and there we go look at that and it cuts that out really nicely and i'm going to go ahead and hit q to exit the tool and hit three and we can see now that now we're pretty close but i need to uh kind of clean this up a little bit by merging these vertices here and all told that is a pretty easy thing to clean up here and i can just kind of run and just use a target weld now remember i want to make sure to take these outside edges here and weld these like so okay any of them that are off pretty pretty big okay now the good thing is since this thing is actually symmetrical basically in all all axes um i can go ahead and kind of do just like the quarter of this and then i can mirror do like a double mirror to clean some things up okay but i think you get the idea that kind of comes out really nicely here and i'm just merging these like so and i could have you know spent a little bit more time getting those edges aligned but i think it's it's fine to show you kind of if you you know not really skip a process but if you're going through and doing things in different order and spending more times in certain areas you'll kind of see where you'll save time and where you're where you'll spend some time okay so we have something like so now we're just merging all of these vertices like this okay and i'm liking where this is at and we'll just clean this part up here all right so i'm gonna just keep going i'm gonna do one pass here i'm gonna pause clean everything up and then we'll keep moving okay so i went ahead and this is what i'm gonna want to apply a symmetry to so in order to do that i need to make sure you can see kind of i have to add some cut points or edges here so on that inside cylinder so i need to go to multi-cut and i'm simply going to just hold actually finish merging these vertices here and you can see i can just hold ctrl or hold shift right click grab my multi-cut tool and go to control middle mouse and add that right in the middle and that's going to allow me to kind of cut that a little bit easier here and i need to do the same thing on this inside piece a little bit hard to see but if i kind of zoom in it's this one right here oh you can see now if i zoom out where it is relative to that okay so now i can go ahead and select these like so and i need to do the same thing on this inside one right here zoom in hold shift right click multi-cut so hopefully that was a little bit easier to see but i'm doing this all so i can save time by just doing some mirroring okay so this is what i'm trying to cut all right so i'll go ahead and with those selected shift actually i need to make sure to cut this right across see that this is a little bit of cleanup here and i can go ahead now hopefully and cut this across all right and shift select marquee select and there we go all right now it looks like we're good i'm just going to do one last check here um i'm going to run a merge vertices here on this and clean up anything else that needs to be cleaned up now that i can see the inside and select these vertices merge vertices and go ahead and merge that nicely there okay and we can see this one needs to be cleaned up and merged so i can go ahead and do a merge to center if that threshold isn't big enough you can see these ones uh as well and i can hit g to merge those okay i'm actually going to use a larger threshold because it looks like 0.01 is a little bit too small i can use maybe 0.02 like so and that should hopefully catch anything else here okay and looks like we are all good and we've cleaned up everything and then now what i want to do is you know to keep and maintain the hard surface look let's go ahead and select these edges that are running all around like so and this is where i'm going to add my non-bevel or bevel with no chamfer so i'll just make sure hit three on the keyboard make sure i grab all these edges just so i'm careful a little bit easier to see them in with preview by hitting three on the keyboard and go here like so all right and i think we got them all if now we're pretty close i think you get the idea we got all of these here we're going to go ahead and select and create these as our holding lines so i'll go ahead now and hold shift bevel and set this to maybe something a bit tighter like .25 give it two segments and then turn off chamfer and there we go you can see because adding that extra segment that really holds that inside line and we get this nice looking channel kind of running through and you need some really interesting effects here all right i think that's good and you can do some cleanup there but once i'm ready and happy with that i'm just going to clean up one last thing okay it looks like we're good and what i will do is actually give this a fong material just so we can see some highlights and make sure there's no other artifacting but it looks like we're pretty good here all things considered so i will go ahead now and hold shift right click and we're going to run a mirror operation a couple of times i'll do mirror here and we want to use axis position uh object is fine but i could also do world since this is modeled on the zero zero and merge thresholds of 0.03 from last time which is good and just double check make sure everything looks okay and then i'll run again i'll delete history hold shift and run mirror again but this time i'm going to use the y axis like so and that about finishes that there and i can go ahead and delete history and there we go that's how i was able to create this um and spend you know a little bit of time preparing and cleaning up our geometry um all with keeping in mind that i wanted this eight uh segment or eight subdivision cylinder cutting out of this uh cube okay now the last uh or second to last thing i wanted to look at was this pipe example so now i'll go ahead and hide the box here and i think we're good so i will move this here and we will grab our pipe okay so you can kind of see i already have something ready to go and i have a cylinder here now with this cylinder i went ahead and actually added these these other segments in here so if i turn on wireframe on shaded what i did was i created the cylinder with of course 16 segments then i took this cylinder and i said i know that i want this to be you know eight segments and so where this is intersecting here i made sure to add in these edges that would intersect with those incoming edges so you can see all of these ones are the key edges that i have here okay and that should cut out pretty nicely what i want or what we need okay so i'm going to hide this and then hide that so here we are okay then i did the same thing with this sphere or i would say this is more of a capsule and i have this sphere here same thing i made sure that i made sure to add these edges running horizontally and perpendicular so it would add in and the boolean would essentially catch that and i can clean those up pretty nicely okay so let's once i've prepared that geometry let's go ahead and just kind of do this pretty quickly i can go ahead go ahead and do mesh booleans difference and you can see there we go okay now actually this one instead of difference i want this to be a union there we go i i forgot uh i'm not really forgot but we can change that on the fly okay so now of course i go into vertex mode well first i'll delete history now and then go to target weld mode and we want to make sure to maintain the circulator of this extruded cylinder or boolean cylinder and i can do that and of course this is symmetrical but i'll go ahead and just kind of quickly do that as i make my way around and you can see that there we go look at that all right and i can bring this edge in here or these vertices in here i can run that if i hold tab just kind of marquee select or drag select so tab drag left click i can go ahead and offset that okay and go ahead and do that again and just kind of extrude inward all right great then i can make sure to select these edges right holding smooth smooth preview i can see that everything um merge together nicely and i can hold shift and then do another bevel okay and we can do two segments here turn on chamfer if we want or keep it on and then hold smooth preview and then there we go okay and we can of course make sure that all of these have our nice uh of phong material so i'll go and apply the font one and you can see how nicely that extruded and this is unioning now i'll do a the difference here and cut this out so same thing applies so i'll select this object and i want to cut this second object out so mesh boolean difference there we go then here i can make sure to run a target weld or well yeah basically target weld i want to make sure we're in vertices mode here and i'm just going to take these vertices and merge all of these to the where the sphere was cut out okay so remember we're merging all of the vertices to what's been cut out okay so this one i like this example because it needs a little bit more cleanup and if i go to vertex mode and target well you can kind of see what i mean i can go ahead and select these and just merge that to there and just keep continuing on and you can see i have this vertices here i'll do the same too okay looks like everything's looking pretty good and we're gonna merge here like so okay and i'm gonna make sure to run a merge vertices on these just to make sure nothing is left hanging out all right there we go and now that we got that set up here you can see this needs a little bit of cleanup too right so what i'm going to do is actually just cut the inside now something like this and delete these edges here control backspace there you go look it cleans up really nicely all right and we're just going to continue that um and symmetry would work fine but i think you get the idea and i will go ahead and double click these edges here and again run a bevel edge and that should be fine two segments here to hold that nice and tight and we can turn off chamfer and you can make this you know a little bit larger if you don't want it to be as hard as a crease um or you know i think it's a 0.5 maybe 0.75 and we can take these edges these vertices and move these in just a little bit just kind of space that out and there you go look at that i mean that is cut out incredibly nicely incredibly clean okay and so that gives us exactly uh what we want all right now i need to be careful here because i can see that this cylinder here is intersecting just a little bit um so i'm going to just kind of feel that in so it doesn't cut in and really we do the exact same thing um with this so the main cylinder so i'm going to delete the history on this cylinder select this object and we could run a boolean on that but i think that you know makes sense and i select the main parent object and then i'm cutting this one out and then again running a mesh difference and then you can see that's cut out and then what i would do is just kind of clean this up all the same but i think you get the idea i essentially did that one two three and then we end up with this parent or the completed object that we have here and i have the cylinder or pipe demo right over here i can go ahead and show that right now okay it's in the done group here i'll shift h and there it is right so you can see how i was able to just kind of clean that up and um i think instead of you know seeing me merge and cut merge i think you get the idea on how i can put that to practice okay because i want to make sure uh i don't go too long here but i'm going to show this last part here just a quick and dirty one because you might say hey anmar you know what like i like to sub d1 but it's not necessary i just want to you know do some you know cut outs on some flat surfaces or some simple booleans that don't need to be subtlety perfect no problem let me show you this one tip that's going to help improve your booleans going forward okay so i will grab my hide this done file or group and we'll grab booleans with bevel now here i have this really quick example and like i said let's say you have this and let me actually go ahead and apply these different materials so you can kind of see a little bit more clearly what's going on okay so i have this here now one thing i always always recommend is when you're going to cut out of surfaces okay avoid doing just straight cut outs if you can so you see here this is just a straight cut out look at the other side and notice how i did this simple simple extrude with an offset what i mean is i'm going to duplicate this actually so you can see the the difference between the two okay so we have this and i'm going to take this star and move these vertices in okay so this is going to be right on the inside here something like so then what i'm going to do is take these faces like this and extrude okay so my x-ray again ctrl e to extrude and just move these out okay so i move this out local translate but then give it a negative offset look at that okay so we're going to give it this negative offset and what we're going to do is fake this bevel okay also if you can avoid doing a boolean on flat surfaces like this always always at minimum if you can add more geometry okay and try to tessellate it as much as you can to help it uh to help the objects uh cut out of the surfaces a lot cleaner okay so i'm not going to go too crazy i'm just going to add about this much here okay so now that i got that what i'm going to do is you can see again i'm not spending any time other than that okay i'm going to take this and then i want to select the star object that i have here all right and run a mesh boolean and then uh difference okay there so it cuts that out all right and then now i'm going to do the same thing select this object and run that boolean operation here but now i'm going to go ahead and assign this fong so you can really kind of see the strength of this technique look at this look at that look at these corners look at this bevel here look at how it catches this highlight if i didn't do that look how flat it looks i mean doing that helps out and then you can change it and vary the size and do whatever you need to it's just it just helps immensely so see here i can do the exact same thing with these uh with these cylinders okay these this circular array of cylinders i can shift right click combine these here and i have these cylinders let me go ahead and combine these all right delete history then i'm going to select the wall again select these cylinders and then run that boolean difference and there look at that okay and then again like i said i will give this uh that fong material so you can really see those highlights look at that you see how much nicer that is than this having this flat surface on there like that it just this is how you take that next step level and avoid right you avoid flat corners like this always always do what you can and add those bevels and booleans are really hard to get those bevels but if you take that one extra step and prepare your geometry you're gonna improve the quality of all of your models okay so i wanted to make sure to bring up that last tip here and always make sure just for to for a little bit of cleanup run a mesh triangulate okay that just helps clean up the mesh and allows you to actually import it export it and move it to other softwares too um and also prevents any rendering errors because that way it prevents it from having to triangulate it come render time okay or at least you'll see the artifacts before because the models technically are always triangulated okay so i can go ahead and delete history on that and there we go all right so kind of going back here you can kind of see i'll go ahead and maybe give this a color i'll bring back my done models and i hope you guys found this helpful um trying to keep it around 30 minutes so about 35 minutes here so we're looking uh pretty good but i hope these techniques will help you um and the the last bit was you know the reason why i came up with this tutorial because one of my students was using bullions and you know it wasn't sure exactly the best way to do and i says you know what give me the weekend you know of course i showed him in class uh what he needed to do but i said i'm going to make a video on this because i see this happen all the time so again i hope these tips helped you guys if you got any questions comments critiques or even suggestions whatever go ahead drop them down below like comment subscribes always appreciate it everyone so as always stay safe and i'll see you guys around take care bye
Info
Channel: On Mars 3D
Views: 27,195
Rating: undefined out of 5
Keywords: 3D, modeling, 3d art, autodesk, maya, topology, edgeflow, hardsurface, hard, surface, tips, workflow, boolean, union, difference, intersection, best, easy, subd, subdivision, sub-d
Id: 3PY262onbRw
Channel Id: undefined
Length: 38min 26sec (2306 seconds)
Published: Sun Feb 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.