Exporting for Game
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 10
- Joined: Tue Oct 29, 2024 3:19 pm
Exporting for Game
Hi everyone,
I'm using Moho to create animations for my game, which is frame-by-frame, and it's been working great for that purpose. However, I've been running into some challenges with Moho's export system, which feels a bit lacking. Every time I need to export an animation, I have to manually choose the folder and rename the file, which can be time-consuming.
To organize my animations, I save each animation as an action, such as Idle, Run, Attack, etc. But every time I need to export, I have to remember the frame range for each animation, drag the action onto the timeline, set the range, open the export dialog, select the folder, and rename the file, all of that for just one animation.
Is there any faster and more efficient way to do this? Maybe a script or a pipeline that can automate some of these steps? Any help or advice would be greatly appreciated!
Thanks in advance!
I'm using Moho to create animations for my game, which is frame-by-frame, and it's been working great for that purpose. However, I've been running into some challenges with Moho's export system, which feels a bit lacking. Every time I need to export an animation, I have to manually choose the folder and rename the file, which can be time-consuming.
To organize my animations, I save each animation as an action, such as Idle, Run, Attack, etc. But every time I need to export, I have to remember the frame range for each animation, drag the action onto the timeline, set the range, open the export dialog, select the folder, and rename the file, all of that for just one animation.
Is there any faster and more efficient way to do this? Maybe a script or a pipeline that can automate some of these steps? Any help or advice would be greatly appreciated!
Thanks in advance!
Re: Exporting for Game
If there is one thing I dislike about Moho (
), it's how it uses the projects' file name for its output, and it doesn't remember a preferred output directory. We really should be able to insert a preferred output name and path in the Project Settings or Moho Exporter. At this point, I have a workable system for exporting a lot of layers from Moho, but I'm basically working around unnecessary obstacles.
Anyway, if you have variations of animations in a single project file that you wish to output, try this...
1. Define them as 'passes' in Layer Comps. For example, make passes called '00-Idle', '01-Run, '02-Attack', and so on.
2. To render, press Ctrl-B. This loads the project into Moho Exporter, which is Moho's batch renderer.
3. If other projects are loaded because they happened to be open, remove them.
4. Set your output directory. Do this by R-clicking over the entry and selecting Change Destination > Choose Folder
5. Click the Split button. This breaks out your render passes to different sub-directories, and uses the names you set in Layer Comps as folder names and file extensions.
6. This part is important: Before you click Render, save the Profile. I save this file in the same output directory for easy finding.
7. Now click the Render button.
Moho will render all of the variations to unique folders, with unique file names. If you need to render this again because of revisions, just reload the Profile, and Moho will re-use the same output settings you defined previously. This can be a HUGE timesaver when you have complicated output requirements.
Tip: I normally do the above for outputting render passes for compositing, and before I save my profile, I will reduce the frame range for certain passes to 1 frame where it makes sense, like backgrounds or static props. This setting will be used when I reload the Profile, which can be another BIG timesaver.
IMO, rendering from Moho really shouldn't be this complicated, but this is the system I've used successfully for hundreds of project files for compositing in personal projects (some of which you can see on our Little Green Dog channel.) If the above isn't clear, I'm working on a tutorial about how I use Layer Comps and Moho Exporter for our work.
(At DreamWorks, we had programmers who created a streamlined batch renderer for Moho that automated the steps I described above, and it always remembered the layer names and preferred output directory. I wish I had access to that at home.)

Anyway, if you have variations of animations in a single project file that you wish to output, try this...
1. Define them as 'passes' in Layer Comps. For example, make passes called '00-Idle', '01-Run, '02-Attack', and so on.
2. To render, press Ctrl-B. This loads the project into Moho Exporter, which is Moho's batch renderer.
3. If other projects are loaded because they happened to be open, remove them.
4. Set your output directory. Do this by R-clicking over the entry and selecting Change Destination > Choose Folder
5. Click the Split button. This breaks out your render passes to different sub-directories, and uses the names you set in Layer Comps as folder names and file extensions.
6. This part is important: Before you click Render, save the Profile. I save this file in the same output directory for easy finding.
7. Now click the Render button.
Moho will render all of the variations to unique folders, with unique file names. If you need to render this again because of revisions, just reload the Profile, and Moho will re-use the same output settings you defined previously. This can be a HUGE timesaver when you have complicated output requirements.
Tip: I normally do the above for outputting render passes for compositing, and before I save my profile, I will reduce the frame range for certain passes to 1 frame where it makes sense, like backgrounds or static props. This setting will be used when I reload the Profile, which can be another BIG timesaver.
IMO, rendering from Moho really shouldn't be this complicated, but this is the system I've used successfully for hundreds of project files for compositing in personal projects (some of which you can see on our Little Green Dog channel.) If the above isn't clear, I'm working on a tutorial about how I use Layer Comps and Moho Exporter for our work.
(At DreamWorks, we had programmers who created a streamlined batch renderer for Moho that automated the steps I described above, and it always remembered the layer names and preferred output directory. I wish I had access to that at home.)

