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.
Aug 7, 2010
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.
Apr 15, 2010
Loop with offset in nuke
Hi, I just needed to do a loop with offset, on an animation curve. That means that the cycle is continuously increasing or decreasing, depending the value of the first and last key of the loop. In maya, it is called cycle with offset. Unfortunately in nuke there is no option to do that from the menu. I solved this with a custom expression. For this I used 2 custom integer knobs on the node, called "LoopStart", "LoopEnd" (case sensitive!), marking the start and end key of the cycle. Later I will make an option built in the menu, but until that, here is the expression:
curve((((frame-LoopStart)%(LoopEnd-LoopStart))+LoopStart) ) + (floor(((frame-LoopStart)/(LoopEnd-LoopStart))) * (curve(LoopEnd)-(curve(LoopStart))))
How to apply that:
make animation you want to loop. With right click on the node/manage user knobs, make 2 integer knobs called LoopStart and LoopEnd. Set these to the frame of the first and last key of the loop. And then add this expression to the animated knob and that's it.
I made an additional option, because I needed to offset these animations in time many times, so making an extra knob called "TimeOffset", the expressions look like this:
curve((((frame-LoopStart- TimeOffset)%(LoopEnd-LoopStart))+LoopStart) ) + (floor(((frame-LoopStart-TimeOffset)/(LoopEnd-LoopStart))) * (curve(LoopEnd)-(curve(LoopStart))))
This is useful when the readnode is timeoffseted (with a separate node), so link the TimeOffset KNOB, to the timoffset NODE, so you have to adjust it only in 1 place.
With this, I did a lot of medusas floating upwards, each animating differently, but from only one readnode, many timeoffset nodes, and transformgeo nodes.
Hope this will be useful for somebody :)
curve((((frame-LoopStart)%(LoopEnd-LoopStart))+LoopStart) ) + (floor(((frame-LoopStart)/(LoopEnd-LoopStart))) * (curve(LoopEnd)-(curve(LoopStart))))
How to apply that:
make animation you want to loop. With right click on the node/manage user knobs, make 2 integer knobs called LoopStart and LoopEnd. Set these to the frame of the first and last key of the loop. And then add this expression to the animated knob and that's it.
I made an additional option, because I needed to offset these animations in time many times, so making an extra knob called "TimeOffset", the expressions look like this:
curve((((frame-LoopStart- TimeOffset)%(LoopEnd-LoopStart))+LoopStart) ) + (floor(((frame-LoopStart-TimeOffset)/(LoopEnd-LoopStart))) * (curve(LoopEnd)-(curve(LoopStart))))
This is useful when the readnode is timeoffseted (with a separate node), so link the TimeOffset KNOB, to the timoffset NODE, so you have to adjust it only in 1 place.
With this, I did a lot of medusas floating upwards, each animating differently, but from only one readnode, many timeoffset nodes, and transformgeo nodes.
Hope this will be useful for somebody :)
Mar 31, 2010
reloadrange
Ok, long time no post, so here it is: I haven't posted this python script, that is already on creativecrash: glt_reloadrange. Basicly it checks the frame range of the selected readnode, and if it is different that was set in the node, updates it. It useful for example when you start using a 3d rendered sequence, before it is fully rendered. After the 3d render has finished, just select that readnode, and use this script.
Available here:
Available here:
Labels:
nuke
Subscribe to:
Posts (Atom)