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:
p =""; st = thisLayer.index+1;
for (i=st; i<=thisComp.numLayers; i++)
{
   if ((time>thisComp.layer(i).inPoint) && (time<thisComp.layer(i).outPoint)) {p = ((p==="") ? p+i : p+", "+i)}
}
"comp: "+thisComp.name+"\nlayers: "+p

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:
p =""; st = thisLayer.index+1;
for (i=st; i<=thisComp.numLayers; i++)
{
   if ((time>thisComp.layer(i).inPoint) && (time<thisComp.layer(i).outPoint)) {p = ((p==="") ? p+thisComp.layer(i).name : p+", "+thisComp.layer(i).name)}
}
"comp: "+thisComp.name+"\nlayers: "+p
Enjoy!

May 9, 2019

Why you should try Brave browser right now

After just 1 hr test I switched to this browser on ALL of my devices, good bye Chrome.
What it's got

- Opensource, crossplatform
- Chromium based - very familiar experience
- Full chrome extensions support
- Seamless transition, just import everything from a Chrome profile and you do not need to re-login everywhere
- Builtin ads and trackers blocker (adjustable)
- Builtin Tor browser and Tor incognito mode
- Builtin Web-torrent
- Faster and lighter than Chrome
- Decentralized cloud bookmark sync between all your devices, no accounts
- Builtin BAT blockchain (Brave rewards) to support resources of your choice
- For me personally Brave solved a few issues with touch devices

Just amazing, give it a try right now!

Mar 14, 2019

Adding "Select Parent" command to Cinema 4D

1. Run the script manager, menu Script ➩ Script Manager
2. Choose Python (for C4D below R20)
3. Start new script, menu File ➩ New File
4. Paste the code into the code field
import c4d

def main():

    doc.StartUndo()
    s = doc.GetSelection()
    for x in s:
        try:
            p = x.GetUp()
            doc.AddUndo(c4d.UNDOTYPE_BITS, x)
            x.DelBit(c4d.BIT_ACTIVE)
            doc.AddUndo(c4d.UNDOTYPE_BITS, p)
            p.SetBit(c4d.BIT_ACTIVE)
        except:
            pass
    c4d.EventAdd()
    doc.EndUndo()
    
if __name__=='__main__':
    main()
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.

Oct 5, 2018

TIME TO PAY ATTENTION TO YOUR CYBER SECURITY...

... or just 3 apps to keep you out of troubles.

Start with a simple thing - a password manager right NOW. It will take some time and effort but it will keep you safe of potential troubles/damage/losses. Those risks are constantly growing, you have to be prepared! 

You MUST keep your passwords very COMPLEX (12 - 20 random symbols in length) and UNIQUE for each single service (any one can be hacked and leak your data). You can't just keep those in your head or on a paper. You need a manager with just one MASTER password you have to remember (no paper!)
I've been using password managers for years now. So my experience is at your service in this post.



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.