OpenGL Renderer for After Effects

AERenderer

While working in Shakr, my main role was to develop the GPU-accelerated renderer based on OpenGL/C++ communicating with Adobe After Effects. The video above shows one of the comparison results, the left one is from After Effects and the right one is from this renderer. They look similar because it is the goal that this renderer shows almost the same result as possible with the After Effects and faster, so that designers using After Effects can compatibly use their works(aep files) to accelerate producing video results. Furthermore, this can make millions of videos produced within a reasonable time.

Some dependencies for this project are as follows:

  • Ubuntu 18.04/20.04/22.04 LTS 64-bit
  • glad, egl, glm (for rendering)
  • rapidjson (aep files are translated to json files to create inputs for this renderer)
  • freeimage, nvjpeg (for reading and writing images)
  • freetype2, harfbuzz, icu (for generating glyph images)
  • ffmpeg, cuda, nvdec, nvenc (for decoding and encoding audios/videos)
  • v8 (for expression in javascript)

1. Basic Layers

Footage Layers

Footage

Footage layers are for images, videos, or audio. In the case of the jpg images and mp4 videos, they are accelerated when read with nvdec. The video above shows one of the results, the left one is from After Effects and the right one is from this renderer.

Some noticeable features are as follows:

  • decoding png and jpg files using freeimage, particularly jpg decoding can be accelerated with nvjpeg.
  • decoding audio and video files, particularly mp4 decoding can be accelerated with nvdec.
  • solid color images
  • alpha channel interpretation; ignore, straight, and premultiplied

Text Layers

Text

Text layers are obviously for text. The glyphs are created from freetype2 and shaped from harfbuzz. The video above shows one of the results, the left one is from After Effects and the right one is from this renderer.

Some noticeable features are as follows:

  • glyph shaping using freetype2 and harfbuzz
  • text direction; left-to-right such as English and right-to-left such as Arabic.
  • leading, tracking, kerning, caps, and faux italic
  • text path; reverse path, perpendicular to path, force alignment, and first/last margin
  • text more options; grouping and blending
  • text animation; range selector, wiggly selector, and expression selector

Shape Layers

Shape

Shape layers can represent any shapes including rectangles and ellipses. These layers are one of the hassles to implement but do not depend on any libraries. The video above shows one of the results, the left one is from After Effects and the right one is from this renderer.

Some noticeable features are as follows:

  • fill; even-odd and non-zero winding rules
  • stroke; miter/round/bevel joins and butt/round/projecting caps including dashes
  • gradient fill and stroke
  • shape paths: rectangle, ellipse, and path(vector)
  • shape filters: repeater and trim paths

Camera & Light Layers

Shape

Camera and Light layers can be activated for 3D. Depth test must be enabled and lighting equations are estimated. The video above shows one of the results, the left one is from After Effects and the right one is from this renderer.

Some noticeable features are as follows:

  • one-node and two-node cameras, so that 3d layers are supported
  • light options: ambient, point, spot, and parallel

2. Effects

After Effects has plenty of effects; over 60 effects are estimated/implemented for this renderer. Selected effects are posted.

3. Layer Styles

After Effects provides 9-layer style features other than effects. Currently, 4 styles are supported as below.

Drop Shadow

DropShadow

Inner Shadow

InnerShadow

Color Overlay

ColorOverlay

Stroke

Stroke


© 2024. All rights reserved.