Hi,
here is s quick solution for having a few different variations of node setups in nuke, without saving different versions. So on a review session with the director sup etc., you don't need to always open/save scripts for considering different versions of color grading etc. You select the nodes need to change, press getNodes button. Then you can store all the knob values for these nodes, maximum in 4 different versions, when pressing set1-4, and these can be restored - what a surprise - with the restore1-4 buttons. Note that this version currently stores these in memory, so these aren't saved with the script. Next version will do that :) And because of this you may not want to have more than 1 preseter node in the script, they can be confused... :)
You can donwload it here
As usual, comments, feedback are welcome!
Gabor
Sep 15, 2010
Aug 30, 2010
Deadline - nuke post job script
We wanted to have an automatic process with deadline, to convert all the 3d renders to exrs with proper compression and autocrop (datawindow) option enabled. Currently I implemented this on linux, and I had to make a little hack to run nuke from shell. I think it's much easier on windows (no permission problems etc.) Usage:
So the main file is a pythonfile, a deadline post job script, the path of this has to be placed in deadline monitor, in the job properties panel. The machine that rendered the last task will "render" this extra task. The file gets data from deadline, like output path, frame range etc. Then it's executing a nuke render, from command line, but the renderable file is not a nuke script, but another python file. It could be a nuke scene, with a read and write node, but I think it's nicer to generate the nodes on the fly, and this way no problem with script paths etc.
So we have 2 python files at this point: a "JobNuke2exr.py" which should be placed in deadline, and "glt_deadlinepostjob.py" which should be reachable by nuke and deadline (that's why I inserted a line with sys.path.append in the first python file, it should be edited). To make it more complex, I had to make an .sh file, (like a .bat on windows) that launches nuke from terminal, with arguments, because the specific deadline command (SpawnProcess) couldn't make this. Of course this .sh file needs also be edited, because it contains the path to nuke executable.
So the first .py calls this .sh, that fires nuke, that renders the other .py! Easy, no? :)
A little thing with the process that has to be solved: currently nuke rendering checkerboards, and not skipping missing frames.
Here you can download the files
I'm sure this whole postprocess can be achieved much easier, but at this point this is working here. Comments, tips are welcome.
Gabor
So the main file is a pythonfile, a deadline post job script, the path of this has to be placed in deadline monitor, in the job properties panel. The machine that rendered the last task will "render" this extra task. The file gets data from deadline, like output path, frame range etc. Then it's executing a nuke render, from command line, but the renderable file is not a nuke script, but another python file. It could be a nuke scene, with a read and write node, but I think it's nicer to generate the nodes on the fly, and this way no problem with script paths etc.
So we have 2 python files at this point: a "JobNuke2exr.py" which should be placed in deadline, and "glt_deadlinepostjob.py" which should be reachable by nuke and deadline (that's why I inserted a line with sys.path.append in the first python file, it should be edited). To make it more complex, I had to make an .sh file, (like a .bat on windows) that launches nuke from terminal, with arguments, because the specific deadline command (SpawnProcess) couldn't make this. Of course this .sh file needs also be edited, because it contains the path to nuke executable.
So the first .py calls this .sh, that fires nuke, that renders the other .py! Easy, no? :)
A little thing with the process that has to be solved: currently nuke rendering checkerboards, and not skipping missing frames.
Here you can download the files
I'm sure this whole postprocess can be achieved much easier, but at this point this is working here. Comments, tips are welcome.
Gabor
Aug 7, 2010
Multiple autosave in nuke
So we had a little dataloss yesterday, some of our nuke files went 0B in size. Checked the autosaves... none existing! What happened (other than file system corrruption or what)? We are working on linux, and the NUKE_TEMP_DIR environment variable was properly set in init.py. But, nuke was started as a simple user, and that dir can be written only by root. At least this is my idea. That's about it, but I started to think where and how to place autosaves properly. We now having them in /home/user/Nuke/autosaves folder. Another question is how to preserve the autosave files? Because nuke deletes them as soon as the scene is saved, but we need them to stay, for these occasional dataloss events.
I found a tip in the mailing list, to include the current date, time in the autosaved filename:
/autosaves/[date %y]-[date %m]-[date %d]_[date %H]-[date %M]_[file tail [value root.name]]
But this is too long, and can get infinite number of autosaves.
So another tip: include only the current minute, so it starts again in the next hour, maximum of 60 file (for 1 scenefile, if you save a new version there can be another 60!)
[file rootname [value root.name]]-[date %M].nk.autosave
it gives path like (when for example the current time in minute is 15):
w:/Projects/Test/AutosaveTest/AutosaveTest_v001-15.nk
But that is still to much files.
How can it be reduced? I could include a modulo (%) operator to limit the number of minutes, like %6 gives only 0-5. It's great, but think. When minute is 01, it writes in the fileneme 01. When 02, 02 and so on, and when 06, it starts from the beginning. It would be better to have 1 autosave filename in the first 5 minutes (continuously overwritten), then another in the next 5 minutes, and so on. So in half an hour you still would have the first file, and that gives a good chance to go back if something went wrong. This can be achieved, by an expression like this:
[file rootname [value root.name]]-[expr int ([expr [date %M]%30]/5)].nk.autosave
Let's look at this from closer! The first part (before the "-") is simply gives back the file path, but without extension, so we can put anything after this. The second part can be understood from inside the date part: [date %M] is the minute of current time (That's going 0-59). Outside there is an expr(ession) command for the modulo (%30) operation, that gives the remaining of current minute and 30, with this we modified the range to 0-29. Then comes "/5", notice the brackets, so range is 0-5.8. Then the "expr int" takes only the integer of this. The final range is 0-5 integer only. This is pasted after the filename.
Now this expression makes a "filename-0" file when current minute is between 0-4, then "filename-1" when minutes 5-9... and at 30 it starts from the beginning, overwriting the "filename-0". There can be maximum of 6 files, for 1 version. But remember if you save the script (ctrl-s) the last autosave will be deleted!
I hope this will be useful for someone. Modify as you need.
I found a tip in the mailing list, to include the current date, time in the autosaved filename:
/autosaves/[date %y]-[date %m]-[date %d]_[date %H]-[date %M]_[file tail [value root.name]]
But this is too long, and can get infinite number of autosaves.
So another tip: include only the current minute, so it starts again in the next hour, maximum of 60 file (for 1 scenefile, if you save a new version there can be another 60!)
[file rootname [value root.name]]-[date %M].nk.autosave
it gives path like (when for example the current time in minute is 15):
w:/Projects/Test/AutosaveTest/AutosaveTest_v001-15.nk
But that is still to much files.
How can it be reduced? I could include a modulo (%) operator to limit the number of minutes, like %6 gives only 0-5. It's great, but think. When minute is 01, it writes in the fileneme 01. When 02, 02 and so on, and when 06, it starts from the beginning. It would be better to have 1 autosave filename in the first 5 minutes (continuously overwritten), then another in the next 5 minutes, and so on. So in half an hour you still would have the first file, and that gives a good chance to go back if something went wrong. This can be achieved, by an expression like this:
[file rootname [value root.name]]-[expr int ([expr [date %M]%30]/5)].nk.autosave
Let's look at this from closer! The first part (before the "-") is simply gives back the file path, but without extension, so we can put anything after this. The second part can be understood from inside the date part: [date %M] is the minute of current time (That's going 0-59). Outside there is an expr(ession) command for the modulo (%30) operation, that gives the remaining of current minute and 30, with this we modified the range to 0-29. Then comes "/5", notice the brackets, so range is 0-5.8. Then the "expr int" takes only the integer of this. The final range is 0-5 integer only. This is pasted after the filename.
Now this expression makes a "filename-0" file when current minute is between 0-4, then "filename-1" when minutes 5-9... and at 30 it starts from the beginning, overwriting the "filename-0". There can be maximum of 6 files, for 1 version. But remember if you save the script (ctrl-s) the last autosave will be deleted!
I hope this will be useful for someone. Modify as you need.
Aug 5, 2010
Jul 18, 2010
Heavy nuke scenes 2
In quite a complex scene, that I mentioned in previous post, where environment is fully built from mattepaints, in around 60-70 layer, and a number of these is 6000*8000 or higher in resolution, memory handling is quite crucial. And the more effect, correction, masking is made on these big mattepaints, the memory quickly can go up high. So what I did is after getting good feedback (from sup) on these big layers, I always saved them with all color corrections, and masking to a new exr file (with autocrop if which is a nice thing). But left the replaced branch of nodes in the script, if later have to change it. Of course you can't save animated nodes to a single exr, but that's life.
Labels:
nuke
Jul 16, 2010
Heavy nuke scenes 1
Few words about heavy scene management.
Working on Going Postal I had the opportunity to work with very large scenes, especially the opening sequence.
The main experience: if possible, break up shots/scenes into smaller pieces! In this movie I wanted to see in some aspects the boundaries of 3d in nuke, so I decided to handle my quite complicated shot in one nuke scene. It involved a three matchmoved greenscreen shot, and a matte painted multiple projected full city establisher, connected with a quick moving cameras (and those motion's blended seamlessly) above a large scale terrain, with constantly changing lighting condition, from daylight to sunset, in a multiple piece 3d projected environment.
Ok, it sounds bad, and it was bad. The result... not so bad, but could have been better :) But it was a really great experience with nuke. Of course, it could have been done in 3d, but the 3d department was full of work, so I did it completely in nuke (not counting of course the mattepaints, and matchmoves)
I don't want to write a whole essay about it, so I just write my thought as quick tips, or guidelines.
Working on Going Postal I had the opportunity to work with very large scenes, especially the opening sequence.
The main experience: if possible, break up shots/scenes into smaller pieces! In this movie I wanted to see in some aspects the boundaries of 3d in nuke, so I decided to handle my quite complicated shot in one nuke scene. It involved a three matchmoved greenscreen shot, and a matte painted multiple projected full city establisher, connected with a quick moving cameras (and those motion's blended seamlessly) above a large scale terrain, with constantly changing lighting condition, from daylight to sunset, in a multiple piece 3d projected environment.
Ok, it sounds bad, and it was bad. The result... not so bad, but could have been better :) But it was a really great experience with nuke. Of course, it could have been done in 3d, but the 3d department was full of work, so I did it completely in nuke (not counting of course the mattepaints, and matchmoves)
I don't want to write a whole essay about it, so I just write my thought as quick tips, or guidelines.
Labels:
nuke
Jun 16, 2010
Firefox crashes
Hi, just a quick note. I'm using firefox 3.5.9, on xp sp2, 32bit. I encountered occasional crashes, that was really annoying. So I tracked down which extension could do this. So first type of crashes was on google searches, this was caused by xmarks, especially the siteinfo feature. If this was turned off, it didn't crash. Second type of crash was with particular sites, like linkedin.com, this was caused by AVG safe search. I hope this helps for someone.
Subscribe to:
Posts (Atom)