Forum Replies Created
-
This may do what you’re looking for.
// USER VARIABLES:
//
var nullSuffix = "-Light";
var addLayerNameBeforeSuffix = 1; // 1 for yes, 0 for no
//
//
//////////////////////////////////////////////////////////////////////var proj = app.project;
var undoStr = "Add Parented Null to Selected Layers";if (proj){
var myComp = app.project.activeItem;
if (myComp != null && (myComp instanceof CompItem)){
app.beginUndoGroup(undoStr);var myLayers = myComp.selectedLayers;
var saveIn = 0;
var saveOut = 0;
for (i=0; i <= myLayers.length-1; i++){ currentLayer = myLayers[i]; saveIn = (currentLayer.stretch < 0) ? currentLayer.outPoint : currentLayer.inPoint; saveOut = (currentLayer.stretch < 0) ? currentLayer.inPoint : currentLayer.outPoint; saveIndex = currentLayer.index; saveName = (addLayerNameBeforeSuffix) ? currentLayer.name+nullSuffix : nullSuffix; var myName = (parseFloat(app.version) < 8.0) ? saveName.substring(0, 31) : saveName; var centerW = currentLayer.width/2; var centerH= currentLayer.height/2; var newNull = myComp.layers.addLight("",[centerW,centerH]); if (currentLayer.threeDLayer) newNull.threeDLayer = true; var tempParent = null; if (currentLayer.parent != null) { tempParent = currentLayer.parent; var tempLayer = currentLayer.duplicate(); tempLayer.parent = null; newNull.transform.position.setValue(tempLayer.transform.position.value); //newNull.transform.scale.setValue(tempLayer.transform.scale.value); if (tempLayer.threeDLayer) { newNull.transform.xRotation.setValue(tempLayer.transform.xRotation.value); newNull.transform.yRotation.setValue(tempLayer.transform.yRotation.value); newNull.transform.zRotation.setValue(tempLayer.transform.zRotation.value); } else { newNull.transform.rotation.setValue(tempLayer.transform.rotation.value); } tempLayer.remove(); } else { newNull.transform.position.setValue(currentLayer.transform.position.value); //newNull.transform.scale.setValue(currentLayer.transform.scale.value); if (currentLayer.threeDLayer) { newNull.transform.orientation.setValue(currentLayer.transform.orientation.value); newNull.transform.xRotation.setValue(currentLayer.transform.xRotation.value); newNull.transform.yRotation.setValue(currentLayer.transform.yRotation.value); newNull.transform.zRotation.setValue(currentLayer.transform.zRotation.value); } else { newNull.rotation.setValue(currentLayer.transform.rotation.value); } } if (tempParent != null) newNull.parent = tempParent; newNull.moveBefore(myLayers[i]); newNull.inPoint = saveIn newNull.outPoint = saveOut; currentLayer.parent = newNull; newNull.name = myName; } app.endUndoGroup(); } else { alert("Please select an active comp to use this script"); } } else { alert("Please open a project first to use this script."); } -
This isn’t applicable if there is only one layer in the comp. But if there are multiple, then copying and pasting could be used instead of duplicating. AE will paste a layer directly above the current layer that is selected. So you could copy one layer (for instance lets say it’s layer 4) and select the layer below that (layer 5) and then paste and it will make a copy above layer 5/beneath layer 4.
But perhaps you are trying to duplicate a layer a few hundred layers. It’s way easier to press Command D a bunch of times than copying, selecting the layer below, and pasting.. There’s a situation I’ve been in where I needed to duplicate a very large number of layers with expressions applied to them that reference an index above/below. But then I realized that I needed to invert the order they were arranged in. The easiest way to do this is to select the layers in the comp from the bottom to the top, copy, delete them all, then paste, and AE will paste them from top to bottom the order that you selected them in. This is a pretty neat feature in After Effects that I’ve used a lot to save myself time re-organizing layers. What ever order you select layers in is the order that they’ll be pasted from top to bottom.
It may help to turn off your expression before duplicating so you don’t get any annoying errors.
Hope any of this helps!
Philip. Bowser
-
Philip Bowser
January 10, 2014 at 1:28 am in reply to: Slider that scales the slider value to the comp durationSo are you trying to have text automatically scroll from one position to another over the course of the comp’s duration?
Would something like assigning a “Start Vertical Position” and an “End Vertical Position” with sliders be sufficient? With Expressions handling the animation at a velocity that is based on duration?
Philip. Bowser
-
Philip Bowser
January 9, 2014 at 6:15 pm in reply to: Auto Scaling Expression for layers with wiggleDan! You’re a wizard… How did you figure this out so fast!??
This is perfect. Thank you a bunch! I’m still trying to decode this to understand it completely…
I’ve combined this with your expressions to wiggle properties based on layer markers. This is going to be a huge help, can’t thank you enough! Just in case you had an interest, here’s the preset, now with your autoscale function built in!
(It’s a “pseudo effect” so it will show up as “Missing” in your effects bin, however all the functionality will work)
Philip. Bowser
-
There are a bunch of cool techniques happening here. Other than some After Effects work, there’s something that you’ll need to do outside of AE.
A lot of what you’re seeing uses a technique commonly known as “Datamoshing” on the interwebs.
It’s essentially controlled data corruption, a technique where you take the motion of pixels from one video and apply it to another.The director Nabil used this extensively in this video for Kanye West:
https://www.youtube.com/watch?v=wMH0e8kIZtEHere’s a YouTube tutorial on Datamoshing from a quick google search:
https://www.youtube.com/watch?v=tYytVzbPky8Now to combine it all together. It looks like there was perhaps a base layer made in After Effects, using something similar to the Bad TV Presets with some quick cutting text/footage/carnage. Then rendered out mixed in with some secondary footage of a creepy masked man using the datamoshing technique. Then perhaps that footage may have been rendered out and the process repeated all over again until it’s so corrupted. Who knows!
Here’s a great plug-in I use a lot when I’m in need of some quick glitches:
https://aescripts.com/data-glitch/Also, something I’ve done in the past is create a custom “glitch map” using the fractal noise (block settings, making it as square and “digital” looking as possible) and some other distortion filters, pre-compose all of that and using it with the “Displacement Map” effect on footage.
It’s very hard to determine EXACTLY what’s going on in this Superman video and the source footage they used.. But using a combination of those techniques, some interesting footage to work with, and a little bit of experimentation should get you something looking fairly corrupted and chaotic.
Philip. Bowser
Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
-
Hmm.. Seems like there are many ways to conceptualize what you are talking about.
Do you mean as if it were like a knitted sweater and you were pulling one end of the string, unravelling the sweater in a zig zag like pattern?
And if so, would you expect the actual footage to follow through with the unravelled string, as if the footage was actually composed of the strands of string? Or simply as a matte to “wipe” on or off the footage?
Those questions sounds very confusing but hopefully they make enough sense to get a better understanding of what you’re looking for.
Philip. Bowser
-
Philip Bowser
January 9, 2014 at 2:06 am in reply to: Auto Scaling Expression for layers with wiggleDan! Yes! You said that way easier than I could. I just couldn’t find the right words for some reason. Yikes.
Do you have any magic up your wizard sleeves?
It’d be the greatest help. Thanks Dan!
-
Philip Bowser
January 8, 2014 at 7:18 pm in reply to: Auto Scaling Expression for layers with wiggleHey Steve,
Thanks for your response! My mistake, I wasn’t terribly clear about my actual use for this. I’m looking to build a shaky-cam/wiggle preset that will wiggle/shake my footage around. So my goal is to hopefully be able to wiggle this footage with a basic wiggle expression and have a separate expression in the scale property that will automatically determine how much the footage needs to scale up by to compensate for the layer being displaced from the edges of the frame. Assuming that the footage is the same dimensions as the comp. My stumbling block right now is knowing how much the footage needs to scale up by when rotation is applied to compensate for the corners of the frame.
I’ve got a project I’m working on which has shake in almost every shot! Seriously way too many shots.. Kind of ridiculous.. But I figured if I can build a tool this one time I will probably use it for every project that has any kind of shake!
-
Philip Bowser
December 18, 2011 at 11:57 pm in reply to: Scripting Gurus! After Effects Depth GeneratorHey Ted!
Awesome that your interested! Shoot me an email at philip.bowser@gmail.com or let me know how I can send you the script.
@ Chris
Good question. Yes and no. It’s something I put together after doing a lot of 2.5D stuff in after effects and needing to generate depth maps quickly for multiple comps that I could use in real-time due to projects constantly changing.Let me know if you want me to send the script!