Feb 28, 2012

Nuke quick tip: write node with disabled outside of framerange

If you have multiple write nodes in a nuke scene, and want to submit to render all at once, but running on different frame ranges(as their input's framerange), here is a simple expression to put in the write nodes disable knob:
frame < input.first_frame || frame > input.last_frame ? 1 : 0
This way the write node is disabled when current frame is not in the input framgerange. This usually happens to me when converting raw materials for different shots at once.

Feb 27, 2012

Nuke createwritedir script with multiple views

Hi, just jumped into a stereo project, and found that couple things not working properly with nuke. For example the good, ol' createwritedir script, that creates directory before rendering, doesn't handle the '%V' view tag in filenames, so I post here an updated version. This however creates directory for every view, because didn't find a way create them separately, as the script is not called in render for every view, only once.
Here is the code snippet. Sorry for misaligned lines. Anyone knows a better way for displaying code?
 def createWriteDir():  
     import nuke, os  
     import re  
     #view = nuke.thisView()  
     views = nuke.views()  
     file = nuke.filename(nuke.thisNode())  
     dir = os.path.dirname(file)  
     viewdirs = []  
     
     if re.search('%V', dir):    # replacing %V with view name  
         for v in views:  
             viewdirs.append(re.sub('%V', v, dir))  

     if len(viewdirs) == 0:  
         osdir = nuke.callbacks.filenameFilter(dir)  
         if not os.path.isdir(osdir):  
             os.makedirs (osdir)  
     else:  
         for vd in viewdirs:  
             osdir = nuke.callbacks.filenameFilter(vd)  
             if not os.path.isdir(osdir):  
                 os.makedirs (osdir)  
                 print 'Directory (with viewname) created: %s' % (osdir)  
(I edited the script, there was an unnecessary try: except part)

Feb 17, 2012

News: nuke goodie: 3d renderer- nuke connection by J3P

Whoa, second post today! :) But this one really deserves it! Looks like the guys at J3P created a nuke connection to 3d renderers, such as renderman, arnold, etc. Similar to renderman connect. Looks very promising, you can even open .ass files directly in nuke, and read it's content, and even watch the (arnold) rendering in progress, in the nuke viewer.
It's code included in the open-source cortex tools.

Demo video is here.
Feature list:
-Creates a LIVE connection to one OR MORE 3D renderer's/3D package's render stream
-This is NOT a read node loading image passes from disk, it's an open framebuffer
-Start building your comp immediately in Nuke with test render preview framebufers.
-No need to save out images from your 3D package's test render view.
-Launch preview renders from your 3D package directly into a Nuke framebuffer.
-Render exported scenes directly into Nuke framebuffers (Ribs, Arnold, etc...).
-Preview render all AOV's simultaneously and plan which passes you'll need
-Automatically detect all AOVs in scene file -- including custom AOVs
-Turn AOVs on and off *EVEN* if they aren't part of the exported scene file.
-Preview CG elements from different lighters/renderers on same network simultaneously.
-Plan your renders and comps much more efficiently.
-Let lighters know exactly which passes you need before they kick of renders.
-Harness the power of different packages without interrupting workflow.
-Allows for a package agnostic pipeline -- allows lighters to work the way they choose.
-Framebuffers automatically update as soon as a new preview render is kicked off
-Write out comp'd test framebuffers

Latest work: animation for Africa Cup

We created almost 2 minutes long, animated, realistic digital environment for the closing ceremony of the 2012 Football African Cup of Nations. It was projected (with 24 projectors) to a huge area, so the final output size was 6959x2560 pixels! The animation included more than 200 animated (wind blown) trees of specific kinds, a huge waterfall, and a growing big mountain. The work was completed less than 2 months. The animation was created so that it could be looped from a specific point to last longer than 2 minutes. Rendered with Arnold.
Sadly we had very-very little time for compositing, so there are some not so nice parts, but at least we were done in time :)

You can watch here, it starts from 9m 7s, lasts until the gorilla comes in: