ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Particles in synthesia

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
alexander nilsson
Particles in synthesia
on Nov 8, 2018 at 3:24:09 pm

I've been trying to achieve this effect :






I've got my synthesia file, but i can't seem to figure out how to do it. The youtube creator said himself that it was made with AE. I'm still really fresh in After effects, so I could need some step by step guidance, like for dummies... ☺

Thanks in advance!


Return to posts index

Cassius Marques
Re: Particles in synthesia
on Nov 8, 2018 at 5:54:11 pm

Its not the first time this has come up here. Check this thread: https://forums.creativecow.net/docs/forums/post.php?forumid=2&postid=113253...

Kalleheikki Kannisto even supplied project files explaining the quickiest ways to accomplish that.

Cassius Marques
http://www.zapfilmes.com


Return to posts index

alexander nilsson
Re: Particles in synthesia
on Nov 10, 2018 at 1:51:04 pm

Hi! Thank you for redirecting me! However, I'm really fresh to after effects, and I can't seem to get it to work with his project files ( even though he's probably very thorough).

Now I've added a video to my main comp. I've duplicated that one and added keylight to it, made the green notes/bars transparent, added a solid layer underneath and made my bars blue. I've then added a spotlight emitter, which the particular and optical flare is linked to.

What I'm trying to do is, when the blue bars hit the piano roll, particular and flare will generate/start, then as soon as the piano roll doesn't have any blue bars within its area, it should stop generating/stop the effect.

Is that possible without having to script? Sorry if I'm being too much of a novice here... ☺ I'll add a picture of my process!


Return to posts index


Kalleheikki Kannisto
Re: Particles in synthesia
on Nov 10, 2018 at 7:13:30 pm

That other solution was without expressions. If you're going to use lights as emitters, you will need an expression for the light intensity.

Here's an expression that checks whether the color underneath the light location on a layer named "keyboard" matches a specific color and turns the light intensity to 100 if it is a match, otherwise the light is at 0. The match is being checked against the blue color of the piano roll in the sample image you provided.
Rename your synthesia footage as "keyboard" or change the layer name in the expression to match yours.

Add this expression to the Light Intensity property:

L = thisLayer;
pos2d = L.toComp([0,0]);
T = thisComp.layer("keyboard");
Tcolor = T.sampleImage([pos2d[0],pos2d[1]], [0.5,0.5], true, time);
colorR = Math.round(Tcolor[0]*255);
colorG = Math.round(Tcolor[1]*255);
colorB = Math.round(Tcolor[2]*255);
lightOn = false;
tolerance = 3;
matchR = 5;
matchG = 120;
matchB = 200;
if (Math.abs(colorR-matchR)<tolerance && Math.abs(colorG-matchG)<tolerance && Math.abs(colorB-matchB)<tolerance){lightOn = true};
lightOn*100


If you need to check for a match to a different color (like a darker blue or green), you'll need to adjust the RGB values (matchR, matchG and matchB).

If you need to check matches to multiple different colors for a single light, you'll need to duplicate the three match lines and the if line and change the RGB values for each color that you want to match.

This way you can use the light as an emitter for Particular, for Optical Flares and as a light source. The down side of this method is that you need to make as many lights as you have keys. So once you have a single light that works as expected, you will need to make a whole bunch of copies to place one at the top of each key.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Kalleheikki Kannisto
Re: Particles in synthesia
on Nov 10, 2018 at 7:39:22 pm

The setting of sampling a single pixel ([0.5, 0.5] on the sampleImage line) is susceptible to flickering, you may want to increase the values.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

alexander nilsson
Re: Particles in synthesia
on Nov 10, 2018 at 9:21:14 pm

Hi! Thank you for taking your time and answering!
I used your script, but it doesn't trigger all the time, I'll provide a picture. I've also put out a few more emitters, though only some of them triggers.


As you said, it will take some work to place out all of the emitters. Wouldn't it be possible to make a mask and then, when the blue bars hit the mask, particular and optical flares will generate/start, and end as soon as there is no more blue bars?


Return to posts index


Kalleheikki Kannisto
Re: Particles in synthesia
on Nov 10, 2018 at 10:55:02 pm
Last Edited By Kalleheikki Kannisto on Nov 10, 2018 at 10:56:26 pm

There's no such trigger event as "color hits mask". There are layer emitters, which are used in the first example (meaning the one in the earlier, linked thread) and light emitters that are used in the one described here.

A couple of things of note:
The keys and the piano roll are not aligned in your screenshot. Neither are the lights and the keys, at least not that accurately. There seems to be a lighting effect already in place in the original footage when the keys are played. All thse things throw off the triggering.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

alexander nilsson
Re: Particles in synthesia
on Nov 12, 2018 at 3:13:15 pm

It works now, finally! Now I just have to configure the particles to behave the way I want them to. Thank you very much for your expertise! ☺


Return to posts index

Kalleheikki Kannisto
Re: Particles in synthesia
on Nov 12, 2018 at 8:11:46 pm

Awesome! Post a sample here of your final look if you get the chance.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]