Affichage des articles dont le libellé est camera. Afficher tous les articles
Affichage des articles dont le libellé est camera. Afficher tous les articles

mardi 26 janvier 2016

Tools in bulk

I drop here some tools without much explication, there is not much to say about it, but it can be useful !

Fake occlusion :


A little gizmo allowing to reproduce something like a occlusion with two position passes:


http://www.nukepedia.com/gizmos/3d/fake-occlusion


Smooth cam :

Little script to smooth a cam using integral


Multi nukescript render :

Useful script that allows you to render several write, even if they are not from the same script.

dimanche 24 janvier 2016

Convert Normal Pass Between World and Camera



http://www.nukepedia.com/gizmos/3d/cfakepathconvert_normal

Let's talk about Normals !

Normals are vectors that indicate a face direction compared to a original vector (the camera or the world)

To change this origin from the camera to the world or the other way arround. We have to use an rotation matrice.

For that, the node "color matrix" used with the three first column of the Camera World Matrix does the work pretty well !

But there is one thing, this method doesn't compute the focal length !
So here is my trick :

I use three cameras with three different orientations : X, Y and Z :


This three cameras are shooting a sphere (parented to cam) to get the reference normals for every axis. This way, the reference takes the focal length in consideration.

Then, for each axis, I do a scalar product with a merge expression between the original normal passe and the reference normal passe I got shooting the sphere.


I copy the 3 result in a new passe, and I got the converted normals.

For the facing ratio, it's the Z (or the blue) of the camera normals. :)

dimanche 29 novembre 2015

Unlimited Camera Transition



http://www.nukepedia.com/gizmos/3d/fusioncam

This is actually the first interesting script I've done in nuke.
I wanted to improve the common expression used to make a camera transition :

1-sliderValue*Camera1.translate + sliderValue*Camera2.translate

In order to use it with an unlimited amount of camera, I modified a switch node : easy way to have an unlimited number of input branches.

Then the expression goes like this (gizmo is the created switch node) :

(1 - sliderValue - int(sliderValue)) * gizmo.input(int(sliderValue)).translate +
(sliderValue - int(sliderValue)) * gizmo.input(int(sliderValue) + 1).translate

Substracting the sliderValue converted in int conforms the sliderValue between 0 and 1, then the expression works the same but instead of Camera1 and Camera2, we have Camera(int(sliderValue)) et Camera(int(sliderValue) + 1) 

This expression doesn't work when sliderValue = int(sliderValue) so I had to add an exception :
if sliderValue == int(sliderValue) : gizmo.input(int(sliderValue)).translate

I'm not using the real nuke tcl syntax in order to explain it. You can find the full expression in the gizmo.

If you have any trouble installing, using or understanding this tool, please ask. I'll be very happy to help !