Export Resizing for Skinned Meshes with Animations in Maya 2023?

Export Resizing for Skinned Meshes with Animations in Maya 2023?

billy916X7XK
Explorer Explorer
1,716 Views
5 Replies
Message 1 of 6

Export Resizing for Skinned Meshes with Animations in Maya 2023?

billy916X7XK
Explorer
Explorer

Okay, so first off, I'm new to Maya.
I'm learning Maya because I was looking for something with better FBX compatibility than Blender, but what I'm finding is troubling, so let me explain my situation.

As a developer, I often have to work with licensed resources, including models, animations, textures, etc.
Often what I find is that if animated resources were not animated in Blender then importing them into Blender is very messy, especially if they were not made by forcing +Y the way Blender does. The bones end up deformed and animations do not export correctly.

So because I'm specifically dealing with animated skinned meshes, I thought Maya is the logical place to go, especially since many of the modelers I've worked with have made the resources in Maya and have provided me with .mb files in addition to FBX files to work with.

Now, not every engine works the same way, so exporting resources often requires a bit of customization. A perfect example of this is the platform Roblox. In Roblox, the scale is often about 5% of the standard FBX scale, so it's pretty common that you have to resize models to around that percentage to size them appropriately.

It doesn't matter what engine you're in, not everyone is on the same scaling, so the idea of needing to re-scale a mesh is pretty much a given. This is where I have run into an issue.

I have read tutorials, searched the knowledge base, scoured YouTube videos, and tried all of them, and to date, a week into exploring Maya 2023 I have still yet to find a single viable way to scale a skinned animated mesh to 5%, although I would prefer to be able to adjust that to at least 1/100th of a percent since the measurements aren't exact.

I can export and change the units to 10%, 1%, .1%, .39***%, ect, which is completely ridiculous, but I can't just type in the % to scale it so the exported rig and animations match my needs?

Even Blender, a free open-source program does this and that program isn't even good with FBX files in reality.

Is this really the Achilles Heel of Maya, that it can't resize a skinned mesh to the needed scale?
I thought well this is a serious problem, certainly, there would be a plugin for this...
No, nothing, not paid or otherwise.

Nothing in the documentation, nothing anywhere, and I've tried the YouTube videos people have posted for older versions of Maya but none of them have worked so far.

Is this really a basic thing that Maya can't do or am I totally missing some simple solution somewhere?
If I could use Blender for what I'm working with, I would.
Is 3DS Max better for this?

How do I solve this problem with this software or should I be looking to use a different product altogether like CIN4D?

Note: Because of the way I'm doing this, even scaling an entire scene would do the trick just fine. That "appears" to be something easy to do in 3DS Max based on some internet searching, as well as in Cinema 4D, but once again, in Maya, it does not seem viable, unless, there is something I'm missing here as well?

0 Likes
1,717 Views
5 Replies
Replies (5)
Message 2 of 6

Kahylan
Advisor
Advisor

Hi!

 

The obvious thing you are missing here, is that in most cases you can just scale the animation in maya and then export it without rescaling. Instead of rescaling your entire scene when you export.

 

I've rigged in different softwares over the last few years (Maya, Blender, Cinema4D, take your pick), and all of them scale rigs just fine, if the rigs are made with that in mind. And if they don't allow scaling, because they aren't globalised correctly for example, there is a simple way to get them scalable before export.

 

You mentioned that you are exporting your animations into game engines, so you probably need to have all your joints in a single skeleton hierarchy anyways. Also most gameengines can't read IK solvers from Maya or Blender, so you will end up just exporting the skeleton and the mesh instead of the whole rig with all solvers and deformers.

 

If you need to scale your rig up or down before exporting, you can do this with 5 simple steps:

1) select all your joints

2) bake the animation onto the joints by using the Key -> Bake Simulation command

3) Delete everything in the rig except your joints and mesh

4) create a group above your skeleton

5) take the above your joints and scale it down and scale it down (if you need 5%, scale it to ScaleX 0.05,ScaleY 0.05,ScaleZ 0.05)

 