Last edited by Greenlaw on Thu Feb 06, 2025 6:11 am, edited 6 times in total.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
Re: Exporting for Game
Oh, here's another idea:
It sounds as if you have performances in different frame ranges that you wish to output as separate files. To output these, do what I described above with Layer Comps, and in Moho Exporter, you can define the frame ranges for each file that was Split out as 'layers'. Each layer comps should be different only by name and frame range, not content. In other words, they all render from the same layers, just different frame ranges.
IMPORTANT: Remember to set the output directory BEFORE clicking Split and to save a Profile before clicking Render. If you don't do this, you will need to repeat these steps every time.
I've never used Layer Comps/Moho Exporter quite this way, but it should totally work.
Hope this helps.

It sounds as if you have performances in different frame ranges that you wish to output as separate files. To output these, do what I described above with Layer Comps, and in Moho Exporter, you can define the frame ranges for each file that was Split out as 'layers'. Each layer comps should be different only by name and frame range, not content. In other words, they all render from the same layers, just different frame ranges.
IMPORTANT: Remember to set the output directory BEFORE clicking Split and to save a Profile before clicking Render. If you don't do this, you will need to repeat these steps every time.
I've never used Layer Comps/Moho Exporter quite this way, but it should totally work.
Hope this helps.

NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
Re: Exporting for Game
This is definitely something you should script. You will need a custom .lua script for your pipeline. It is very doable. Since you're making a game, I assume there's coders involved, so check out: https://mohoscripting.com/ and looking at the code from this script might be useful: https://mohoscripts.com/script/LK_Render
Also, I can recommend https://www.codeandweb.com/texturepacker if you're making sprites in Moho for use in a game engine.
Code: Select all
* Loop through the actions
* Clear main timeline
* Paste action in timeline
* Export image sequence to folder with name of the action etc. ~/Project/Sprites/Character/Walk/Walk_00001.png
* Finish
-
- Posts: 10
- Joined: Tue Oct 29, 2024 3:19 pm
Re: Exporting for Game
When you say "passes" in Layer Comps, what exactly should I do? Should I duplicate the skeleton for each action and add the animation to each skeleton, treating them as separate layers?
If that's the case, what happens if I need to edit the character's appearance? Would I have to update it in all of them?
One of the issues is that each animation would have a different length. For example, the "Idle" animation could be between 12 to 25 frames, while the "Run" could be between 11 to 15 frames.
One method I tried was to create everything in one sequence, but it became extremely messy and confusing. It was hard to tell where each animation started and ended. That's why I thought it would be more convenient to save the states as actions.
For me, the main challenge is organizing multiple animations into separate blocks without making it a chaotic mess.
If I could define a range for each action and export the animation directly within the action's timeline, named after the action, that would be perfect.
Lukas, I tried writing a script, but I'm not familiar with the language and I'm having a lot of trouble getting anything to work.
EDIT: Ok, I tested the workflow you explained to me Greenlaw, it seems to have worked, and it looks like the most efficient way I’ve seen. However, my only doubt and concern is that in order to have all these layer comps separated, do I really need to duplicate my character multiple times to have each skeleton with a different animation? And if I need to make any visual changes to it or adjust the rig, do I have to duplicate everything again?
If that's the case, what happens if I need to edit the character's appearance? Would I have to update it in all of them?
One of the issues is that each animation would have a different length. For example, the "Idle" animation could be between 12 to 25 frames, while the "Run" could be between 11 to 15 frames.
One method I tried was to create everything in one sequence, but it became extremely messy and confusing. It was hard to tell where each animation started and ended. That's why I thought it would be more convenient to save the states as actions.
For me, the main challenge is organizing multiple animations into separate blocks without making it a chaotic mess.
If I could define a range for each action and export the animation directly within the action's timeline, named after the action, that would be perfect.
Lukas, I tried writing a script, but I'm not familiar with the language and I'm having a lot of trouble getting anything to work.
EDIT: Ok, I tested the workflow you explained to me Greenlaw, it seems to have worked, and it looks like the most efficient way I’ve seen. However, my only doubt and concern is that in order to have all these layer comps separated, do I really need to duplicate my character multiple times to have each skeleton with a different animation? And if I need to make any visual changes to it or adjust the rig, do I have to duplicate everything again?
Last edited by michelvictor on Thu Feb 06, 2025 6:26 pm, edited 2 times in total.
Re: Exporting for Game
If the game animations for a character are performed in sequence on the timeline, you could use my second suggestion and make multiple Layer Comps for the entire project. This will tell Moho Exporter to give each rendered output a different name (idle, fight, whatever...) Then, before you render, set the frame ranges for each layer comp to render only the range for each animation. Save a Profile before you render so this setup can be recalled each time you need to make a change. Since all the performances are in sequence, there is no need to duplicate the character or rig.
Tip: use timeline markers to note the beginnings and end of each animation. This can assist you when setting the ranges in Moho Exporter.
When you want to make a costume change or other variation, duplicate the Project file and make the changes. No need to duplicate a rig at all. You'll likely want to rename the Layer Comp layers to reflect the costume change and need to make a new Profile for this project so Moho renders the newly named Layer Comps to a different output directory. This is pretty minor, though, and you only need to do this once. (Well, until the next costume change, anyway.)
If the frame numbers need to be renumbered so each rendered sequence begins with 0000 or 0001, you can use a renaming utility. When renaming a lot of image sequences and variations of image sequences, I like to use Advanced Renamer for its batch processing capability. There are other utilities that can do this as well.
Tip: use timeline markers to note the beginnings and end of each animation. This can assist you when setting the ranges in Moho Exporter.
When you want to make a costume change or other variation, duplicate the Project file and make the changes. No need to duplicate a rig at all. You'll likely want to rename the Layer Comp layers to reflect the costume change and need to make a new Profile for this project so Moho renders the newly named Layer Comps to a different output directory. This is pretty minor, though, and you only need to do this once. (Well, until the next costume change, anyway.)
If the frame numbers need to be renumbered so each rendered sequence begins with 0000 or 0001, you can use a renaming utility. When renaming a lot of image sequences and variations of image sequences, I like to use Advanced Renamer for its batch processing capability. There are other utilities that can do this as well.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
-
- Posts: 10
- Joined: Tue Oct 29, 2024 3:19 pm
Re: Exporting for Game
I found other new problems. Since I like to test animations and transitions, I usually add new animations and states if needed, like Idle to Run, for example.
I noticed that if I create a new Layer Comp, the saved Profile changes the layer names because apparently it saves them by order and not by name, which is very strange. So, the configuration I saved in the Profile becomes useless if I create a new layer comp in the project.
Honestly, I’ve never seen such a faulty export system before.
I noticed that if I create a new Layer Comp, the saved Profile changes the layer names because apparently it saves them by order and not by name, which is very strange. So, the configuration I saved in the Profile becomes useless if I create a new layer comp in the project.
Honestly, I’ve never seen such a faulty export system before.
Re: Exporting for Game
I solve this by adding a numerical prefix to my Layer Comp names.
For example, I use 00_Master, for my master, where most of the layers are visible. Then I use 01_XXXX, 02_XXXX, and so on, for each 'standalone' layer I will be exporting. Using this naming convention ensures the layers stay in order by name.
For example, I use 00_Master, for my master, where most of the layers are visible. Then I use 01_XXXX, 02_XXXX, and so on, for each 'standalone' layer I will be exporting. Using this naming convention ensures the layers stay in order by name.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
-
- Posts: 10
- Joined: Tue Oct 29, 2024 3:19 pm
Re: Exporting for Game
Well, I think this solves it. It's not anywhere near a good pipeline, but it's better than what I was doing until now. Thanks for the help! I hope they considerably improve their export system in the future.
Re: Exporting for Game
Sure!
Yes, I agree...Layer Comps and Moho Exporter are very useful to me, and I'm SO grateful to have them, but they also feel like unfinished features. I don't think the improvements I need would be difficult to implement, so it is probably a matter of available time and resources.
If I were smarter, I'd make my own exporter. But I'm not. Derp.
Maybe in Moho 15? Guys? Please?

