Answers.Body: <p>Use "Echo" effect. I believe it will suite you.</p>
  
  <p>You need adjust it. Make number of echos equal to your frame count.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-04T23:05:31.967Z
Answers.LastActivityDate: 2016-09-04T23:05:31.967Z
Answers.UserDisplayName: Shultc
Answers.Body: <p>Copy this script into a text file and save it as <strong>stackinator2000.jsx</strong> then in AE go to <strong>File>Scripts>Run Script File</strong> and load the file you saved. Then select a layer and run it. </p>
  
  <p><strong>NOTE</strong></p>
  
  <ul>
  <li>It will take a long time if the comp is long.</li>
  <li>It will create a layer for every frame. I hope you've got a fast machine.</li>
  <li>save your project before trying it. I've tested it and it works here, but  all care, no responsibility, yadda yadda.</li>
  <li>It is important that the script is saved as <strong>stackinator2000.jsx</strong>—trust me on this one. If that's unacceptable then calling it <strong>The_Mighty_Stackatron.jsx</strong> or <strong>stackMeister_77.jsx</strong> is a possible workaround, but it will be 25% less awesome.</li>
  </ul>
  
  <pre class="lang-js prettyprint-override"><code>app.beginUndoGroup('stackinator2000');
  var theComp = app.project.activeItem
  if (!theComp) {
    //no comp selected, silly rabbit
    alert('choose a layer in a comp');
  } else {
    var theLayer = theComp.selectedLayers[0];
    if (!theLayer) {
      //no layer selected
      alert('choose a layer');
    } else {
      var firstFrame = Math.max(theLayer.inPoint / theComp.frameDuration, 0);
      var lastFrame = Math.min(theComp.duration, theLayer.outPoint) / theComp.frameDuration
      var frame;
      //set the blending mode while we're at it
      theLayer.blendingMode = BlendingMode.LIGHTEN;
      //turn on time remapping
      theLayer.timeRemapEnabled = true;
      //delete the last key to make it a freeze frame - this will remove any other time remapping set
      while (theLayer.timeRemap.numKeys &gt; 1) {
        theLayer.timeRemap.removeKey(2)
      }
      //step forward one frame at a time
      for (frame = firstFrame; frame +1 &lt; lastFrame; frame++) {
        //duplicate the layer and work with the new layer
        theLayer = theLayer.duplicate();
        //offset the inpoint by one frame
        theLayer.inPoint = (frame + 1) * theComp.frameDuration;
        //prevents weirdness with the out point that I don't understand
        theLayer.outPoint = lastFrame * theComp.frameDuration;
        //set the time remapping for the first frame of the layer
        theLayer.timeRemap.setValueAtTime(theLayer.inPoint, theLayer.inPoint - theLayer.startTime);
        //delete the old key which should be before the current one
        while (theLayer.timeRemap.numKeys &gt; 1) {
          theLayer.timeRemap.removeKey(1);
        }
      }
    }
  }
  app.endUndoGroup();
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-05T03:09:09.833Z
Answers.LastActivityDate: 2016-10-05T03:31:26.180Z
Answers.LastEditDate: 2016-10-05T03:31:26.180Z
Answers.UserDisplayName: stib
Body: <p>I want each frame of video to get added on top of the previous frames. I don't want any of them to fade out. I am shooting locked down with a black background. A model moves through the frame with a light. I want to stack the frames one on top of the others so that the light moves through the frame and the last frame shows the path taken as a light trail. </p>
  
  <p>What is the easiest way to add each new frame on top of the rest? I would like to avoid putting a separate layer for each frame manually.</p>
  
Tags: <after-effects>
Title: How to stack frames of a video together using lighten blending mode?
UserDisplayName: 5t31th
ThreadText: # How to stack frames of a video together using lighten blending mode?
  
  (Asked by: username_0 on 2016-09-04)
  
  I want each frame of video to get added on top of the previous frames. I don't want any of them to fade out. I am shooting locked down with a black background. A model moves through the frame with a light. I want to stack the frames one on top of the others so that the light moves through the frame and the last frame shows the path taken as a light trail.
  
  What is the easiest way to add each new frame on top of the rest? I would like to avoid putting a separate layer for each frame manually.
  
  **Tags:** after-effects
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-09-04. Score: 3
  
  Use "Echo" effect. I believe it will suite you.
  
  You need adjust it. Make number of echos equal to your frame count.
  
  
  ---
  
  ### Answer by username_2 on 2016-10-05. Score: -1
  
  Copy this script into a text file and save it as **stackinator2000.jsx** then in AE go to **File>Scripts>Run Script File** and load the file you saved. Then select a layer and run it.
  
  **NOTE**
  
  * It will take a long time if the comp is long.
  * It will create a layer for every frame. I hope you've got a fast machine.
  * save your project before trying it. I've tested it and it works here, but all care, no responsibility, yadda yadda.
  * It is important that the script is saved as **stackinator2000.jsx**—trust me on this one. If that's unacceptable then calling it **The\_Mighty\_Stackatron.jsx** or **stackMeister\_77.jsx** is a possible workaround, but it will be 25% less awesome.
  
  ```js
  app.beginUndoGroup('stackinator2000');
  var theComp = app.project.activeItem
  if (!theComp) {
    //no comp selected, silly rabbit
    alert('choose a layer in a comp');
  } else {
    var theLayer = theComp.selectedLayers[0];
    if (!theLayer) {
      //no layer selected
      alert('choose a layer');
    } else {
      var firstFrame = Math.max(theLayer.inPoint / theComp.frameDuration, 0);
      var lastFrame = Math.min(theComp.duration, theLayer.outPoint) / theComp.frameDuration
      var frame;
      //set the blending mode while we're at it
      theLayer.blendingMode = BlendingMode.LIGHTEN;
      //turn on time remapping
      theLayer.timeRemapEnabled = true;
      //delete the last key to make it a freeze frame - this will remove any other time remapping set
      while (theLayer.timeRemap.numKeys > 1) {
        theLayer.timeRemap.removeKey(2)
      }
      //step forward one frame at a time
      for (frame = firstFrame; frame +1 < lastFrame; frame++) {
        //duplicate the layer and work with the new layer
        theLayer = theLayer.duplicate();
        //offset the inpoint by one frame
        theLayer.inPoint = (frame + 1) * theComp.frameDuration;
        //prevents weirdness with the out point that I don't understand
        theLayer.outPoint = lastFrame * theComp.frameDuration;
        //set the time remapping for the first frame of the layer
        theLayer.timeRemap.setValueAtTime(theLayer.inPoint, theLayer.inPoint - theLayer.startTime);
        //delete the old key which should be before the current one
        while (theLayer.timeRemap.numKeys > 1) {
          theLayer.timeRemap.removeKey(1);
        }
      }
    }
  }
  app.endUndoGroup();
  
  ```
  
  
  ---
  
  