we are currently starting animated series in Moho and we urgently need script which can render top groups from project separately. In our case, we need output from moho to be Background / middleground / foreground as png sequences. Best would be, that script will create folder with name of the shot - then render top groups, each in new folder with the name of the group.
use layer comps?! Moho 13.5 manual page 176. just create 3 layercomps - one for each of fg, mg, bg and export as you wish (e.g. png sequence) for input to whatever post process you want...
hayasidist wrote: ↑Tue Nov 23, 2021 1:41 pm
use layer comps?! Moho 13.5 manual page 176. just create 3 layercomps - one for each of fg, mg, bg and export as you wish (e.g. png sequence) for input to whatever post process you want...
We considered it, but in our opinion, script would be better - we will have around 300 unique shots in every episode (with unique structure - as i wrote, there can be in one shot for example 3 Fg / 1 Mg / 4 Bg in other just 1/1/1 and so on) and I'm afraid, this would be too complicated to do in every shot. That's why i need some simpler solution
kovis wrote: ↑Tue Nov 23, 2021 1:58 pm
we will have around 300 unique shots in every episode (with unique structure - as i wrote, there can be in one shot for example 3 Fg / 1 Mg / 4 Bg in other just 1/1/1 and so on) and I'm afraid, this would be too complicated to do in every shot. That's why i need some simpler solution
ok -- so do you want just one Fg output no matter how many "input" folders? or, as in your example above - if it's 3/1/4 do you want 3/1/4 png sequences?
Lukas wrote: ↑Tue Nov 23, 2021 8:42 pm
You could create a script that wipes all layercomps and creates new ones per top layer and then use a renderer that renders all layercomps.
which would be fine if the OP wanted one layercomp per top level group ...
but it isn't clear to me if the need is to have 3 output image sets (one FG, One MG, one BG) irrespective of the number of layers that go to make up each planned output set (= each comp set) ... and that's also pretty straightforward as long as there was a way to identify which set a layer belongs to (e.g. hierarchy position, tag, colour, name ...); then there's the question of actually initiating the render...
IMO, a straightforward challenge whatever the actual need, but still too many unknowns at this point to encourage me to reach for the proverbial coding pencil...
Lukas wrote: ↑Tue Nov 23, 2021 8:42 pm
You could create a script that wipes all layercomps and creates new ones per top layer and then use a renderer that renders all layercomps.
which would be fine if the OP wanted one layercomp per top level group ...
but it isn't clear to me if the need is to have 3 output image sets (one FG, One MG, one BG) irrespective of the number of layers that go to make up each planned output set (= each comp set) ... and that's also pretty straightforward as long as there was a way to identify which set a layer belongs to (e.g. hierarchy position, tag, colour, name ...); then there's the question of actually initiating the render...
IMO, a straightforward challenge whatever the actual need, but still too many unknowns at this point to encourage me to reach for the proverbial coding pencil...
sorry if i not making this clear enough, trying my best Well, simply said, i just need script, that will scan the layer panel and render each top group separately. Nothing else. Just hit the button, select where to save it and script will do the job. The 3 output image sequences was just example.
kovis wrote: ↑Wed Nov 24, 2021 7:47 am
sorry if i not making this clear enough, trying my best Well, simply said, i just need script, that will scan the layer panel and render each top group separately. Nothing else. Just hit the button, select where to save it and script will do the job. The 3 output image sequences was just example.
ok -- getting clearer ... top level GROUPs only or ALL top level layers - e.g. if you have a single vector layer not in a group at top level; or the audio layer as in the example
Just to be clear, wouldn't using Moho Exporter do what you need? You can set it up to break out the render passes based on your Layer Comp settings with a button click, and Moho will automatically save each layer comp to its own separate directory. For example...
1. Set up your layers comps, e.g., Fg, Mg, Bg., and then save your project.
2. Open Moho Exporter (Ctrl-B.) If the project has been saved it will load automatically.
3. Double-click the project and enable Render Layer Comp* (if it hasn't already been enabled by default,) and then set the output path in its render settings. Close the project's settings window.
4. Click Split Selected Item By Layer Comps. This breaks out the project into Layers, and each layer comp is automatically assigned a separate output folder with its layer comp name.
5. Click Start. This renders each layer to its own folder (e.g., projectName-Fg, -Mg, -Bg,) with the layer comp name appended to its filename (e.g., projectName-Fg_0001.png, projectName-Mg_0001.png, projectName-Bg_0001.png)
To save time, you should save the Moho Exporter Profile after clicking the Split button. This will save the settings up to this point (including the output folders) so you don't need to set it again for this project. When you need to render this project again, just load this profile file.
This is how I work on my personal projects. At work, we have a custom controller that automatically knows where to save the files on our network, but it still gets its info from the Layer Comps settings.
That said, there are improvements I wish to see in this workflow. For example, I still don't understand why the Project's preferred default output directory can't be embedded in the Project itself (i.e., in the Project Settings window.) Right now, the preferred output directory needs to be manually selected every time I wish to render, which unnecessarily increases the chances of rendering files to an incorrect directory. In a studio production where a team of artists may be working the same scene, this additional manual step can lead to mistakes and wasted time.
I hope this helps. It's probably not exactly what you need, but until Layer Comps and Moho Exporter gets a makeover, maybe this is close to it.
*Additionally, I suggest enabling Overwrite Existing Files as a default.
Last edited by Greenlaw on Wed Nov 24, 2021 1:07 pm, edited 5 times in total.
Oh, I see...you only want to consistently render specific layer comps. I get that; I often have extra layer comps I never wish to render like the 'work' layer comps I use as guides for drawing, rigging or animation; or the 'Master' layer comp that has all render layers active at the same time and hides the 'work' layers (I use this only for test render.)
To address this, I'd like to see an option added to Layer Comps, maybe a check box or grouping system, to tell Moho Exporter which layer comps to render and which to ignore.
Last edited by Greenlaw on Wed Nov 24, 2021 1:09 pm, edited 1 time in total.
Denis, I think it's your step 1 - setting up the layer comps in the first place - that the OP finds hard ... and for sure - once set up, just let the exporter rip - but probably invoked from a script using the Command Line Renderer.
kovis wrote: ↑Wed Nov 24, 2021 7:47 am
sorry if i not making this clear enough, trying my best Well, simply said, i just need script, that will scan the layer panel and render each top group separately. Nothing else. Just hit the button, select where to save it and script will do the job. The 3 output image sequences was just example.
ok -- getting clearer ... top level GROUPs only or ALL top level layers - e.g. if you have a single vector layer not in a group at top level; or the audio layer as in the example
Idk mate, i think i made it as clear as possible - in image example are 3 groups in layer panel and then there is another image example where is output - which is 3 separated folders with image sequences.
Please, understand my struggle, that there will be in this season maybe 10 episodes, each +-300 shot. Each shot is unique and i fear, that setting up layer comps will be totall killer (seems to me, that it can create mess real fast). These shots will be made by different animators and I really want the easiest possible solutions for them. That's why, as i wrote, few clicks script which automatically render top groups from file is better option for me.