picture home | art | events | music | rack extensions | downloads | pixel blog

omino pixel blog

pixels, motion, and scripting
entries for category "after effects"
david van brink // Wed 2011.02.16 09:19 // {after effects}

AE & Python

I was going to provide another example or two of Python scripting, today, but was sidetracked by a little bit of historical research on Python in After Effects. The examples will wait a little longer…

Useful Things

Yes, indeed, everything old is new again. Just about the time I started using After Effects, I had heard of “Useful Things”, but didn’t really know what it was. Turns out it was… Python Scripting for After Effects! It appears to have been quite well-regarded in the AE community, too. Alas, for whatever reasons, that product seems to have faded, been reabsorbed in the various business permutations that are a fact of life.

Omino Python for After Effects, by coincidence and parallel evolution, seems to resemble that fine product in some aspiring ways.

Grant Munsey

Going back even a tiny bit further, to 2001, we find that Adobe computer scientist Grant Munsey created open source Python bindings for Photoshop and After Effects, as well!

Reading about him, he was a great proponent of open source development, and was a driving force for establishing http://opensource.adobe.com/.

He passed away in 2005; I did not know him. But reading about his long illness, I was touched by this part of his wife’s account:

We’ve been using the mouth stick. It’s a 16-inch rod with a rubber tip on one end and on the other end a U-shaped plastic thing he bites on. He can then trace patterns and point to letters on the letter board — very slowly. I asked him what UNIX command you’d use for getting regular expressions from a text file, and he spelled “GREP”.

And forgive me if I find in this a dark justification for the oft-maligned brevity of UNIX commands.

1 comments
Rich Young // Sun 2011.02.27 17:395:39 pm

I think Grant also did an early plug-in set, Cognicon TILT. Later sold to Digieffects, TILT was an 3D system that did 3D displacement and imported 3D models using Quickdraw 3D from Apple.

oh, i dont know. what do you think?


david van brink // Sun 2011.02.6 09:22 // {after effects}

AE: Omino Python

For immediate download: Omino Python Plug-in for After Effects.

This plug-in lets you write a script in Python and then run it on every frame. The script can do drawing, access other layers, and so forth. Because sometimes, you just need to write code to get the job done. Omino Python gives you a straightforward way to provide drawing code directly in your After Effects work flow.

This isn’t for everyone; but if you have a little bit of scripting experience, Omino Python should be very easy for you to pick up.

Mac OS X on AECS5 only, for now…

Here’s a little demo.

Here’s another youtube demo, too.

The download includes plenty of documentation, or you can read it right now.

I’ll be posting some tips and examples — there are so many possibilities opened up! — but to break the ice, here’s a simple Omino Python script to do some drawing.

The script in Python. I didn’t know Python before starting the project, but it’s a nice easy little language, and quite popular, so there’s plenty of resources to learn it. It’s not so different from JavaScript or anything else. No semicolons and no curly braces, though! Here it is:

import math
import random

def ompy_main(c):
    ctx = c.layer_out_context

    w = int(c.width)
    h = int(c.height)

    # draw a red circle...
    ctx.set_source_rgb(1,0,0)
    ctx.arc(w/2,h/2,100,0,2 * math.pi)
    ctx.fill()

    # effect parameter controls size
    size = c.floats[0]
    ctx.set_font_size(size)

    # draw a grid of random numbers, spaced by 30
    random.seed(c.frame) # start the random sequence
    for x in range(0,w,30):
        for y in range(0,h,30):
            # random color
            ctx.set_source_rgb(random.random(),random.random(),random.random())
            # random number
            n = str(random.randint(0,9))
            # draw it.
            ctx.move_to(x,y)
            ctx.show_text(n)

And here’s a screen shot showing the output:

Op scrnshot 6

Your script can access a collection of parameters — some floats, some colors, &c — and use them as needed. In this case, I just used one float parameter to control the size of the random numbers printed.

This is just the beginning! Read the doc for the full story. Try out the plug-in.

More to come!

8 comments
GCoda // Mon 2011.02.14 02:582:58 am

This is great.
How about integrate this with http://code.google.com/p/pybox2d. Is it theoretically posible ?

Tutorialz | Copy. Share. Enjoy. » Omino Python: Python Plug-in for After effects // Mon 2011.02.14 05:495:49 am

[…] Van Brink (@polyomino) released Omino Python, a free After Effects CS5 plug-in for Mac OS X only (for now) that embeds a Python interpreter: […]

Jonas Hummelstrand // Tue 2011.02.15 03:593:59 am

Way cool, David!

Tweets that mention David Van Brink brings Python back to AE. Awesome! Useful Things was a favorite. -- Topsy.com // Tue 2011.02.15 04:314:31 am

[…] This post was mentioned on Twitter by Jonas Hummelstrand and kripats, Dale Bradshaw. Dale Bradshaw said: David Van Brink brings Python back to AE. Awesome! Useful Things was a favorite. http://t.co/Gui2CLA […]

