So now after finshing a project, using Nuke 6.1 for a long time (months), now we can try 6.2 version of nuke. It has really exciting new features, finally they built python 2.6! (You can think that okay that's not the feature I'd mentioned in the first place! :) It's good, because python 2.6 has official win64 build, and maya2011 is also using 2.6, so the so called scenemanager gui I'm started to develop for nuke, with alteration of course, but without conceptual changes, can be used later on for maya (or houdini). Actually I already coded a scenemanager for maya, but it was scripted in mel. We are using it for opening, saving, referencing scenes, assets, according to our inhouse name convention. Now I'm developing a similar gui for nuke, but this time with pyqt, now python 2.6, and it will be fetching all data from our project database. This will be later adapted for maya (if we had time).
If there's interest, maybe I can share screenshots, concepts, or code snippets/tips as I'm going with the development of the nuke scenemanager. Please comment if you would be interested in that! Thanks,
Gabor
Feb 5, 2011
Jan 30, 2011
Nuke commandline render and python
Happy new year nukers, and non-nukers! First post this year, hopefully many more will follow it.
For the beginning, a little about commandline rendering with nuke, using pythonscript (got the idea from a mailing list post of mine). I mean with nuke you can't only execute a nuke file, but a pythonscript too. Like this:
nuke6.1.exe -x -F 1-30 myscript.py
One can think, that this is useful for creating nodes on the fly, like a read node, a write node, and execute that for converting sequences to another format. That is an option, but you also can open existing scripts and modify them. For this you can use the scriptOpen command. For example, if you have a nuke script called test_v001,nk, make a file called test.py, and write in it:
nuke.scriptOpen("e:\\Projects\\test_v001.nk")
(Replace the path with the path to your nuke file) After this in the .py file you can do modifications on your nukefile. Knob changes etc. And that's it. You can execute with the above mentioned cmdline command:
nuke6.1.exe -x -F 1-30 test.py
There is another option to do that. Slight change, but important, and you can do much more with it than rendering. You can not only execute, but literally open nuke files in command line (terminal) mode, hold it in memory, do changes (blindly) to that. For example I use that for my archiving script, open many nukefiles one by one, collect the used readnodes, and put those in a list etc. So I'm not executing the nukefile, just open it. But if I want I can render it too. I put a line more in the previous test.py file, so it will look like this:
nuke.scriptOpen("e:\\Projects\\test_v001.nk")
#do some modification on knobs if you need
nuke.execute('Write1', 1, 30, 1)
Here I called an execute command at the end of my pythonscript (I must know the name of my writenode)
I will use this script in my commandline command, that is almost the same as before:
nuke6.1.exe -t -F 1-30 test.py
But notice the -t flag! That means the test.py is not executed as a render, but treated as normal a pythonscript, just like if I put that in script editor in nuke. It will render the nukefile anyway, because the execute command in the test.py But as I said the great thing is to have an option to execute python scripts in terminal mode with the nuke interpreter.
For the beginning, a little about commandline rendering with nuke, using pythonscript (got the idea from a mailing list post of mine). I mean with nuke you can't only execute a nuke file, but a pythonscript too. Like this:
nuke6.1.exe -x -F 1-30 myscript.py
One can think, that this is useful for creating nodes on the fly, like a read node, a write node, and execute that for converting sequences to another format. That is an option, but you also can open existing scripts and modify them. For this you can use the scriptOpen command. For example, if you have a nuke script called test_v001,nk, make a file called test.py, and write in it:
nuke.scriptOpen("e:\\Projects\\test_v001.nk")
(Replace the path with the path to your nuke file) After this in the .py file you can do modifications on your nukefile. Knob changes etc. And that's it. You can execute with the above mentioned cmdline command:
nuke6.1.exe -x -F 1-30 test.py
There is another option to do that. Slight change, but important, and you can do much more with it than rendering. You can not only execute, but literally open nuke files in command line (terminal) mode, hold it in memory, do changes (blindly) to that. For example I use that for my archiving script, open many nukefiles one by one, collect the used readnodes, and put those in a list etc. So I'm not executing the nukefile, just open it. But if I want I can render it too. I put a line more in the previous test.py file, so it will look like this:
nuke.scriptOpen("e:\\Projects\\test_v001.nk")
#do some modification on knobs if you need
nuke.execute('Write1', 1, 30, 1)
Here I called an execute command at the end of my pythonscript (I must know the name of my writenode)
I will use this script in my commandline command, that is almost the same as before:
nuke6.1.exe -t -F 1-30 test.py
But notice the -t flag! That means the test.py is not executed as a render, but treated as normal a pythonscript, just like if I put that in script editor in nuke. It will render the nukefile anyway, because the execute command in the test.py But as I said the great thing is to have an option to execute python scripts in terminal mode with the nuke interpreter.
Labels:
commandline,
nuke,
python
Dec 14, 2010
PyQT for nuke - 64bit
Hi, here is a post about compiling pyqt 4 for python 2.5 - 64bit, that is required for current version of nuke (6.1). The next version, 6.2 will come with python 2.6, but until then if you want to use pyqt with 64bit nuke, you have to compile from source, or download from this place as I did. Thanks to Ozgur!
Dec 9, 2010
Nuke-RV integration!
Whoaa, the sneak peek video was out yesterday, and the tools are now downloadable (for free of course)! The developers of RV are really great guys, thank you!
Now you can preview readnodes directly in rv, render to rv, set up checkpoints of your work, create multiple version quickly to review with the sup etc. Check the video here.
Now I really need a second monitor for work :)
Now you can preview readnodes directly in rv, render to rv, set up checkpoints of your work, create multiple version quickly to review with the sup etc. Check the video here.
Now I really need a second monitor for work :)
Nov 19, 2010
New commercial!
Our latest finished work at Digitalapes, the Vilmos commercial is on air now, so you can check it out here.
There is a makingof video too. Hope you like it.
There is a makingof video too. Hope you like it.
Labels:
commercial,
digitalapes,
vilmos,
work
Oct 14, 2010
Extending camera projected image in nuke - quick tip
Imagine this situation: you have a tracked scene, got the camera, using it (on 1 frame) for projecting a mattepaint to a proxy geometry. Then you go on compositing, huge node-tree builds on this projection. And then suddenly you notice (or worse, the sup notices) that on a few frames the matte not covering enough area, needs to be extended. Everything else should remain as is, but you have to paint a good 50pixels more, outside the current mattepaint's format. The problem is: if you scale/translate the matte and paint the needed area, the current projection will crawl away. If you paint using the current format, but outside the image, making the bounding box larger, that will be cropped off by projection, as it is ignoring the bounding box.
The solution is simple: use a reformat before projection, using scale parameter, and link that value to the focal length of the projector camera, using the expression (assuming the original focal length of projection camera was say 25mm):
1/Reformat1.scale*25
Reformat1 is the name of the reformat node before the projection. So when changing the scale value of that node, the proj. camera will change it's fov accordingly. Scale to 1.2, and everything will stay as it was, but extended part will appear, or at least will be in the bounding box. Important: the reformat's resize type knob should be none!
This way the new painted area can be revealed easily. If the camera still cropping the image, try to adjust the overscan parameter in the scanline renderer, as this can crop the image too.
I'm going to make a few images later to illustrate this process.
The solution is simple: use a reformat before projection, using scale parameter, and link that value to the focal length of the projector camera, using the expression (assuming the original focal length of projection camera was say 25mm):
1/Reformat1.scale*25
Reformat1 is the name of the reformat node before the projection. So when changing the scale value of that node, the proj. camera will change it's fov accordingly. Scale to 1.2, and everything will stay as it was, but extended part will appear, or at least will be in the bounding box. Important: the reformat's resize type knob should be none!
This way the new painted area can be revealed easily. If the camera still cropping the image, try to adjust the overscan parameter in the scanline renderer, as this can crop the image too.
I'm going to make a few images later to illustrate this process.
Labels:
nuke,
projection,
tip
Oct 5, 2010
First timelapse
My first timelapse video, I'm really into this kind of photography, so be prepared, more to come...
Cloudy timelapse from Gabor Toth on Vimeo.
Cloudy timelapse from Gabor Toth on Vimeo.
Subscribe to:
Posts (Atom)