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.
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.
| 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 |
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.
- 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 toae_ldpk/. - LDPK headers are picked up from
ldpk-2.14.0/include(configured in the .vcxproj). - Detailed build commands — in
ae_ldpk/readme.md: thenk_ld_dumputility, MSBuild forLD3DE4_Lens_Distortion.sln, the diagnostic build with the%TEMP%\ld3de4_ae.loglog.
- 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 toae_ldpk/(or pointAE_SDK/AE_SDK_HEADERSto it). - Build with
ae_ldpk/ae/Mac/build_mac.sh: a universal (Intel + Apple Silicon).bundlewith the PiPL; release and debug variants land inreleases/AE_LD3DE4/. - On CI (no Mac needed): the
build-macworkflow builds both configurations on every push touchingae_ldpk/; therelease-macworkflow (manual run) attaches the macOS zip to a release. Both download the SDK from the privateAE-SDK-26.5-macrelease of this repository — delete that release before making the repository public. - Details — in
ae_ldpk/readme.md, section "Building (macOS)".
- Apply the Lens Distortion → 3DE4 Lens Distortion effect to a layer.
- Choose .nk File... — a file from 3DE4 (a full Nuke
.nkworks too); the model and keys are substituted automatically, the file is no longer needed (a snapshot is stored in the project). - Direction: Undistort / Distort.
- Fit Comp To Distortion... — fits the composition to the full image.
Full user manual: English | Русский.
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.