Omino Python: Python Plug-in for After Effects | Wizpress.com // Tue 2011.02.15 09:359:35 am

[…] Van Brink (@polyomino) released Omino Python, a free After Effects CS5 plug-in for Mac OS X only (for now) that embeds a Python interpreter: […]

Mylenium’s Blog » The Snake comes back! // Tue 2011.02.15 11:4511:45 am

[…] How do you know that you are "old" in the After Effects world? When you can remember pretty much every cool plug-in that there once was and whose demise you regret. One of those was Useful Things, a custom framework for building your own effects using Python. I’ve long been a sucker for parametrical/ generative graphics – anything from L-Systems to statistical visualization – and have long wished we could have something like Processing would make its way to After Effects to fill that gap, but it hasn’t happened. Luckily, things are beginning to look a bit better, as we are getting a new Python plug-in thanks to David van Brink. […]

Michael Delaney // Thu 2011.06.2 22:4510:45 pm

Wanting to try out the plugin. Its throwing this though.

“Could’nt find main entry point for omino_python.plugin

48 :: 72”

I’m on OSX 10.6 with AE 10.0.0.458

david van brink // Wed 2011.12.28 19:467:46 pm

A little bit late, I reply: Try the newest version, fresh today. I rejiggered the installer significantly, hopefully addressing exactly this kind of problem. But please ping me here or poly@omino.com, I want to help!

oh, i dont know. what do you think?


david van brink // Mon 2010.11.22 21:15 // {after effects}

(AE: expression trivia)

(The parentheses in the post title mean that this post is essentially parenthetical.)

Arggh. Developing Pixel Bender kernels and plug-ins, my test files kept behaving erratically. Expression indexes were to blame. Each time I added or removed a parameter, the numbers all shift.

effect_expr.png

So you see, first enabling the expression produces effect("my_effect")(8). But it depends on the exact order of the parameters!

But effect("my_effect")("param 9") depends on the name.

I think I like the second one better, because I’m pretty good about nailing down my parameter names, but more likely to move them around order-wise.

(See?)

oh, i dont know. what do you think?


david van brink // Sun 2010.06.27 22:41 // {after effects pixel bender}

AE: Omino Stamp, a Pixel Bender Filter

Early this month, we visited the San Jose Museum of Quilts and Textiles, featuring patterns and clothing by the Hawaiian designer Alfred Shaheen. Great stuff! Yeah, I have a closet full of Hawaiian shirts.

alfred_shaheen_print.jpg

(Show show goes til August 8, worth visiting. On the first Friday of the month, many of the galleries on First Street in San Jose, CA are open late, definitely a nice night out.)

Since I adore repetition, and halftoning, I got to wondering if I could recreate some of the patterns programmatically. The “Omino Stamper” filter runs in After Effects and attempts to do this.

download ==> omino_stamp.pbk, an After Effects filter.

The idea is pretty simple: draw a “stamp image” in a pattern which can be affected by the source image. It’s a little bit like a particle effect, but more mechanical.

Here’s the controls and few examples, which look nothing like Hawaiian shirts.

stamper_screenshot.png

A quick rundown:

  • The pattern- settings adjust the stamping grid
  • The stamp- settings adjust orientation and size of the stampimage image
  • The stampOverlaps setting controls how many nearby stamps are computed for each pixel; slows down the render a bit but is necessary for closely-spaced stamping. (If you see missing corners and such, increase this setting. (Those of you familiar with Pixel Bender will immediately apprehend why this is so. 🙂
  • The affectsStampSizeAmount, affectsStampColorAmount, and affectsStampRotationAmount settings control the halftoning features of the filter.

Here’s a basic stamp:

Next, we adjust the bricking a little, to make it less square-y:

And let the color of the underlying image affect the stamp color:

How about affect the rotation, instead of the color? Kinda wild:

Or back to basics, let the underlying image affect the stamping-size:

Here’s a festive little animation playing with the effect a bit, and does include a Tiki god or two.

download ==> omino_stamp.pbk, an After Effects filter.

Enjoy!

2 comments
omino stamp for after effects, a pixel bender filter // Tue 2010.06.29 11:0411:04 am

[…] 29, 2010 Omino continues with their onlsaught of Pixel Bender Plugins for Adobe After Effects, with a new one – Omino Stamp. Omino Stamp is a Pixel Bender Filter that was inspired in part by “Hawaiian Shirt” […]

Happy 1st Linky Friday Everybody! « Kevin Goldsmith // Fri 2010.07.30 17:395:39 pm

[…] posted another Pixel Bender filter oriented towards After Effects users on his Omino Pixel Blog: Omino Stamp a Pixel Bender Filter. This is really useful for creating some nice patterned fills. Pattern example from Omino […]

oh, i dont know. what do you think?



Deprecated: Function the_block_template_skip_link is deprecated since version 6.4.0! Use wp_enqueue_block_template_skip_link() instead. in /home/polyomino/omino.com/pixelblog/wp-includes/functions.php on line 6114

0.0340s
(c) 2003-2023 omino.com / contact poly@omino.com