all but step 4 and 5 are things that you do anyway when you export into a game engine.

 

Joints and skinclusters scale pretty reliable in Maya (also in pretty much any other highend 3D software), what causes problems with scaling are things like IK setups, Squash and strech calculations, Ribbons, etc. Once you remove those elements from the equation, scaling your rig reliably should not be a problem.

 

If your joints are not in a single joint hierarchy, which is needed to do it this way, there are scripts that generate a single joint hierarchy from your rig for you.

 

Shopping for another software is not the solution here. If Maya and Blender don't satisfy your needs when it comes to handling animation, I've got bad news for you. Those are the two best Programs for this right now, C4D as well as 3DS Max are great for 3D visualisation but tend to get really slow when working with rigs and animation.

 

I hope it helps!

 

PS.: Something you should look into are Alembics. Alembic caches are a format that has replaced FBX in a lot of productions I worked in, they are easy to use, scaleable and retimable. If all the programs in your pipeline can handle Alembics, I would consider switching. But I've never done any dev work for Roblox, so I don't know if that is an option.

 

Message 3 of 6

billy916X7XK
Explorer
Explorer

billy916X7XK_0-1671935120961.png

@Kahylan Thank you for your answer. I will go over this and continue to try and probe ways to make this work, though I'll admit I'm not very good with Maya at all so I'm just learning where all the basic controls even are through this process.

Okay, so here's an example of what I'm working with.
There are many meshes, not just one making up the rig.
I found a few guides similar to what you said in your 1-5 steps already, none of them worked.
I have even tried using the trick of freezing, scaling the whole rig, cloning the rig, deleting the history, cloning all the meshes, copying all the weights, deleting the original rig, and exporting the new rig without the scale old scale data.

Particularly for Roblox, it does not accept IK or Alembic.

I did attempt to export the Alembic cache to export the entire Rig to Blender, but every time I did it the animations broke and I couldn't get them into Roblox functional at all.

As it stands now, the only way to import an animation into Roblox is to import the FBX with the animation in it. If I could scale on export would be perfect. If I scale to decimeters (0.1) I get close, everything is about twice as big as it should be.

I've heard both 3DS Max and Cin 4D have the ability to world scale, which would work if I could globally scale everything by 50% then convert to decimeters and scale that to 0.1

If I could have gotten the alembic to work exporting to Blender that would have been fine because Blender has the option to set the scale on export and you can just set it to 0.05 or whatever you want, but I can't get the rigs and animations to work in Blender.

I might try more to see if I can get them working in Blender with the alembic, but this seems like a ridiculous way to have to work around something as simple as scaling.

I can't directly import them in either because they are on Z-forward and Blender breaks them.
I mean literally, just the option like Blender to set the scale to a % instead of this strange unit conversion or to world scale everything and then export would both solve the problems.

I can actually import these rigs into Roblox perfectly as is and even re-scale them. The problem is that when I do this, Roblox doesn't yet have a way to scale animations so all of the animations don't work with the scaled rigs.

If you use any asset store, Unity, Unreal, or the non-engine specific ones like Artstation or Sketchfab or whatever, it's pretty common for everything to be game engine ready except for scaling, because that aspect they never really know what you're going to need.

It seems strange to me that this simple of a feature is this way in Maya and that it doesn't compensate for it with world scaling as an option. Like taking an already completed setup, you can't just scale and export as you can in Blender.

As it is now, I have the mb files for the rig and around 50 FBX animations made for that rig that I need to move over.
I made an mb file with all the animations imported into it, but I've yet to be able to find a viable way to get even a single animation to export with working scales.

When I scale them and export them, the FBX still retains the old scale for the animations, so the only success so far is getting them exported to 10% which works perfectly, but has no option to specify a % so I'm either 2x too big or 5x too small.

Note: The rig is somewhat complex in nature because it's designed to have interchangeable parts that attach to one rig. There are some handles on the rig, such as those for the left and right-hand attachment which are what I'm struggling most with. Those are the parts that are the hardest to scale, so I've gotten the rest of the animations to work correctly but those attachments are messed up in every one. Redoing just those alone in Roblox would be a daunting and unmanageable task. I've even tried writing resize scripts to scale that part of the animation but those parts don't come out right no matter what I do. They only resize as far as the export allows me to, everything after that becomes a mess.

