Skip to content
comkoffPublic

About

Lens distortion effect for After Effects based on LDPK 2.14.0 - reads 3DE4 .nk lens files; Windows & macOS

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

ldpk-ae — Lens Distortion: LDPK → After Effects

Lens distortion tooling based on LDPK 2.14.0 (Lens Distortion Plugin Kit, Science-D-Visions).

Language: English | Русский

The centerpiece is the After Effects effect "3DE4 Lens Distortion": it applies lens distortion computed in 3DE4 to a layer — either from a .nk file exported from 3DE4 (File → Export → Export Nuke LD_3DE4 Lens Distortion Node) or from parameters set manually. Animated parameters are supported (3DE4 curves → keyframes), Undistort/Distort directions, automatic composition fitting (Fit Comp), 8/16/32 bpc.

Two builds: release and debug

The plugin is built in two versions that can be installed side by side:

Build Menu entry Match name Log file
Release Lens Distortion → 3DE4 Lens Distortion SDV LD_3DE4 Lens Distortion none
Debug (diagnostic) Lens Distortion → 3DE4 Lens Distortion Debug SDV LD_3DE4 Lens Distortion Debug always writes %TEMP%\ld3de4_ae.log (rotated at 10 MB, backup ld3de4_ae.log.1)

For troubleshooting use the debug build: apply it to a copy of the composition, reproduce the problem and attach the log.

Repository layout

Directory Contents
ae_ldpk/ LDPK → After Effects bridge: .nk parser (ldpk_nk_block.h), model registry (ldpk_model_registry.h), loader (ldpk_nk_loader.h), parameter tables (ldpk_param_tables.h), reference cross-check utility (nk_ld_dump.cpp), test (test_snapshot_roundtrip.cpp), effect source (ae/) and VS 2022 project (ae/Win/)
ldpk-2.14.0/ Original LDPK 2.14.0 (Science-D-Visions), pruned to what the bridge needs: header-only models (include/ldpk/ — required for building the bridge), the 3DE4 .nk exporter (3de4/python/), model math docs (doc/tex/), license (license)
releases/ Release documentation; binaries are published on the Releases page

Downloads

Ready-to-use plugin binaries are published as assets of GitHub Releases: https://github.com/comkoff/ldpk-ae/releases. The repository tree contains sources and documentation only. Release assets contain both builds (release and debug) for Windows and macOS and the user manual in English and Russian. On macOS, remove the Gatekeeper quarantine right after unpacking: xattr -dr com.apple.quarantine LD_3DE4_Lens_Distortion_v*.bundle.

Building the AE plugin (Windows)

  • Visual Studio 2022 (toolset v143, x64), workload "Desktop development with C++".
  • The After Effects SDK is not part of this repository: download AE SDK 26.5 and unpack it into AfterEffectsSDK_26.5_win/ next to ae_ldpk/.
  • LDPK headers are picked up from ldpk-2.14.0/include (configured in the .vcxproj).
  • Detailed build commands — in ae_ldpk/readme.md: the nk_ld_dump utility, MSBuild for LD3DE4_Lens_Distortion.sln, the diagnostic build with the %TEMP%\ld3de4_ae.log log.

Building the AE plugin (macOS)

  • Xcode command line tools; the AE SDK 26.5 for macOS (the same Adobe download) — only three SDK folders are needed: Examples/Headers, Examples/Resources, Examples/Util.
  • Unpack the SDK into AfterEffectsSDK_26.5_mac/ next to ae_ldpk/ (or point AE_SDK / AE_SDK_HEADERS to it).
  • Build with ae_ldpk/ae/Mac/build_mac.sh: a universal (Intel + Apple Silicon) .bundle with the PiPL; release and debug variants land in releases/AE_LD3DE4/.
  • On CI (no Mac needed): the build-mac workflow builds both configurations on every push touching ae_ldpk/; the release-mac workflow (manual run) attaches the macOS zip to a release. Both download the SDK from the private AE-SDK-26.5-mac release of this repository — delete that release before making the repository public.
  • Details — in ae_ldpk/readme.md, section "Building (macOS)".

Usage (quick start)

  1. Apply the Lens Distortion → 3DE4 Lens Distortion effect to a layer.
  2. Choose .nk File... — a file from 3DE4 (a full Nuke .nk works too); the model and keys are substituted automatically, the file is no longer needed (a snapshot is stored in the project).
  3. Direction: Undistort / Distort.
  4. Fit Comp To Distortion... — fits the composition to the full image.

Full user manual: English | Русский.

License

The bridge code is licensed under the MIT License © Yaroslav Zvykov (comkoff). The LDPK models are free software © Uwe Sassenberg, Science-D-Visions (see ldpk-2.14.0/license); the tde4_ld_plugin.h header belongs to Science-D-Visions. Adobe SDK examples are used as a structural reference.

About

Lens distortion effect for After Effects based on LDPK 2.14.0 - reads 3DE4 .nk lens files; Windows & macOS

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages