Yeah for real. thank you for not starting the video with 30 sec-1min of "hey guys what's up...." self promotion garbage with no timecodes. And you are right: this should be documented somewhere.
Wow this is almost exactly what I was looking for. Trying out different pipelines for a short movie but having a clean workflow with Unreal at the end isn't easy at all. So thanks for your tutorial!
You're welcome! I am currently developing some pipeline tools for animated productions between Maya and Unreal. I would like to have some initial tools out early next year. Still working out how to efficiently make them scalable to work with a variety of workflows.
Thank you so much, Brendan! Your method works fine for me in UE5. I did a couple of tests and updates, found out those existing models with materials must assign an unused material, then re-assign again by the "Face material" method. Cheers~!!!
Thanks for the info. I have yet to try it in UE5, so it's good to know it works there too. Also I am working on a script which will convert your materials to face sets so you won't have to manually convert them yourself. I will post a video of that when I'm done. It's kinda on the back burner as I have some other projects on the go at the moment
YOU SAVED ME LITERALLY!!! THANK YOU!!!!!!!!! I was trying to find a way to make this work for last 10 months, even made a workaround with Houdini.. nevermind.. THANKS AGAIN! (instant like and sub)
Haha, was it? I feel like I had to give background on what doesn't work rather than just getting to the point and saying what does. That was a conscious decision though. You're welcome though, glad you found the info you needed.
Thanks! If and when I come across something that I feel hasn't been covered or isn't easily accessible/discoverable I will post it. If you have any suggestions I am open to ideas.
tried this but some times Material wouldn't apply 'face sets' on my Mesh. For example, I have this shirt and shorts, only the shirt would have the face sets and the shorts have no face sets, both of the mesh have the shading group already, (selected faces and applying the materials) but when importing to unreal only the shirt have material and the short doesn't even have a material slots, meaning the material in maya wont apply its face sets on the mesh.
Sometimes to force a face set you need to apply a different material first, it's weird like that. I usually apply the basic Lambert to everything and then apply my material face sets.
There is ONE info missing in this video. I just had the problem where sometimes, the materials simply applied with Face Selection does not work and are simply not existing in the Alembic. For this to work 100%, the material as to be created with the face selected ! In Maya 1- Select all your faces 2- Right Click -> Assign New Material -> Lambert Because, for some reasons, If you apply your lambert on the face but the lambert was already existing and assigned to one or multiple object before, the Face Set is not created and the Alembic will warn you with empty Face Sets. (dunno if I'm clear enough)
Yes, you are correct. If you are trying to apply the same material that your object already has, as a face set. You must first apply a different material to the object, or it won't work.
uhhh, yes and no, there is a create materials checkbox on the import options however this won't create a complex materials. I haven't fully tested what it will bring in properly. I have some ideas in mind to have materials be recreated in unreal from maya, but it is a pretty complex problem and if you are using proprietary nodes in Maya from an offline renderer like Renderman that will likely cause some issues as well.
Hey! I think the issue might be normal calculation, there is a checkbox in the alembic importer to recompute normals, normally this is off but if by chance you turned it on and had a high hard edge angle threshold the model will import with hard edges. If this doesn't work you can try to force it to have one smoothing group and/or recompute normals with a low hard edge angle threshold. Hope this helps! If you need more help please email me at brendanorourkedesigns@gmail.com and I'll do my best to help you more .
Thanks for doing this, but I have a question. If I'm attempting this with a more complex character, do I need to create the materials in UE4 first? This could be time consuming if I need to plug in my diffuse, normals, roughness maps, etc. in UE to re-create every material there first. I'm a bit new to this process so I may be confused. To be clear, I have this beautiful female character created in Maya, that I would really love to get into UE4 without re-creating the wheel when I import it.
unfortunately if you need your character imported as an alembic, the materials can't really be imported, there is an option in unreal to create materials, however that will just create materials based on the face sets of the imported file. If you want to look into the FBX file format, which I feel is more pertinent to your situation, Unreal can read some basic properties of materials from Maya which you can read about here (docs.unrealengine.com/en-US/WorkingWithContent/Importing/FBX/Materials/index.html). However it is very likely that you will need to create all your materials again in Unreal. But unless you have a lot of materials this shouldn't take too long. I will also say that for real-time development, it is generally good practice to keep your material count as low as possible. I would say a character shouldn't have more than 2 or 3 materials, and if you can get away with 1, all the better. I hope this helps you out, good luck on your project.
@@Rourker Wow, thanks so much for the detailed reply. The thing about this model (purchased on Turbosquid) is that it has xGen hair, blendshapes, and some other nice things when it lives in Maya, but UE4 seems to strip everything away when I import. The hair turns into cards, and all the materials are gone. Like I said, I'm pretty new to this so I'm sure these are easy problems for a pro, but beyond my capabilities.
ahh, okay, yeah. Unless a model is made with the intention of being imported into a game engine, a lot of the Maya centric stuff like xgen isn't going to be imported properly. There is a hair and fur system in Unreal ( I myself have yet to get into it, so I know very little about it) but I would imagine that those two systems do not play nice together. Blendshapes do work in Unreal though. It seems like the model you have is meant for an offline renderer like VRay or Arnold, or maybe even perhaps Mental Ray. This means that it is intended to be rendered into images within software like Maya and aren't intended to be brought into a real-time renderer like Unreal. Maya comes with Arnold as its default renderer so even getting efficient and good looking renders within Maya might be difficult if the materials that came with the model are made to work with a different renderer altogether. It's kind of a rabbit hole, but I would expect the workflow to get easier in the next few years as Unreal is now being used more and more in film production.
@@Rourker That’s great, I’ll take a look. For now, the early access release of the Metahumans Creator seems to have solved most of my problems. I’m just abandoning my Maya character and rebuilding her with MH in Unreal. Thanks for following up though. A good Maya to UE pipeline for characters is still useful.
Amazing video, just what i needed. Im having another issue, when importing a character animation alembic into unreal , theres is some kind of motion blur that is coming , any idea how can i remove that?
Glad I could help. As for the motion blur that can be turned off in a few places, if you want it off project wide, I think you can turn it off in your project settings. However, if it is just for one scene you can check your cameras settings and if that doesn't work it may be on a post process volume in your scene. Hope that helps.
Hi, when I export alembic having objects inside of a group ithe animation will not play in UE. When I combine it to one mesh it works. I also set the option world space. Do you have an advice for me?
Hmm, I'm not sure what could be the problem, the world space flag should be enough. I'll do some tests and get back to you, but it's hard to say without looking at the scene.
@@DGFA- So I gave it a test. It seems to work fine for me. I would make sure and double check that you are selecting only the meshes that you want to export and not the group node as well.
This was very usefull thank you !! Actually I was hoping these can work for including visible/invisible keys inside the alembic file after a looooong search in web.... But seems that Unreal not likes visible/invisible keys which has been used inside an alembic file and losing these mesh"s UV or material information. Still combining them..
I have gotten alembic visibility work in unreal. Make sure your exporting with the visibility flag turned on. I will double check about the UV information as I was just checking visibility in my earlier tests, but I think it should be good.
@@Rourker thx for answering. Actually yes, visibility/unvisibility is working on the objects/meshes but these object's Materials are coming into Unreal still only one (combined) begore. With your method I can see now two meshes (for example) and two material which is belong to them. But when I give a texture to first material, it is covering also to second mesh's texture. Second material there but seems not functioning. Just because in the animation first mesh is disappearing and second mesh appearing ( because I keyed several times in maya visible channel and exported like this as alembic) And this cause to losing UVs in unreal I guess. (How difficult to describe something as text for me 😅)
Can you then replace the animations ? for example, you bring a character in FBX workflow, setup the materials and stuff, then you can just load all the animation into that actor. But in alembic workflow, every time you bring in a diffrent animation you have to assing all the materials again. cus you can just load a animations into a alembic actor ?
Hi! Do you know how to stream alembic from the disk without importing it in the project please? Also thanks for the tutorial! I still have crash when I import the alembic in UE5. Does it work in UE5 by the way?
I don't think there is a way to stream alembic data without importing it into unreal. As for this working in UE5, I can confirm that it does, perhaps you are not using Ogawa for your export? This will ensure that the alembic file is as efficient as possible.
@@JJOTA1975 nothing unfortunately, the alembic face material will only use the sg node name as the material name into unreal. If you remake that material in unreal with those textures and name it the same as sg node it will apply the proper material and textures in unreal though. But you do have to remake it.
@@Rourker Thanks for your answer. My problem is that i made an animation and i wanted to import to Unreal, but if i try with fbx, i have problems with the blendshapes, and if i try with alembic, i have a lot of materials with textures that i have to link everytime that import an animation. I don,t know what to do, honestly
Hmm, perhaps there is some non-manifold geometry in your mesh. That's the only thing I can think of that might do this that wouldn't throw an error when importing.
It is possible, you will probably have to rework all your materials in Unreal and convert them to PBR but I don't see why not. If you are using alembic for your characters, be aware that it is a vertex cache so file sizes can get pretty big.
@@Rourker thanks for this thing dude Yes I will resize them but I should workout on covering textures to pbrs and re creating my camera animations lighting and environment setup as an Intensive gamer, I hope unreal will give some realism but not like games like some animation software renders
You have ngons in your mesh. Alembic doesn't like that. A quick fix would be to triangulate your mesh. If you want to fix this without triangulation you will need to go into your mesh cleanup option menu and select faces with more than 4 sides. This will select all the problem faces and you will need to connect some vertices or cut the faces so only 3 or 4 side polygons are left.
I had to create script to push materials per face. It just did not work this way. Also had same problem other way around ;/ . No problem with multiple materials but for single it goes by transform by default 2023 maya. Works on selection Will apply it only on ones that has material per transform and 1 material only: object=cmds.ls(sl=True) for i in object: if cmds.objectType(i) == "transform": shape=cmds.listRelatives(i,s=True)[0] else: shape=i if cmds.objectType(shape) == "mesh": matPerShapeSG=cmds.listConnections( shape, et=True, t="shadingEngine") if len(matPerShapeSG)==1: transform=cmds.listRelatives(shape,p=True)[0] Faces=cmds.filterExpand(f"{transform}.f[*]", sm=34) print(matPerShapeSG[0]) cmds.sets (transform ,e=True, forceElement='initialShadingGroup') cmds.sets(Faces, e=True, forceElement=matPerShapeSG[0]) Also if U want to apply materials that are in Unreal U need naming on Shading Groups not materials in Maya to match unreal.
Nice work! I'll test this when I can. I also have a script that converts to face materials, supports multiple materials per mesh and renames the shader group with a specified prefix or suffix added to the material name. I can't release it because I wrote it for an animation studio, but I will do re-write and release it soon.
i love these kind of fundamental tutorials, no lens flares, no fancy glowy things..
Yeah for real. thank you for not starting the video with 30 sec-1min of "hey guys what's up...." self promotion garbage with no timecodes. And you are right: this should be documented somewhere.
Wow this is almost exactly what I was looking for. Trying out different pipelines for a short movie but having a clean workflow with Unreal at the end isn't easy at all. So thanks for your tutorial!
You're welcome! I am currently developing some pipeline tools for animated productions between Maya and Unreal. I would like to have some initial tools out early next year. Still working out how to efficiently make them scalable to work with a variety of workflows.
@@Rourker would be nice if you have any updates on tools/workflows as i'm using maya/unreal for short film animations as well!
@@littlecurrybread updates coming soon!
This was incredibly helpful! So weird how there's such little info on this online. Thank you
Glad I could be of some help
Thank you so much, Brendan! Your method works fine for me in UE5. I did a couple of tests and updates, found out those existing models with materials must assign an unused material, then re-assign again by the "Face material" method. Cheers~!!!
Thanks for the info. I have yet to try it in UE5, so it's good to know it works there too. Also I am working on a script which will convert your materials to face sets so you won't have to manually convert them yourself. I will post a video of that when I'm done. It's kinda on the back burner as I have some other projects on the go at the moment
YOU SAVED ME LITERALLY!!! THANK YOU!!!!!!!!! I was trying to find a way to make this work for last 10 months, even made a workaround with Houdini.. nevermind.. THANKS AGAIN! (instant like and sub)
Thanks for the like and sub, I don't generally upload very often, so sorry about that. But I'm glad I could help.
Great video!! Short on mumbo jumbo and straight to the point!! Thank you!
Haha, was it? I feel like I had to give background on what doesn't work rather than just getting to the point and saying what does. That was a conscious decision though.
You're welcome though, glad you found the info you needed.
Love your video sir. Just what I was looking for. Looking forward for more.
Thanks, glad it helped. I will post more of these one off videos here but I do plan on starting a more educational channel for 3D in general.
Very very useful. Well presented. Thanks and look forward to more UE stuff.
Thanks! If and when I come across something that I feel hasn't been covered or isn't easily accessible/discoverable I will post it. If you have any suggestions I am open to ideas.
Man ! i was struggeling with this for weeks ! you save me ! Thanks a lot !
You're welcome, glad it helped.
that's really helpful, was searching from long time
Thanks! whats the equivalent in 3dsmax?
Sorry, I don't have 3DS Max installed to try it out. I would guess it would be something similar though.
You are my life saver!! Thank you!!!
You're welcome!
Wow I'm so grateful for the knowledge. Thank you
No problem, glad I could help.
tried this but some times Material wouldn't apply 'face sets' on my Mesh. For example, I have this shirt and shorts, only the shirt would have the face sets and the shorts have no face sets, both of the mesh have the shading group already, (selected faces and applying the materials) but when importing to unreal only the shirt have material and the short doesn't even have a material slots, meaning the material in maya wont apply its face sets on the mesh.
Sometimes to force a face set you need to apply a different material first, it's weird like that. I usually apply the basic Lambert to everything and then apply my material face sets.
@@Rourker thanks! will try your method!
Have you ever got multiple uv sets to import using this cache method? I think it may be bugged. Seems to only work on a static mesh.
I don't think I've tried. When I get around to it, I can give it a look and see what I find out.
非常感谢您的视频,这对我来说很有帮助,感谢
Genius. Thanks for sharing
Standing on shoulders my friend, but thanks!
@@Rourker Don't we all :P
Great video man, thanks for taking the time to make it.
Thank you!
This was a huge help. Thanks Brendan!
You're welcome, glad it helped
There is ONE info missing in this video. I just had the problem where sometimes, the materials simply applied with Face Selection does not work and are simply not existing in the Alembic. For this to work 100%, the material as to be created with the face selected !
In Maya
1- Select all your faces
2- Right Click -> Assign New Material -> Lambert
Because, for some reasons, If you apply your lambert on the face but the lambert was already existing and assigned to one or multiple object before, the Face Set is not created and the Alembic will warn you with empty Face Sets.
(dunno if I'm clear enough)
Yes, you are correct. If you are trying to apply the same material that your object already has, as a face set. You must first apply a different material to the object, or it won't work.
@@Rourker aaah xD just lost 2 days on this sh** xD
@@WiDOC sorry, it should have been something I mentioned. Thanks for bringing it up for those that are having the same issue.
is it possbile to import alembic directly with materials on? so if i have a complex material in maya i dont have to redo it from scratch in unreal
uhhh, yes and no, there is a create materials checkbox on the import options however this won't create a complex materials. I haven't fully tested what it will bring in properly. I have some ideas in mind to have materials be recreated in unreal from maya, but it is a pretty complex problem and if you are using proprietary nodes in Maya from an offline renderer like Renderman that will likely cause some issues as well.
thanks for this. this was bugging me for a while now :)
You're welcome
Invaluable help, thank you.
You're very welcome. Glad it helped
Hi there , in Maya The polygons are smooth but when we import it in unreal engine it’s not smooth do you know what’s the problem?
Hey! I think the issue might be normal calculation, there is a checkbox in the alembic importer to recompute normals, normally this is off but if by chance you turned it on and had a high hard edge angle threshold the model will import with hard edges. If this doesn't work you can try to force it to have one smoothing group and/or recompute normals with a low hard edge angle threshold.
Hope this helps!
If you need more help please email me at brendanorourkedesigns@gmail.com and I'll do my best to help you more .
Thanks for doing this, but I have a question. If I'm attempting this with a more complex character, do I need to create the materials in UE4 first? This could be time consuming if I need to plug in my diffuse, normals, roughness maps, etc. in UE to re-create every material there first. I'm a bit new to this process so I may be confused. To be clear, I have this beautiful female character created in Maya, that I would really love to get into UE4 without re-creating the wheel when I import it.
unfortunately if you need your character imported as an alembic, the materials can't really be imported, there is an option in unreal to create materials, however that will just create materials based on the face sets of the imported file.
If you want to look into the FBX file format, which I feel is more pertinent to your situation, Unreal can read some basic properties of materials from Maya which you can read about here (docs.unrealengine.com/en-US/WorkingWithContent/Importing/FBX/Materials/index.html). However it is very likely that you will need to create all your materials again in Unreal. But unless you have a lot of materials this shouldn't take too long.
I will also say that for real-time development, it is generally good practice to keep your material count as low as possible. I would say a character shouldn't have more than 2 or 3 materials, and if you can get away with 1, all the better.
I hope this helps you out, good luck on your project.
@@Rourker Wow, thanks so much for the detailed reply. The thing about this model (purchased on Turbosquid) is that it has xGen hair, blendshapes, and some other nice things when it lives in Maya, but UE4 seems to strip everything away when I import. The hair turns into cards, and all the materials are gone. Like I said, I'm pretty new to this so I'm sure these are easy problems for a pro, but beyond my capabilities.
ahh, okay, yeah. Unless a model is made with the intention of being imported into a game engine, a lot of the Maya centric stuff like xgen isn't going to be imported properly. There is a hair and fur system in Unreal ( I myself have yet to get into it, so I know very little about it) but I would imagine that those two systems do not play nice together. Blendshapes do work in Unreal though.
It seems like the model you have is meant for an offline renderer like VRay or Arnold, or maybe even perhaps Mental Ray. This means that it is intended to be rendered into images within software like Maya and aren't intended to be brought into a real-time renderer like Unreal. Maya comes with Arnold as its default renderer so even getting efficient and good looking renders within Maya might be difficult if the materials that came with the model are made to work with a different renderer altogether.
It's kind of a rabbit hole, but I would expect the workflow to get easier in the next few years as Unreal is now being used more and more in film production.
Hey randomly came across this video. Someone has written a script to export xGen hair into unreal
ua-cam.com/video/Cs2noOayppk/v-deo.html
@@Rourker That’s great, I’ll take a look. For now, the early access release of the Metahumans Creator seems to have solved most of my problems. I’m just abandoning my Maya character and rebuilding her with MH in Unreal. Thanks for following up though. A good Maya to UE pipeline for characters is still useful.
Thank you Brendan! You save my Life!
You're very welcome!!!
Amazing video, just what i needed. Im having another issue, when importing a character animation alembic into unreal , theres is some kind of motion blur that is coming , any idea how can i remove that?
Glad I could help.
As for the motion blur that can be turned off in a few places, if you want it off project wide, I think you can turn it off in your project settings. However, if it is just for one scene you can check your cameras settings and if that doesn't work it may be on a post process volume in your scene. Hope that helps.
Hi, when I export alembic having objects inside of a group ithe animation will not play in UE. When I combine it to one mesh it works. I also set the option world space. Do you have an advice for me?
Hmm, I'm not sure what could be the problem, the world space flag should be enough. I'll do some tests and get back to you, but it's hard to say without looking at the scene.
@@Rourker thank you!
@@Rourker thank you! I could link the abc file if you head to test my one.
@@DGFA- So I gave it a test. It seems to work fine for me. I would make sure and double check that you are selecting only the meshes that you want to export and not the group node as well.
@@Rourker It works!!! Thank you very very much!
This was very usefull thank you !! Actually I was hoping these can work for including visible/invisible keys inside the alembic file after a looooong search in web.... But seems that Unreal not likes visible/invisible keys which has been used inside an alembic file and losing these mesh"s UV or material information. Still combining them..
I have gotten alembic visibility work in unreal. Make sure your exporting with the visibility flag turned on. I will double check about the UV information as I was just checking visibility in my earlier tests, but I think it should be good.
@@Rourker thx for answering. Actually yes, visibility/unvisibility is working on the objects/meshes but these object's Materials are coming into Unreal still only one (combined) begore. With your method I can see now two meshes (for example) and two material which is belong to them. But when I give a texture to first material, it is covering also to second mesh's texture. Second material there but seems not functioning. Just because in the animation first mesh is disappearing and second mesh appearing ( because I keyed several times in maya visible channel and exported like this as alembic) And this cause to losing UVs in unreal I guess. (How difficult to describe something as text for me 😅)
@@yalcin9290 I understand, I will look into it when I get a chance.
Can you then replace the animations ? for example, you bring a character in FBX workflow, setup the materials and stuff, then you can just load all the animation into that actor. But in alembic workflow, every time you bring in a diffrent animation you have to assing all the materials again. cus you can just load a animations into a alembic actor ?
yes, there is a similar function to this. Look up geometry cache tracks.
That's helps a lot ! Thank you
You're very welcome!
Very nice explanation. Thanks
Hi!
Do you know how to stream alembic from the disk without importing it in the project please? Also thanks for the tutorial! I still have crash when I import the alembic in UE5. Does it work in UE5 by the way?
I don't think there is a way to stream alembic data without importing it into unreal. As for this working in UE5, I can confirm that it does, perhaps you are not using Ogawa for your export? This will ensure that the alembic file is as efficient as possible.
And what would it happened if i had textures linked to the material in maya?
@@JJOTA1975 nothing unfortunately, the alembic face material will only use the sg node name as the material name into unreal.
If you remake that material in unreal with those textures and name it the same as sg node it will apply the proper material and textures in unreal though. But you do have to remake it.
@@Rourker Thanks for your answer. My problem is that i made an animation and i wanted to import to Unreal, but if i try with fbx, i have problems with the blendshapes, and if i try with alembic, i have a lot of materials with textures that i have to link everytime that import an animation. I don,t know what to do, honestly
@@JJOTA1975 yeah, this video goes through how to make sure your materials apply to your alembic imports automatically.
@@Rourker Thank you so much
Flatten tracks messes with my material ID's on each frame :/
Hmm, what do you mean? Are your materials changing every frame?
If so are you possible using animated booleans in your animations?
My .abc file crashes the engine all together strangely. It freezes it.
Hmm, perhaps there is some non-manifold geometry in your mesh. That's the only thing I can think of that might do this that wouldn't throw an error when importing.
@@Rourker ill check it, pretty sure there isnt, but you never know. I got another geo working excellently.
You are my God!!
Haha, thanks, I think.
I can't thank you enough
You're welcome!
man that was I am looking for today I finally I exp/imp the objects separately 😓
You are a scholar and a gentleman my good sir thank you so much :,) T^T i been saved
Haha, thank you! Glad it helped!
What about textures?
@@albertcallejoamat7837 yup, you will need to have the textures applied to the materials in the engine.
Thanks AMAZING HELP
You're welcome
Hi,Thanks for your work !! How big a file can I import
Not sure what the limit is, but I've done 5 GB files with no issues.
@@Rourker Thanks !I will try too
@@Rourker Hi can UE4 support vertex color with Alembic ?
@@Mulai-1997 I think it can you would just need to make sure that the right flag is turned on in the export, color sets I think
Thank you sir!!
You're welcome!
Can we render our maya scenes in Unreal cause it has realtime rendering and my project will took over an year to render out there 😂
It is possible, you will probably have to rework all your materials in Unreal and convert them to PBR but I don't see why not. If you are using alembic for your characters, be aware that it is a vertex cache so file sizes can get pretty big.
@@Rourker thanks for this thing dude Yes I will resize them but I should workout on covering textures to pbrs and re creating my camera animations lighting and environment setup as an Intensive gamer, I hope unreal will give some realism but not like games like some animation software renders
Thank you
Glad it helped
Thank you!
You're welcome!
error: expected triangles or quads
You have ngons in your mesh. Alembic doesn't like that. A quick fix would be to triangulate your mesh.
If you want to fix this without triangulation you will need to go into your mesh cleanup option menu and select faces with more than 4 sides. This will select all the problem faces and you will need to connect some vertices or cut the faces so only 3 or 4 side polygons are left.
@@Rourker Thanks for the tutorial. and your reply solved the problem
@@NeroForte_ you're very welcome, happy to help
Thanks!
You're welcome
👍
Thanks!
I had to create script to push materials per face. It just did not work this way. Also had same problem other way around ;/ . No problem with multiple materials but for single it goes by transform by default 2023 maya. Works on selection Will apply it only on ones that has material per transform and 1 material only:
object=cmds.ls(sl=True)
for i in object:
if cmds.objectType(i) == "transform":
shape=cmds.listRelatives(i,s=True)[0]
else:
shape=i
if cmds.objectType(shape) == "mesh":
matPerShapeSG=cmds.listConnections( shape, et=True, t="shadingEngine")
if len(matPerShapeSG)==1:
transform=cmds.listRelatives(shape,p=True)[0]
Faces=cmds.filterExpand(f"{transform}.f[*]", sm=34)
print(matPerShapeSG[0])
cmds.sets (transform ,e=True, forceElement='initialShadingGroup')
cmds.sets(Faces, e=True, forceElement=matPerShapeSG[0])
Also if U want to apply materials that are in Unreal U need naming on Shading Groups not materials in Maya to match unreal.
Nice work! I'll test this when I can.
I also have a script that converts to face materials, supports multiple materials per mesh and renames the shader group with a specified prefix or suffix added to the material name.
I can't release it because I wrote it for an animation studio, but I will do re-write and release it soon.
This is great!! Thank you 🙏🏽
No problem!