After Effects output output templates

Hi,
In templates.yml under After Effect / Shot section, there are two entries for output:

aftereffects_shot_render_pub_mono:
    definition: '@sequence_root/renders/{Shot}/2d/v{version}/{Shot}.{name}.{afx.comp}.v{version}.tif'
    root_name: 'secondary'
# The following template uses {afx.mov.ext} this is a special key, that will be only there
# in the beta to support different extensions on mac and windows, while using the same
# output module (Lossless with Alpha)
aftereffects_shot_render_movie:
    definition: '@shot_root/review/{Shot}_{name}_{afx.comp}_v{version}.{afx.mov.ext}'
    root_name: 'secondary'

How do we use these output entries in After Effects? (f.e render to aftereffects_shots_render_pub_mono path)

2 Likes

Hi Shervin

By default, those templates are used by the publish app, when deciding where to copy a rendered image sequence or a rendered mov file too:

Best
Phil

1 Like

I see. Let me walk this through, just to make sure I understand the process correctly: I need to have a rendered TIF sequence ready which then I can publish using AFX publish tool. The template will copy the rendered sequence into the correct path (per template)? Does it also rename them accordingly? eg in the case of aftereffects_shot_render_pub_mono, do the published images will be renamed to {Shot}.{name}.{afx.comp}.v{version}.tif ?

I thought of the AFX template similar to how NukeWriteNode templates work, so that the render and publish would be handled by AFX.

Suggestion - It would be ideal if AFX integration would handle the renders and publish them according to template. In this idea scenario, in AFX > Render Queue, user can select the template as one of the AFX output option. At the time of publish, Render is done (or offloaded to a Deadline process), and then Shotgun would publish both AFX and rendered images.

1 Like

Yes, you’ve understood that correctly. The integration doesn’t control where the renders get output too, only where they get copied too on publish, and they should take the name given in the template.

I agree it would be nice if the integration handled where the renders got output too, like with Nuke. I’m not familiar with script in After Effects, so I’m not sure how easy that would be. With Nuke and Houdini, we replace/build on top of the node which handles the output, but in After Effects, it’s not really a node as such. I wonder if it could work in a way more similar to Nuke Studio, or create a Shotgun Render action?

I’ll pop in an idea to our road map > submit an idea on your behalf.
Best
Phil

2 Likes

Hi Philip,
Thank you for your answer. I have 2 questions:
1- Follow up to our last email, I still can’t get the renders take the name given in the templates. Here is my templates.yml:

aftereffects_shot_work:
    definition: '@shot_root/work/{current_user_name}/aftereffects/{Shot}.[{name}.]{Step}.v{version}.aep'
    root_name: 'primary'
aftereffects_shot_publish:
    definition: '@shot_root/publish/aftereffects/{Shot}.[{name}.]{Step}.v{version}.aep'
    root_name: 'primary'
aftereffects_shot_render_pub_mono:
    definition: '@sequence_root/renders/{Shot}/2d/v{version}/{Shot}_v{version}.{SEQ}.tif'
    root_name: 'secondary'
aftereffects_shot_render_movie:
    definition: '@sequence_root/renders/{Shot}/2d/v{version}/{Shot}_comp_v{version}.{afx.mov.ext}'
    root_name: 'secondary'

and tk-multi-publish2.yml > After Effects shot_step:

# shot_step
settings.tk-multi-publish2.aftereffects.shot_step:
  collector: "{self}/collector.py:{engine}/tk-multi-publish2/basic/collector.py"
  collector_settings:
      Work Template: aftereffects_shot_work
  publish_plugins:
  - name: Publish to Shotgun
    hook: "{self}/publish_file.py"
    settings: {}
  - name: Begin file versioning
    hook: "{engine}/tk-multi-publish2/basic/start_version_control.py"
    settings: {}
  - name: Render Render Queue Items
    hook: "{self}/publish_file.py:{engine}/tk-multi-publish2/basic/make_rendering.py"
    settings: {}
  - name: Copy Renderings to Publish Location
    hook: "{self}/publish_file.py:{engine}/tk-multi-publish2/basic/copy_rendering.py"
    settings:
        Publish Sequence Template: aftereffects_shot_render_pub_mono
        Publish Movie Template: aftereffects_shot_render_movie
        Default Sequence Output Module: TIFF Sequence with Alpha
        Default Movie Output Module: Lossless with Alpha
  - name: Publish Renderings to Shotgun
    hook: "{self}/publish_file.py:{engine}/tk-multi-publish2/basic/publish_rendering.py"
    settings: {}
  - name: Publish to Shotgun
    hook: "{self}/publish_file.py:{engine}/tk-multi-publish2/basic/publish_document.py"
    settings:
        Publish Template: aftereffects_shot_publish
  - name: Upload for review
    hook: "{self}/upload_version.py:{engine}/tk-multi-publish2/basic/upload_version.py"
    settings:
        Movie Output Module: Lossless with Alpha
  help_url: *help_url
  location: "@apps.tk-multi-publish2.location"

And the output from SG Publish Validate:

2- Today I noticed that if I add a render item to AE Render Queue, the SG Publish would recognize the render Queue Item and adds a Render Item, Copy Renders, Publish, and Upload (refer to image-2). Also SG Publish actually renders the render queue and would publish to SG which is fantastic! I’m not sure if this feature was already a part of SG integration in AE. Is this feature the result of the idea you submitted? Thank you guys
The only problem is that the SG Publish doesn’t set the name and path of the copied files using the name given in the template:

2 Likes

If you have a render in your render queue that has generated renders, the publish app will detect it, copy any frames to the publish location as described by the template, and then if you choose to upload for review, it will create a new render queue item to create a quicktime, which it will run and then upload as the playable media to Shotgun.

Looking at your log, it seems to say that it couldn’t validate the template, so it just published the renders in place rather than copying them. Can you confirm if it did actually copy the renders to the publish location on disk despite this message?
We have a bug logged internally where it states that it hasn’t copied them, despite it actually doing so.
I’m sorry for the confusion here. :slightly_frowning_face:

1 Like

Thank you,
Following your instructions, I realized I didn’t have the correct render in the render queue before publish. After fixing that, the renders got copied to the correct path, given in templates.yml.

One more question and a request for AE engine:

Q: After renders are copied to the correct path and published to SG, does SG keep a link to the source renders? In other words, can we delete the original renders to save diskspace?

Request: I know we talked about this earlier, but it would be great if SG publish could render into the correct path. This means that the user doesn’t need to take the extra steps of rendering and publishing. Also there will be only one copy of renders on disk rendered out by SG publish.

-cheers,

2 Likes

The Publish process will create a Version entity and a PublishedFile entity. The PublishedFile will contain a link to the copied image sequence in the publish folder. The Version will have an uploaded media file and a path to the copied image sequence in the publish folder.

So you should be fine to delete the source renders, but obviously I’d advise double-checking that, that is the behaviour you are getting as well :slight_smile: .

1 Like