give me after effect script to make an smoky text intro
- User
give me after effect script to make an smoky text intro
- Assistant
Sure! Here's a basic After Effects script to create a smoky text intro:
// Create a new project var myProject = app.newProject(); // Set the duration and frame rate myProject.duration = 4; // In seconds myProject.frameRate = 30; // In frames per second // Create a new composition var myComp = myProject.items.addComp("Smoky Text Intro", 1920, 1080, 1.0, myProject.duration, myProject.frameRate); // Add a new solid layer var mySolid = myComp.layers.addSolid([0,0,0], "Background", myComp.width, myComp.height, 1.0); mySolid.moveToEnd(); // Add a new text layer var myTextLayer = myComp.layers.addText(); // Set the text properties var myTextProperty = myTextLayer.property("Source Text"); myTextProperty.setValue("Your Text Here"); myTextLayer.position.setValue([myComp.width/2, myComp.height/2]); // Add a new effect to the text layer - CC Smear var ccSmearEffect = myTextLayer.property("Effects").addProperty("CC Smear"); // Set the properties for the CC Smear effect var ccSmearEffectProperty = ccSmearEffect.property("ClearColor"); ccSmearEffectProperty.setValue([0, 0, 0]); // Set the color of the smoke ccSmearEffectProperty = ccSmearEffect.property("Ramp Scatter"); ccSmearEffectProperty.setValue(1); // Increase the scatter effect // Set the keyframes for the CC Smear effect ccSmearEffect.startTime.setValue(0); // Start at the beginning of the composition ccSmearEffect.property("Scatter Width (%)").setValueAtTime(0,0); ccSmearEffect.property("Scatter Width (%)").setValueAtTime(myComp.duration, 100); // Render the composition app.project.renderQueue.items.add(myComp); app.project.renderQueue.render(); // Close the project app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);To use this script, follow these steps:
- Open After Effects.
- Go to File -> Scripts -> New Script file.
- Copy and paste the above script into the new script file.
- Save the file with a .jsx extension.
- Double-click the script file to run it.
This script will create a new composition with a smoky text intro. You can customize the text, background color, and other properties as per your requirement.
- User
Sure! Here’s a basic After Effects script to create a smoky text intro for the selected layer
- Assistant
Here's a modified version of the script to create a smoky text intro for the selected layer:
// Check if a layer is selected if (app.project.activeItem == null || !(app.project.activeItem instanceof CompItem)) { alert("Please select a composition."); } else { // Get the selected layer var selectedLayer = app.project.activeItem.selectedLayers[0]; // Check if a layer is selected if (selectedLayer == null) { alert("Please select a layer."); } else { // Create a new composition var myComp = app.project.items.addComp("Smoky Text Intro", selectedLayer.width, selectedLayer.height, 1.0, selectedLayer.outPoint, selectedLayer.frameRate); // Add a copy of the selected layer to the composition var textLayer = myComp.layers.add(selectedLayer.source); // Set the position of the text layer in the composition textLayer.position.setValue([selectedLayer.width/2, selectedLayer.height/2]); // Add the Turbulent Displace effect to the text layer var turbulentDisplaceEffect = textLayer.property("Effects").addProperty("Turbulent Displace"); // Set the properties for the Turbulent Displace effect turbulentDisplaceEffect.property("Size").setValue([15, 15]); turbulentDisplaceEffect.property("Amount").setValue(50); // Add the CC Vector Blur effect to the text layer var ccVectorBlurEffect = textLayer.property("Effects").addProperty("CC Vector Blur"); // Set the properties for the CC Vector Blur effect ccVectorBlurEffect.property("Amount").setValue(3); // Set the keyframes for the CC Vector Blur effect ccVectorBlurEffect.property("Blurriness").setValueAtTime(0, 0); ccVectorBlurEffect.property("Blurriness").setValueAtTime(myComp.duration, 50); // Render the composition app.project.renderQueue.items.add(myComp); app.project.renderQueue.render(); // Close the project app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES); } }To use this script, follow these steps:
- Open After Effects.
- Go to File -> Scripts -> New Script file.
- Copy and paste the above script into the new script file.
- Save the file with a .jsx extension.
- Select a layer in your composition.
- Double-click the script file to run it.
This script will create a smoky text intro for the selected layer in a new composition. It applies the Turbulent Displace and CC Vector Blur effects to the text layer to create a smoky effect. The script then renders the composition and closes the project.