Exporting Alembic From Maya to Unreal [with Materials Assigned]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
sup and welcome back so in a previous live stream we covered exporting uh complex animations from maya to unreal and one of those was uh this guy our cool looking um uh t-rex skeleton uh dude and uh we exported him as olympic um because he's got multiple he's got a very complex rig with multiple rigs and multiple skinning to a point where if you a unreal's going to throw a huge error is going i've found multiple root joints and i only want one root joint and and you can try and insert that and rebuild like like retroactively fixed the rig for unreal which i've been working on for quite a few days and i've managed to get like part different parts of the rig to come in um as if i haven't yet gotten like the full rig to come through uh or you can just export it as a limbic which is very quick it's a good pipeline like a uh maya exports great olympic unreal likes it everybody's happy the only thing when you export olympic and what we found during the live stream is that you end up with a bajillion material ids which you have to sort of apply by hand um just to show you what that looks like uh so and here we've got our dude again and you'll see we've got like a bajillion material ids which i uh applied by hand which is just really lame it takes time um and uh you could be doing other things like working on your animation or troubleshooting bugs rather than like dragging materials into material slots so with your alembic there's actually two options which are like sort of like i should say actually two trade-offs that you can choose between you can either have uh brain in your alembic and have it act as a skeletal mesh so it's still a limbic but it's got a skeleton and you can work with it much the same way you would any other skeletal animated asset and unreal but it's going to come with a bajillion material ids fortunately what we're going to show you today is how to bring that olympic in with the material ids already assigned so you just kind of have to create the material but it's going to connect itself so that saves you time which is good but the other option you've got is to bring it in as a geometry cache which gives you the ability to flatten all those material ids into one channel so you've only got that one channel to work with which is also really good for performance you just don't get a skeleton it's effectively just a cache asset um which you work with without any skeletal assets uh but again it's you only have that one material id which means it's you know they'll draw calls hitting the gpu are significantly reduced so protocon do you want uh full access to the skeleton for whatever purposes you might have in your project then bring it in as skeletal um uh olympic or do you have performance issues like you've got hundreds of these guys on screen or or other things with like lots of material instructions then use the flattened tracked uh geometry case option i'm going to show you both right now so okay going back to the very beginning we're going to jump back into maya and uh step one is going to be preparing this buddy for export now step one also includes setting up our material id correctly and that means um so that means setting up a face id unreal is looking for a very specific node in maya and it's um so if i if i graph the network for one of these guys it's not the actual named material it's actually the shading group that's what unreal is looking for um so uh and it's it's looking for the shading group not assigned to the object within maya the object node but it's looking for the shading group assigned to faces so we're going to set this up in a very specific way simple but specific way so let's make sure we're in we're looking at our polygons and i'm going to select all the polygons and uh right click and hold an empty space because i just want to have a radial menu and empty space and i'm going to go to face so that's going to convert my selection from objects to faces and i'll drag my selection box again to select all the faces and if i hit 4 on my key for keyboard i go to wireframe mode and i can see that i've got all my faces selected because it's orange if i deselect it it goes back to blue selection box around all my faces are orange i'm going to right click an empty space um or i can just right click anywhere on the model but i think i'll right-click an empty space just to be safe go assign new material because i want this to affect it globally not just like one part of the model um you can grab any number of materials you want it doesn't matter this is like literally just for the material slot it doesn't exist for any other purpose um i'm going to grab a use of blend and i'll name this master t-rex or material t-rex but specifically i want to grab that name so i'm going to um copy that and we're going to right away go into the hypershade hypershade by the way is up here it's this like little ball looking guy oh i've got a new feature i'm going to try it out okay so annotate draw and i should be able to um go you can totally see that let's make that a better color um hey it's up here yo check that out boom boom boom boom up there on the screen cool all right so that's there i've used the new thing now let's like totally clear it uh sweet done um so that's up there and this opens up the hypershade window which is what we're looking at here and to um look at the network uh so we need to find our shader under materials tab so if you're looking at something else if your tabs look weird up here you want to be in materials which is on the far left and there's our blend so i'm just going to right click on my blend material and go graph network and that's going to show me the material node which is you know this is the more familiar material interface but it's also going to show me the shading group which connects this material to the polygons um at the moment it's still called blin01 but we copied the name of our material and right before the sg i'm going to paste that so now this becomes m t rex sg and i'm going to copy that name and immediately go into unreal because we're going to create that material right away um so i'm going to create a characters folder i'll create a voxel vagrant folder so everything i do is going to live under voxel vagrant and i'll create this characters folder and inside there i'm going to create a materials folder and inside there i'm going to create a material and i'm going to give it exactly the same name that i just copied ooh i missed a little sg all right let's just double check make sure that like it's totally the same no differences whatsoever and it needs to be exactly the same all right that looks good yep cool that is exactly the same and we're just going to give that a meaningful color so that we can see that it's been applied um and by the way let me just sorry i'm not saying what i'm doing while i'm doing it let me just go back a step uh so creating a material in the first place i right click and empty space here in the content browser and go material and after that's been created and named i double click on the material itself and this brings out my material editor and i can right click an empty space to create a and then type in constant and what i want is a constant 3 vector constant 3 vector is going to give me my block color and if i double click on that i can go color wheelie of doom and let's just do a bright blue because it will be obvious that i have that the material has come in and connected so i just left click and drag on this little dongle towards base color and that connects it into the base color um cool save that and go back into the characters folder and i'm going to create a new folder called olympic and in there i'm going to right click and go import to ah right we haven't exported yet let's go back to maya okay so rebecca maya we have the um oh let's select all and go back to object mode and deselect so back in maya um so you can tell that we've got our our blind's been assigned to him um and animation is still working not that it would break for any reason for creating a material um and now we're going to do the export for the alembic um with a couple of very specific settings uh for that olympic to go through so under cache and by the way you can find quiche i don't even know if i'm saying case right there's so many different ways to say it cache caching it's under the rigging menu and you can change your context menus with this little drop down which is on the upper left hand corner of maya you've got modeling raking animation effects rendering etc so under rigging or animation either one they both have the same menu uh you can go to cache olympic cache export selection to alembic options and let me bring my little options window into uh view so if i sort of i wish i could make this bigger um all right so everything's at default up here uh it's just picking up my time slider and down in advanced options what we want to have selected stripped strip namespaces will rip out any namespaces that maya has added if you imported this or you're using a the reference manager super useful because maya likes adding a bunch of superfluous names and unreal hates superfluous names so at least this gets them getting along a little bit better uv right you want your uvs to come across right color sets and face sets you want your color sets you know with the material we just created um but you also want the ids associated with the faces um i'm also doing world space export uh just so i can get like my my where it is in relation to zero zero zero i'm going to write visibility so i definitely want visibility to be on and finally write uv sets um so these are the settings i've been using that have worked really really well for me and i'll just go export selection and i'm exporting that into my project folder in case alembic and i will call this one tricks id export selection it's going to go through the animation so it will step through that takes a minute so just maybe have a sip of coffee if you haven't in a few minutes [Music] done um cool all right so let's go back to unreal um okay so in my voxel vagrant characters alembic folder i'll go import so i'm just right clicking and empty space here and go at the top of my menu i've got import to voxel fragrant and here is my t-rex id i'll open that all right more fun options so the very first one uh in the live stream i showed you um skeletal mesh import option so we'll just do that one again and then i'm going to do geometry cache so import type is a skeletal and it's set to merge meshes because i want it all my men i want the one animated skeletal asset i don't want each individual bone as a separate thing that i have to bring into the scene on its own that would suck um i'm leaving pretty much everything at default uh except for um turning on fine materials i want i want this import to hunt through my unreal project and look for a material that has the same name as the shading group that today that is in maya which is why we created the material first under conversion i'm going to change that to autodesk 3ds max that's going to make sure it's up the right way yeah it was almost a rude gesture sorry and under scale i'm going to set this to 10 and x negative 10 and y and 10 and said just so it comes in a little bit bigger than microscopic and i'll go import and this is going to take a little while so i'm going to turn on some music do there it is it has imported and check it it is coming our beautiful beautiful blue with all the material ids assigned to all the bajillion material id slots uh but it is does come in as a it's got a skeletal mesh it's got a it's got a skeleton we could create a physics asset for this um it's got a it's it's got your animation so for example what we could do it's too tiny uh if i scale that up um and i can in its details panel which is on the right hand side here i can change animation mode to use animation assets t-rex id animation if i hit if i go to simulate which is under my play menu um i've got another animation going on in here so it just goes but the cool thing about a skeleton um create i'm gonna have to go look this up i saw this done the other day really really uh creating a success asset off of a skeleton create animation pose asset but i'm gonna have to look that up before i try and do it in this video because i can't see that anywhere which kind of sucks all right so coming back to that one later because i totally want to uh cause this guy to uh i wanna simulate some physics and call this guy to die i think that would be really really funny um anyways let's delete him for now come on go away uh okay so that was our skeletal asset and i'm just going to go new folder and we're going to drop all those into skeletal and then we're going to import this as a geometry cache uh there's our t-rex id again and i just want to show you those options so um let's change our import type to geometry cache experimental um and we want to make sure that under geometry cage uh flattened tracks is turned on and that's going to what flat tracks does it takes all your material ids and it collapses them into one which is totally useful and what we want i'm scrolling down fine materials is on again we wanted to try and find the material we already created uh and it's got the same settings i had before which just to remind you is 3ds max with uh x set to ten y set two and negative ten and said set to ten again and we're going to go cool we'll hit import and then we go back to waiting [Music] ah it's finally done and if we bring that into our scene again it's so tiny so small i've got a little embigging that and hit simulate there he goes it's working our uh we've got a singular material id uh which is super great um it's uh just yes it's going to be hugely performative in a complex scene um it's just it is uh a cage so you don't have any of the if you don't have a physical asset you don't have a skeleton you don't have that stuff but yeah trade-offs so choose between and there you go that is how you bring your olympic into unreal with your material ids already assigned choosing between either skeletal with skeleton and lots of ids or geometry case no skeleton but a single id bye
Info
Channel: Strange Portraits
Views: 11,846
Rating: undefined out of 5
Keywords: epic, unreal, ue4, unrealengine, maya, alembic, cache, export
Id: kSFNGB4PAr8
Channel Id: undefined
Length: 20min 53sec (1253 seconds)
Published: Sun Dec 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.