Aug 5, 2019

After Effects script to queue/render selected layers (with handles)

This script queues/renders all selected layers
It gives the layer names to the corresponding outupts
You can set tExtent value (in seconds) to extend the spans (before and after the layer in and out)
Remember to keep your layer names unique to avoid renaming the render queue items, cause AE won't let you render.


Jul 27, 2019

AE script to create comp markers corresponding to the selected layers

This little thing will create markers corresponding to all the layers of your selection. There's tExtent variable that adds some extra space on both sides. It also names the markers with the corresponding Layer's name.

AE script to auto queue/render areas covered by comp markers

Made this new script quickly for myself. This thing queues all the segments of the selected comp covered by all composition markers and gives them names of the corresponding marker comment. Do not forget to set some length to your markers, the script takes exactly those fragments.
There're a few variables you can change sPath - sets your output path, sRStem - render settings template name, sOMtem - output module template name.
Uncomment the render command app.project.renderQueue.render() to auto start the render. Change the path and render settings accordingly.
Make sure your markers have unique names otherwise you'll get error message on render attempt and will have to rename your output files manually to fix it.

Jun 10, 2019

A few words on email notifications in your workflow


I recently took time to set up my UPS notifications to myself through email. I couldn't stop just there and now my UPS, my system, my renders etc, they all send me notifications to my email. This is really neat thing to have.

You will need a way to access you transmitting email account through simple smtp (not all services offer simple smtp access) or you can (what I did) set up a local smtp server on your machine, there's a nice and free one called hMail Server (you'll need your own domain or dynamic dns service for it). The most powerful thing is that you can set up emails to be sent for literally everything happening with your system, cause there's a way to send custom messages right from windows PowerShell script.

It can be done in just one command line but I use this simple extended (more human readable) script:

$EmailTo = "mail@gmail.com"
$EmailFrom = "me@example.com"
$Subject = "topic"
$Body = "Hi"
$SMTPServer = "mail.example.com"
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body)
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.EnableSsl = $false $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("me@example.com", "smtp password"); $SMTPClient.Send($SMTPMessage)

You save it as a simple text file, change the extension to .ps1 and use the command like

Call “E:\mydocs\sendemail.ps1”

to send the message to yourself. You can make plenty of them and add to windows Task Scheduler for each system event you want to be aware of.

If you interested I can make more extended tutorial for setting up your hMail server and configuring your domain’s DNS for it. Or you just DuckDuckGo for it, there’s already plenty of info online.

May 21, 2019

My SendTo_FFmpeg scripts, the big update

Updated my SendTo_FFmpeg scripts today.

It's getting much better:

  • A few new presets
  • Now all of the scripts (except external audio and mux) support multiple file selection.
  • Global settings for all batches in sendtoffmpeg_settings.cmd file (includes path to FFmpeg, verbosity level and end pause, descriptive names option in the next commit)
Just a reminder. SendTo_FFmpeg is a set of windows batches for effortless and free video transcoding. It's a set of tools I develop mainly for myself and it saves me tons of time every day. To use it, go to SendTo_FFmpeg scripts github page. Read the description and click "Clone or download" button.

Add current layer(s) info to your After Effects renders

Sometimes you need to include current layer(s) information to your renders, so they could be identified by a viewer or yourself or just for debugging purposes. Here's how.

1. Create an empty text layer
2. Unfold its properties to Text -> Source Text
3. Click its stopwatch while pressing Alt (it enables the expression for the Source Text)
4. Paste this expression:
So your layer should look like this: 




5. You're done. Adjust the text layer's size, font, color and position to your preferences as usual. This expression creates text with your composition name and current layer(s) numbers. If you do not want it to be included in the actual render, use Layer -> Guide Layer option

Or if there's more than one layer active at current time:


This expression takes in account all the layers below itself, so to include all of comp layers make this text layer the topmost.
The expression can be slow if you have some huge amount of layers in your comp.

It's also very easy to get the layers names instead of their numbers. Here's the version for it:
Enjoy!

Mar 14, 2019

Adding "Select Parent" command to Cinema 4D

1. Run the script manager, menu Script ➩ Script Manager (Extensions ➩ Script manager in R21)
2. Choose Python (for C4D below R20)
3. Start new script, menu File ➩ New File
4. Paste the code into the code field
as shown on the picture
5. You can render (current viewport) or load the icon for your script using File ➩ Render or File ➩ Load Icon
6. Save your new script File ➩ Save the script
7. Push the Shortcut button on the bottom right, assign your own key
8. Save your C4D config

You're done

Jan 13, 2019

Nudging a layer by a fraction of frame


When working with audio in After Effects I often find it difficult to sync the sound with a desired precision because all layers are snapped to frame length. But it's possible using AE scripting. You can save this as a separate script or (like me) use it with ft-Toolbar.
var comp = app.project.activeItem;
var lr = comp.selectedLayers[0];
if (comp.selectedLayers.length > 0) {
    var frl = comp.frameDuration;
    app.beginUndoGroup("Layer Nudge");
    lr.startTime += frl/4;
    app.endUndoGroup();
} else alert("Select a layer");
This code will nudge your selected layer by 1/4 of a frame length forward.
If you use ft-Toolbar (or similar extension) put the previous code as a main Javascript function. And for the modified (Ctrl +Click for instance) use the copy of it with a change of the sign in the line:
    lr.startTime -= frl/4;
It nudges the layer into the opposite direction. Or if you need a different precision, just change the divider /4.

Happy aftereffecting :)

Oct 24, 2018

Moved my tools to Github

I moved my set of SendTo_FFmpeg batches to a Github repoSo if you have issues, ideas, request, you can post them there.
There's also new AEExprTool I develop for myself. It's After Effects script for adding/removing error handling code to AE expressions in bulk. It's already a huge time saver for me. Would love to have some feedback cause I plan to make it a reliable full featured tool one day.

Aug 27, 2018

C4D, Redshift, Relighting and the Normals

Recently met the task of relighting in post and had a range of troubles trying to make it in After Effects. I do not recommend anyone doing it in AE :).
The free Normality plugin is barely compatible with the modern CC versions and produces crazy burnt highlight values and dirty edges (at least that was my experience of using it with AE CC2017). There's a better and payed alternative like Pixel Cloud now although dealing with all the required passes is not an easy task for starters.
Oh, the main reason for this post was actually just leaving a memo for any one who cares including myself. It's about C4D's standard renderers' normal pass specs that I've managed to match during the work/tests. Since I am a dedicated Redshift user I was able to identify that C4D's normal pass is a Camera space normals of unsigned values of 0 .. 1. Redshift by default operates on signed -1..1 values. So to get the equal normal pass from the Redshift you need something like this

With the RS State node set to Camera transform space.