Houdini to Nuke

Relight Volumes in nuke:

Gradient Pass which is more or less a normal pass for volume

To render a  gradient pass

-convert your colume to VDB volume

-Append a VDB Analysis sop

-Set it to analyse the gradient and give it a custom name "Cd"

-It will produce a VDB vector volume called Cd which is the gradient of the volume

-Convert it back to a houdini volume and merge it back with the original density volume

-now we can visualize the Gradient using volume vizualization sop (put density in density field and Cd.* in Diffuse field)

-we can render this using a constant smoke shader and use this a normal pass

-before rendering it we will need to invert the direction of the gradient vector in the shader.


Velocity AOV from Houdini for using vector blur node in Nuke.

Things to make sure before writing a velocity pass.

# First we need to understand how nuke's vector blur is working.

    Each pixel will move certain number of pixels in x and y and this number comes from the motion vector pass  position

for example pixelA having mvpass value of u=5 and v=3 then that pixel will be moved by 5pixels in x and 3 pixels in y.

so in the motion vector pass we should store the distance of the pixel from the current pos to the previous pos (pos here means screen space position)

which will give correct motion blur

getBlurP(1)-getBlurP(0)*cameraResolution

will give the pass usefull for nuke vectorblur node.


Cool displacement export to nuke:

lets say we have to distort the plate in nuke based on some impact its hard to do it in nuke

so we can do that in Houdini and can export the displacement as a map that nuke can understand with that map we can distort the plate.

For ex : we need ripples around the impacts on the water surface

Create a plane for water surface

before simulating the ripples we need to create a Map on the grid for the distortion

put a point wrangle and write this code

@Cd = 0;

v@cpp = toNDC("/obj/cam1",@P);

@Cd.x = @cpp.x;

@Cd.y = @cpp.y;

you can actually do this with a single line  also

@Cd = toNDC("yourcamera",@P);

So what we did is applying a color from camera space

we applied red along X (camera space x which is width of the frame)

and green along Y(camera space y which  is height of the frame)

So what we get should look similar to this below image from the camera view

https://www.highend3d.com/system/photos/000/307/675/307675/original/U_V.jpg?1373432018   (got this image from google)

it should be black at the bottom left corner

now we can simulate the ripple using ripple solver

and export this color to a uv pass ..

In nuke

Use STMAP node to distort your plate using the uv which we exported from houdini