Yes, I agree...Layer Comps and Moho Exporter are very useful to me, and I'm SO grateful to have them, but they also feel like unfinished features. I don't think the improvements I need would be difficult to implement, so it is probably a matter of available time and resources.
If I were smarter, I'd make my own exporter. But I'm not. Derp.
Maybe in Moho 15? Guys? Please?


NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
Re: Exporting for Game
One more tip: I dislike how Moho Exporter uses the Project filename as its base output name because I use version numbering in my project filenames. This means Moho never correctly overwrites my footage when I save a new project file version. This flaw has created file update problems for me and other animators and compositors I've worked with for years. Having the option to set a fixed output filename and output directory path in the Project Settings so Moho ALWAYS correctly overwrites its renders would solve this problem.
So, for now, I keep all my work-in-progress project files in a Work or WIP folder and save an unnumbered version outside this folder for final rendering. This ensures that Moho correctly overwrites the layer passes for compositing. It's not an ideal system, but it helps minimize my output errors.
Hope this helps.
So, for now, I keep all my work-in-progress project files in a Work or WIP folder and save an unnumbered version outside this folder for final rendering. This ensures that Moho correctly overwrites the layer passes for compositing. It's not an ideal system, but it helps minimize my output errors.
Hope this helps.
Last edited by Greenlaw on Thu Feb 06, 2025 9:17 pm, edited 2 times in total.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
Re: Exporting for Game
Ooo! Thanks for the tip, Lukas. I'm not developing games, but it's a topic I think about often, and I'm always interested in new tools.Lukas wrote: ↑Thu Feb 06, 2025 9:57 am Also, I can recommend https://www.codeandweb.com/texturepacker if you're making sprites in Moho for use in a game engine.

NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
-
- Posts: 10
- Joined: Tue Oct 29, 2024 3:19 pm
Re: Exporting for Game
One solution would be having a perfect mirror of the rig, not the timeline. This would allow any changes made to the main rig to automatically update in all the duplicated versions. So, if I needed to adjust bone influences or edit a mesh with a smart bone during the project, it would reflect across all duplicates. Alternatively, having access to multiple timelines for the same skeleton and being able to export each timeline individually in a batch would also work.
In Spine 2D, which is specifically made for games, you use the same rig to create as many animations as you want, and each animation has its own timeline. This way, when you export, everything is already organized by animation.
In Spine 2D, which is specifically made for games, you use the same rig to create as many animations as you want, and each animation has its own timeline. This way, when you export, everything is already organized by animation.
Re: Exporting for Game
In Moho, you can import a 'master rig' as a referenced project. This way, changes you make to the master rig project are optionally available to projects using this rig. This works for rig, artwork, and animation changes (you can choose what gets updated.)michelvictor wrote: ↑Thu Feb 06, 2025 9:16 pm In Spine 2D, which is specifically made for games, you use the same rig to create as many animations as you want, and each animation has its own timeline. This way, when you export, everything is already organized by animation.
At this time, there are some issues with using references in Moho, so I'd use this feature with caution. Basically, it has a nasty habit of keyframing every channel. There's more info about this elsewhere in this forum, including suggestions for minimizing the problem. LM is aware of the issue and is looking into it.
When I was working on Boss Baby: Back In Business, I used a setup similar to Cartoon Saloon's, where I had a 'Work-version' of the rig that was worked on and updated by the rigger (usually me,) and this was referenced into a 'Master' file which was then referenced by the animators (sometimes me.) This system worked well because it meant the rigs could be worked on and updated without disrupting the animations that were already in progress. When the 'Master' file was updated, the individual shot files would show this, and the animator had the option to apply the update. (FYI, sometimes the updates could break existing animation, which is why this was optional. I told our team to test it with a copy first, and if it broke their animation, they should break the reference connection and continue with the previous version for that shot.)
Also, references can only update items and properties that are keyframeable, so properties like Bone Strength changes will not carry over. It's not a bug, just something to be aware of.
Referencing project files might be worth experimenting with if you have the time. Personally, I'm waiting for a fix for the channels issue before I go back to using References in Moho.
NEW! Visit our Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | Greenlaw's Demo Reel Channel
-
- Posts: 10
- Joined: Tue Oct 29, 2024 3:19 pm
Re: Exporting for Game
Yes, I have already tried using references, but it’s not intuitive, and it quickly becomes chaotic. The perfect solution would be to have multiple timelines with different names, allowing me to export each timeline separately. This is somewhat similar to what Actions do, where they create individual timelines, but unfortunately, there isn’t an option to export these actions.