Git Product home page Git Product logo

deepc's Introduction

DeepC

DeepCAnglerfish

Welcome to the DeepC, a suite of Deep compositing plugins for Foundry's Nuke. While I'm sure large studios have something similar to these tools, this open-source project makes them available to small and mid-size studios.

TOC

Plugins

What are the tools offered in the DeepC toolkit? The Wiki has a description for each and an overview of all available plugins.

Also, head over to the Examples page for some visuals.

You can read a quick description of some below.

DeepCBlink

Just a toy at the moment which performs a gain on the image, but demonstrates an approach to getting Blink working on Deep images. This approach works for kernels which need only the current pixel to operate. Experimental proof-of-concept, not really "useful" as a node.

Why DeepC?

DeepC has several advantages over DeepExpression-based solutions to working with Deep data.

Unique Features

World-position noise in Nuke has always been limited by Nuke's 3D noise algorithm. It's fine for a 2D image, but when working with 3D noise, your really need that fourth dimension so the noise can change over time. DeepCPNoise brings 4D noise to Nuke for the first time, by including and extending the open-source FastNoise library. 4D simplex noise in Nuke!

Familiar Tools, Familiar Power

DeepCGrade works just like the regular Grade node. You can mask it with rotos from the side input (incredibly, this is not available in the standard toolset, or with the DeepExpression node). You can use Deep masks coming in from the top. You can easily configure the channels to process and those to use as masks, just as you normally would.

Endlessly Extensible

The power of DeepC is limited only by the power of the NDK. Upcoming features like DeepCAddChannels and DeepCShuffle are only possible using the NDK.

Speed

Now that basic functionality is implemented, the focus will be on accelerating the speed of the toolset using the new NDK funcitonality available in Nuke 11.3.

Get Them!

Check the releases page for this repo to get the compiled versions of the plugins. Currently, I've only compiled them for Linux, but that's presumably the most useful for folks, anyway. Windows versions as and when I can, if I can. If you'd like to compile for Mac and contribute back, that would be much appreciated, as I don't have a Mac for development.

Future Plans

DeepCompress

Coming soon...

Much like how samples can be compressed in the renderer by merging samples closer than a certain threshold, this node will allow merging of samples in the Deep stream to cut down on processing time when the render is too heavy.

Build

Build has been tested on Centos 7 with devtoolset-3 (not Centos 6 with devtoolset-2, as recommended by Foundry - presumably very few people are still using Centos 6 in production, and it seems to work fine). I think the most recent build I did was using Centos 7 and devtoolset-7, but I don't have that VM around anymore so I'm not 100%. Let me know how it goes...