Oh, I've also tried some tricks with grouping that I found as well. Those also did not work. It's more the animations that are the problem than the rig as I have a functioning rig already, I just don't have the right animation scaling.

Message 4 of 6

Kahylan
Advisor
Advisor

I see.

Yeah, its a bit of a weird system that you can't specify a numerical scale factor. This comes from the fact, that Maya wants to stay grounded in reality, it is mainly a VFX software so it uses SI Units in order to make things like matching camera distortion and physicsbased simulation as easy as possible.

 

But scaling whole scenes is something that isn't a priority on most productions, as they tend to work with a preset agreed upon scale. Which obviously is a problem when you work with licensed content. And it gets very tricky when the rig isn't scalable, which once again is something that isn't the case in most productions, since you got riggers that know how to do that.

 

If you want to, you can PM me a way to do download your .mb file (WeTransfer link, Google docs or similar) and I'll try to see if I can get your rig to correctly scale and give you a step by step guide on how to do it.

Message 5 of 6

billy916X7XK
Explorer
Explorer

Thank you, but I decided last night out of frustration to see if what it appeared to be on the internet was true. So I downloaded a trial of Cinema 4D to see if that program could be a possible solution to my problem.

It was amazingly easy, like the entire task took literally a few seconds.

From what I have learned, this is just not something I wish to deal with in Maya. I really do like making animations in Maya and I work with quite a number of MB files, so I'm uncertain as to whether or not I'm also going to keep Maya. I'm also going to look because it appears 3DS Max may work similarly to how Cinema 4D does in this regard.

It was literally this simple.

billy916X7XK_0-1671995375883.jpeg

 

0 Likes
Message 6 of 6

johnsmithlk02
Community Visitor
Community Visitor

It sounds like you're dealing with a pretty specific and frustrating issue in Maya, especially when it comes to scaling skinned animated meshes. While Maya is a powerful tool, it does have its quirks, and scaling rigged models can be tricky if you're not familiar with the workflow. Here are a few suggestions that might help:

  1. Use the Scale Tool with Caution: While scaling a skinned mesh directly can cause issues, you can try scaling the entire rig hierarchy. Select the root joint of your skeleton and scale it uniformly. This might help maintain the integrity of the animations while resizing the mesh.

  2. Adjust the Scene Scale: If scaling the entire scene would work for your needs, you can try changing the scene's scale settings. Go to Modify > Transformation Tools > Scale Tool and adjust the settings there. You can also experiment with the Scale Constraint tool to see if it helps.

  3. Export with FBX Presets: When exporting your FBX file, make sure to check the FBX export settings. There are options to scale the scene during export. You might need to tweak these settings to get the desired output.

  4. Scripting a Solution: If you're comfortable with scripting, you could write a simple Python script in Maya to scale your rigged models precisely. This would give you the flexibility to scale to exact percentages, like 5% or even 1/100th of a percent.

  5. Consider Plugins or Third-Party Tools: While you mentioned not finding a plugin, it might be worth checking out forums like Polycount or CGSociety. Sometimes, users share custom scripts or tools that could solve your problem. Alternatively, tools like Unreal Engine's Datasmith or Unity's FBX Exporter might offer more control over scaling during import/export.

  6. Blender as a Middleman: If Maya continues to be problematic, you could use Blender as an intermediary step. Import the FBX into Blender, scale it there, and then re-export it. While it’s an extra step, it might save you time in the long run.

  7. Explore 3DS Max or Cinema 4D: If this issue is a dealbreaker, it might be worth exploring other software like 3DS Max or Cinema 4D. Both have robust FBX support and might handle scaling rigged models more intuitively.

Lastly, if you're looking for more resources or tools to streamline your workflow, you might find Fluxus Executor developed by fluxusofficial's team helpful. It’s a versatile tool that can assist with various development tasks, especially when working with platforms like Roblox.

0 Likes