Hassan Uriostegui has created a plug-in that would let you use the XYZ and color pass to relight your scene inside Nuke.
1. Introduction
Enabling 3D relighting in compositing stage, allow a great flexibility, to accomplish fine tuning results. In this field several researches was done base in ren -dering “normals” or “point” passes in order to export in ( floating point raw data ) , the world position cor -responding for each pixel to 2D compositing pack -ages.
2. Background
On 2005 “sexy light” shake macro from Jose Fer-nandez de Castro implements expression to simu -late 2.5D lighting using normal passes. ost recently Shervin Shogian from “Image Engine” show us a plugin developed around “District 9” Feature Film, where pixels where plotted in 3D point couds, allow-ing volumetric relighting with built-in Nuke lights and scanline render, based in a color and point pass -es. After that several plugins and techniques were developed enabling point cloud visualization as CG_POINTS, lacking any posibility to render using standar surface rendering.
3. Goal.
This research is an effort to create an open source NDK C++ plugin to bring full 3D surface relighting on
Nuke to VFX community.
4. Technical Approach. Cloudlets.
In order to accomplish this, designing a pipeline where the “point cloud” could be represented by light weight geometry that responds to usal 3D lights and shading. So instead points the system uses cloud -lets.
Cloudlet is a light holder class wich represents a ge-ometry in the world space of a given color . In ab -stract way cloudlets are the atomic elements of a geometry cloud.
Thus, the solutions consists in 2 basic plugins. The first is the actual 3D geometry cloud generator wich takes the “point” and “color” passes, and using a uni-form sampling* driven by a “resolution” UI slider, creates cubes in the corresponding point pass posi -tion and maps in the corresponding vertex colors the color coming from the “color” pass. Additionally if the user is working with 2D footage can select to use the average luma as the depth channel, and adjust magnitud based on corresponding knob.*
float scale = 1.0 / resolution;
for( int x=0; x< (columns*resolution); x++){
for( int y=0; y<(rows*resolution); y++){
The plugin was compiled through xCode IDE using external makefile template. Also a bash script ( de -pending on test script) was writen to allow quick de -ployment to .nuke folder, current software instance killing, and script relaunching to start Nuke with the latest compiled version.
#!/bin/bash
echo “Deploying and lauching on run.nk”
cp -f *.dylib ~/.nuke
pid=$(ps -fe | grep ‘[N]uke6’ | awk ‘{print $2}’)
if [[ -n $pid ]]; then
kill $pid
else
echo “Nuke is dead”
fi
cd ..
cd ..
sleep sleep 10
open run.nk
6. Applications.
Current vesion is realesed with an example script showing how to connect cloudLight ( geometry cloud generator ) and cloudPhong ( surface shader * Phong ) to allow surface relighting, as well as using the color luma to depth feature.
But also the plugin can be used in other passes than the “color” to create new lighting stages.
7. Future development.
This plugin needs to be tested in High-End comput -ers using a very dense geometry cloud in order to prove its accuracy. Several improvements could be done on the sampling algorithm in order to optimize the perceptual results. Also further shaders that take the vertex color information could benefit to the cur -rent system.