Activity › Forums › Adobe After Effects Expressions › Expression to stop rendering when there are no pixels in the composition
-
Expression to stop rendering when there are no pixels in the composition
-
Avinash Ramanath
December 21, 2016 at 9:57 amScenario: Text crawler
I am dynamically passing a string to a text layer which is crawling at below speedrate = 2; //value in px/sec.
value – [rate*timeToFrames(time),1]This text layer is placed inside a comp named RenderComp which I will render as TGA using Media Encoder.
Requirement:
The standard duration of RenderComp is set to 5 minutes. Is there a way to dynamically set the timing of the composition based on the string length, so that it does not render blank frames when the string is shorter.rate = 2; //value in px/sec.
value - [rate*timeToFrames(time),1] -
Dan Ebberts
December 22, 2016 at 5:13 pmExpressions can’t control the work area or anything else I can think of that would give you the result you’re looking for. You could do it with a script though.
Dan
-
Avinash Ramanath
December 22, 2016 at 5:47 pmDan, I am new to scripting, could you please help me with a script that does what am looking for.
Pick a footage/footages from a folder (say video1 and video2)
Import the files inside after effects
make compositions from the videos
sequence the compositions
Render the compositionI know am asking too much, could you please direct me towards ways of achieving this even if i have to approach an agency.
Thanks in advance.
-
Dan Ebberts
December 22, 2016 at 6:24 pmThis is a simple example that asks you to navigate to a video file and then creates a comp with it.
function makeComp(){
var video1 = File.openDialog("Navigate to video file.");
if (video1 == null || (! video1.exists)){
alert("No video selected.");
return;
}
var myImportOptions = new ImportOptions;
myImportOptions.file = video1;
var myFootage = app.project.importFile(myImportOptions);
var myComp = app.project.items.addComp("video1",myFootage.width,myFootage.height,myFootage.pixelAspect,myFootage.duration,myFootage.frameRate);
myComp.layers.add(myFootage);
}
makeComp();
Hopefully that will get you started.
Dan
Reply to this Discussion! Login or Sign Up
Log in to reply.