ldpk
|
The current version of LDPK is 1.13 The PDF-document contains some information on the underlying mathematics of the built-in lens distortion models.
A list of files can be found here. We left out some of the less interesting files in the documentation directories.
As of version 1.6 of the $LDPK, only 64-bit architectures are supported. For each of the supported platforms there is a simple program in $LDPK/bin
which you can use in order to check, if your plugin is accepted by the executable. They have been compiled on the same platforms using the same compiler as 3DE4. These binaries are:
tde4_plugin_info.linux
tde4_plugin_info.osx
As of version 1.6 of the LDPK there are python bindings for the five built-in lens distortion models (OSX, Linux):
$LDPK/compiled/ldpk/<arch>/python/lens_distortion_plugins.so
In $LDPK/source
there is a source tde4_lens_distortion_plugins.module.C
for building python bindings. If the pre-compiled version does not meet your requirements you can compile them yourself. In order to do this please run the appropriate script make_python_bindings.<arch>.csh in $LDPK/script
. The make-script will create a file named $LDPK/python/<arch>/lens_distortion_plugins.so
. If you move this to an appropriate location, you can import this in python e.g. with
Please have a look at the sample programs in $LDPK/python
and read this document.
As of version 1.7 of the LDPK there are compiled plugins based on the five built-in lens distortion models for various versions of Nuke (from The Foundry) In the documentation and in 3DE4 we will refer to these nodes as the LD_3DE4 Lens Distortion Nodes or briefly the LD_3DE4 nodes.
$LDPK/compiled/nuke/<arch>/Nuke<X.Y>/LD_3DE4_Anamorphic_Degree_6.[so,dylib,dll]
$LDPK/compiled/nuke/<arch>/Nuke<X.Y>/LD_3DE4_Anamorphic_Standard_Degree_4.[so,dylib,dll]
$LDPK/compiled/nuke/<arch>/Nuke<X.Y>/LD_3DE4_Anamorphic_Rescaled_Degree_4.[so,dylib,dll]
$LDPK/compiled/nuke/<arch>/Nuke<X.Y>/LD_3DE4_Radial_Fisheye_Degree_8.[so,dylib,dll]
$LDPK/compiled/nuke/<arch>/Nuke<X.Y>/LD_3DE4_Radial_Standard_Degree_4.[so,dylib,dll]
$LDPK/compiled/nuke/<arch>/Nuke<X.Y>/LD_3DE_Classic_LD_Model.[so,dylib,dll]
They are fairly easy to install, you simply copy them to your Nuke plugin directory. Currently, the following combinations of platform/Nuke version are supported:
The Nuke node for the recently added model LD_3DE4_Anamorphic_Rescaled_Degree_4 is available on:
We have modified $NUKE/plugins/menu.py
as in the following code snippet, but you may handle this according to your needs. Also, it might be helpful to consult Nuke's documentation about adding commands to the GUI.
In $LDPK/3de4/python
you will find an export script named
export_nuke_LD_3DE4_Lens_Distortion_Node.py
which you run from within 3DE4. In order to do this please copy it into your 3DE4 installation, at $TDE4/sys_data/py_scripts/
. In 3DE4's GUI the script appears in Main Window -> 3DE4 -> File -> Export
In addition to the seven built-in parameters and the model-specific parameters the plugins have four parameters which allow to specify the field of view as defined in 3DE4:
Default values are 0,0,1,1. By definition, the field of view in 3DE4 corresponds to the area represented by filmback width and height. In contrast to previous solutions, field of view is now taken into account.
If you need to compile the Nuke plugins yourself, please have a look at the scripts make_nuke_nodes.<arch>.csh
in $LDPK/script
. Please insert the paths to your Nuke installation directory and consult The Foundry's documentation for the appropriate compiler version. For compiling under Windows you will need the appropriate version of Visual Studio (that is VS 2015 Update 3 as of Nuke 11.0). In $LDPK/windows you will find a small readme-file about how this is done. If you miss support for any version of Nuke here please let us know, we will add this if possible.
The LDPK contains various classes. It is important to know that most of them are not required in order to develop a plugin. In the following we will classify all classes according to their importance. Note that you only need one API class in order to develop a plugin with at least basic functionality.
$LDPK/source
you will find the sources for building Nuke plugins around 3DE4 lens distortion plugins. Take any of these as a starting point for your own Nuke plugin, but note that we do not directly derive from tde4_ld_plugin but from ldpk::ldp_builtin, which has certain properties we need for all our lens distortion models.