Thanks to Nathan Rusch (https://github.com/nrusch?tab=repositories) for contributing the CMake build setup which will form the basis for building DeepC going forward.

Linux

Install prerequisites:

sudo yum install centos-release-scl
sudo yum install devtoolset-3
sudo yum install mesa-libGLU-devel

Clone:

git clone --recurse-submodules https://github.com/charlesangus/DeepC

Add to .bashrc on dev machine, or run before each build:

# enable devtoolset-3
source /opt/rh/devtoolset-3/enable

Then, from the DeepC dir:

mkdir build; cd build
cmake -D CMAKE_INSTALL_PREFIX="`pwd`/../install" ..
make -j X install

Where X is the number of cores you have available, so make can run parallelized. And, of course, update CMAKE_INSTALL_PREFIX to your preferred install location.

Note: additionally you can adjust the Nuke Version via -D Nuke_ROOT="<PATH_TO_NUKE_ROOT_FOLDER>" Where <PATH_TO_NUKE_ROOT_FOLDER> is the path to the prefered nuke root like C:/Programs/Nuke12.2v2 or /usr/local/Nuke12.2v2

e.g.

cmake -D CMAKE_INSTALL_PREFIX="`pwd`/../install" -D Nuke_ROOT="/usr/local/Nuke13.1v1"

Windows

On Windows you need Visual Studio (15) 2017 to compile the plugins. You can use cmake (gui application-recommended) to create the project files for Visual Studio. Note: make sure to use the x64 platform to compile the plugin.

If you want to build the tool via command line (or us a batch script) use:

mkdir build
cd build
cmake -G "Visual Studio 15 2017" -A x64 .. -DCMAKE_INSTALL_PREFIX=install -B build
cmake --build build --config Release
cmake --install build

Note: additionally you can adjust the Nuke Version via -D Nuke_ROOT="<PATH_TO_NUKE_ROOT_FOLDER>" Where <PATH_TO_NUKE_ROOT_FOLDER> is the path to the prefered nuke root like C:/Programs/Nuke12.2v2 or /usr/local/Nuke12.2v2

e.g.

mkdir build
cd build
cmake -G "Visual Studio 15 2017" -A x64 .. -D CMAKE_INSTALL_PREFIX=install -D Nuke_ROOT="C:/Program Files/Nuke13.1v1" -B build
cmake --build build --config Release
cmake --install build

Mac

Unlikely...

Batch Install

We provide an install batch script to compile DeepC for multiple versions of Nuke which works on linux and windows and creates the compiled plugins in the choosen install folder for every version. The script can be executed running batchInstall.sh, you can then enter the Path to search for Nuke Versions e.g. /usr/local/ or C:/Program Files Optionally an install path can be entered aswell. The script then runs and compiles the plugins (as far as the dependencies like compilers can be found).

Examples

We created a repository which includes some example deep render scenes to try/test/use this plugin.
In futur we will add nuke project files to show how the plugins work.
https://github.com/charlesangus/DeepCExamples

Contributing

Currently, DeepC is maintained by me and Falk Hofmann. I'd love your contributions, though!

If you'd like to contribute, please fork the project make a new feature branch for your contribution. Ideally, also let me know what you're up to so we don't duplicate efforts!

Once you're happy with your work, submit a pull request so I can merge your work back in.

Conventions

  • 4-space hard tabs
  • private/protected variable names start with '_' (one underscore)
  • variable/function names use lowerCamelCase

deepc's People

Contributors

charlesangus avatar falkhofmann avatar jonassorgenfrei avatar nrusch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepc's Issues

DeepCGrade needs to support inline mask channels

Current conception of how this should work is PMattes and PNoises should be generating inline (ie. B-stream) channels to use as masks, so we're guaranteed a proper amount of samples, and then all grading is done by the DeepCGrade node.

create DeepCTexture node

I started already with a node which is in its basics very similar to the built-in DeepFromFrames.

So it would take a 2d RGBA texture and convert it into Deep. With a user defined front, back and samples. Main use case would be smoke, atmos and other typical atmospheric elements.

But i have some issues on how to read the actual 2d data inside the engine. the math on how to distribute and weight the samples is already existing in DeepCConstant and could be taken from there. this matches the DeepFromFrames behavior already.
I would just need some help to get this going.


Further ideas for this very tool would be:

  • falloff front and back
  • temporal offset from front to back to give it bit more complexity when objects moving across depth. so its not the same textures across all samples per pixel

Support for Nuke < 11.2?

DeepInPlaceOutputPlane is used in a bunch of the nodes (Add/Remove/Shuffle), and I think this type was added in Nuke 11.2

Any thoughts on how hard it would be to support older versions of Nuke? I'm mostly asking as we are mostly still on Nuke 10.5 probably for the next few months. I think 10.5 is still being patched by Foundry, and it may be worth supporting for a while as the Nuke 10->11 upgrade is relatively difficult (given the Qt 4-> 5 transition/significant compiler changes/etc)

Masking behaviour of matte nodes odd

When using a matte node with a side mask on a channel set with data in it, results are unexpected. Should smoothly blend between the existing and the generated, but does not. Blends between mask and generated.

OR, if we're including mask combination features, should take care of that.

Implement DeepCCompress node

I see this is planned in the README \o/

We have one internally and it has proven very useful - it has two modes:

  1. Merge by z-depth threshold - the obvious case
  2. A dumb "sample reduction percentage" mode, which merges samples to approximately reduce the count by a given percentage - e.g 50% removes every other sample, 10% would remove every ~10th sample. Can be prone to visual artifacts with certain data, but has proven quite useful particularly for debugging/performance diagnostic reasons

We had also discussed some other features which would have been useful at times:

  1. Option to to merge samples with similar values (e.g merge all samples where the R/G/B values are identical) - most obviously useful for things like ID channels.
  2. Allow combination of these merge options - e.g so you can "merge 50% of the samples which are within 0.1 units", or "merge the samples within 0.00001 in rgba.red and within 1 unit".

adjust DeepCWrapper and DeepCMWrapper

I would like to do some minor adjustment on the wrapper classes.

mainly i want to inject a vector reference into the wrappedPer... methods.
I would need those to apply matrix calculations and colorspace shifts which using all channels of a set.

I have tested and adjusted all other nodes on a local branch building a DeepColorMatrix node. Are there any objections to do such a thing @charlesangus ?

personally i would prefer this approach then having the get the brothers on each perChannel call.

basically it would look like this with the additional sampleColor.

  virtual void wrappedPerSample(
      Box::iterator it,
      size_t sampleNo,
      float alpha,
      DeepPixel deepInPixel,
      float &perSampleData,
      Vector3 &sampleColor
      );

  virtual void wrappedPerChannel(
      const float inputVal,
      float perSampleData,
      Channel z,
      float& outData,
      Vector3& sampleColor
      );

Wiki - Page for Each Node

Each node should have a user guide/manual page on the wiki.

Each page should have:

  • Example image
  • DAG screenshot
  • parameters screenshot
  • how-to guide outlining main parameters/use-cases
  • release version guide is for

Misspelled plugin names in CMakeLists

The following plugins are misspelled in src/CMakeLists.txt, causing the build to fail.

  • DeepCMultiply --> (DeepCPMultiply in CMakeLists)
  • DeepCCopyBBox --> (DeepCCopyBbox in CMakeLists)

Building breaks with Nuke13.1

Seems like the foundry introduced a new functionality on ops called OpHints.

if trying to build and link the current source files, it throws an error and breaks. might needs fixing in the wrapper classes.
would need a solution to be compatible with old and new versions.

error below:

/mnt/data/Apps/nuke/Nuke13.1v1/include/DDImage/OpHints.h: In function ‘constexpr DD::Image::OpHints DD::Image::operator&(DD::Image::OpHints, DD::Image::OpHints)’:
/mnt/data/Apps/nuke/Nuke13.1v1/include/DDImage/OpHints.h:89:19: error: expected type-specifier
         using T = std::underlying_type_t <OpHints>;
         ```

Better release structure

Currently, we're only releasing Linux, so there's no confusion, but presumably once we're releasing for multiple platforms, we'll need zip files named like linux-deepc-11.1v6.zip. Or something.

Implement DeepCAttributeTransfer node

Like a Deep equivalent of Shuffle Copy, but since Deep deals in depth samples as well as pixels, it should probably be a bit more like Houdini's AttributeTransfer node.

Modes I see needing:

  • 2d input for attribute source, distribute new value along samples, basically like a DeepRecolor but handing just a secondary channel (although now I'm thinking of it, Deep Recolor may already be fine for this...).
  • Deep input for attribute source, with tolerance settings for transferring attributes, such as:
    • World radius, based on PWorld attribute
    • Z tolerance, so forward or backward in the same pixel
    • Image-based radius, so within a certain number of pixels in X and Y and likely Z
    • probably also kernels for interpolation, like linear, Gaussian, etc (see what Houdini offers)

Certain nodes not working on CentOS 7.6

The following nodes fail with /lib64/libm.so.6: version 'GLIBC_2.29' not found:

  • DeepCGamma
  • DeepCGrade
  • DeepCPMatte
  • DeepCConstant

This node fails with the similar /lib64/libm.so.6: version 'GLIBC_2.27' not found:

  • DeepCPNoise

The version of CentOS 7.6 I'm using seems to have glibc version 2.17.

@falkhofmann - what was the system the latest release was compiled on? CentOS 7? Which devtoolset version?

Runtime linking issues - GLIBCXX_3.4.21 not found & possible support for GLIBCXX_3.4.19 ?

Hi,

and thanks for open sourcing your work!
I'm trying to build the plugin manually for nuke11.3v4 on Centos 7.7.1908, but our version of /lib64/libstdc++.so.6 only goes up to GLIBCXX_3.4.19, which means I get this error at runtime when trying out the DeepC nodes:

RuntimeError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /my/custom/path/to/plugins/DeepCPNoise.so)

Is there anything specific in your code that needs to be using the GLIBCXX_3.4.21 symbols? I was wondering if somehow the cmake file (and the code, if needed) could be updated to work with a lower version of libstdc++.

Or am I getting this wrong?
I premise I'm not an expert of the cmake and c++ toolchains.
I'm build with cmake using this command, since otherwise FindNuke.cmake didn't see to find nuke:

cmake -DNuke_ROOT=/opt/foundry/nuke-11.3v4 -D CMAKE_INSTALL_PREFIX="`pwd`/../install" ..

Thanks!

Valerio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.