We looked at something completely different in our VFX class today – I hadn’t realised that coding could also be done in After Effects, which is something that really interests me. It’s not quite like any coding language I’ve seen before, but it does have some familiarity. In Adobe’s own words:
An expression is a little piece of software – much like a script – that evaluates to a single value for a single layer property at a specific point in time. Whereas scripts tell an application to do something, an expression says that a property is something.
They’re actually quite easy to apply in After Effects, although it looks like writing them would take some studying. Overall, the only thing that needs to be done to add in the code is to ALT-left mouse click on the little clock for the object you want to add the expression to.
We started with something very simple: a ball bouncing in front of a pink background. By adding the provided files to our composition (which we had to change the settings for to 720p 25fps), and then adding a gradient to that, we could change the scale to add a sort of wobble to the background.
By ALT-clicking on the clock, then deleting the text that was already there, we could add in the simple line for the expression: wiggle(8,30).
I tried two different GIF captures and they just didn’t do the effect justice… hopefully Vimeo will work better!
The steps are simple but the effect is quite neat. I could see this being used for lighting, such as a candle flickering in a window. The first number of the expression determines how many times it will wiggle each second (so the lower it is, the slower the motion, or the higher it is, the faster the motion). The second number determines the random percentage variation in the size. So since we set the original size to 150%, the wiggle should move through from 120% up to 180%.
After that, we could add our ball to the composition. Peter provided two different sets of code, one for making the ball bounce (so changing its position through code) and the other for its squash/stretch as it hits the ground (which will be applied to the scale transform).
On the left is the code for the position, while on the right is the code for the scaling. The familiarities are apparent in that they use if/else statements, declare their variables at the top, and use a lot of maths to achieve what would otherwise have to be done through the use of keyframes.
In the above screenshot, the two first pieces of code can be seen in the timeline, while the position and scale numbers are in red. This code is also editable to fit the situation; the gravity can be changed to be higher or lower, the ball’s “squishiness” can be changed, even the floor can be altered via the expressions. The one thing I did notice was that, if you changed a variable in one of the expressions, you needed to make sure its counterpart in the other expression matched. Otherwise, I was getting the ball squashing in the middle of its bounce when I change the floor location, rather than when the ball actually was hitting the ground.
Overall, I’m interesting in learning more about expressions like these. Apparently there are loads of sources online for learning more about expressions in After Effects – I think I’ll do a couple more experiments during the holiday break to learn a little more. Adding a new sort of coding knowledge to my repertoire couldn’t hurt, after all!
We were also asked to check out Woodroffe’s work if we had some time – I thought I’d recognised the name and he has an extremely varied/large body of work, ranging from illustrations to copper etchings, bronze statues to musical sleeve art. A majority of his worked is based in sci-fi/fantasy themes, although it looks like it sometimes depended on the project and who he could have been collaborating with.
What I found exceptionally interesting was that, while my husband and I were in Gruyeres, Switzerland, we saw a couple of his sculptures installed at the castle, as well as some of his art there that was on permanent display.
These two sculptures are Le Bouclier de Mars (The Shield of Mars) and Le Bouclier de Vénus (The Shield of Venus). I thought they were both beautiful, hence why we took the pictures, and they’re right on display in the main courtyard of the castle for all the visitors to see. At the time, I didn’t know who the artist was, but now I find it very satisfying to know I got to see some of his work first hand.
I also discovered that he illustrated a book for one of my favourite authors, Piers Anthony:
The story is about a prehistoric rhinoceros who is genetically brought back to life in the future and it seems like the illustrations were all done by Woodroffe. I’ve not personally read it, but now I feel somewhat compelled to go out an find it if I can – unfortunately, a book from the over 25 years ago isn’t always the easiest to find, but I’ll see.
Overall, I really do like his art style and a lot of the things he made. His artwork is very far-flung fantasy, but it’s extremely eye-catching and i can see why he was well-respected for his talent during his lifetime. I’m also very happy to see that his installations are still around for the public to see and that his ability to capture worlds that don’t exist in real life is very valued even after his passing.