Thread: Nuke expression to find center of format size

Reply to Thread
Results 1 to 6 of 6
  1. #1 Nuke expression to find center of format size 
    Join Date
    Mar 2009
    Posts
    11
    Hi all,

    I'm currently working on a gizmo that includes a GodRays node. What i want to do is have it so that the "center" parameter in my GodRays node is always in the middle of whatever footage you have piped into it.

    So i was hoping there is some form of expression that can find the vertical and horizontal size of the source and then divide them by 2 to find the center automatically.

    thanks in advance
    Reply With Quote  

  2. #2  
    Join Date
    Oct 2007
    Location
    Los Angeles, CA
    Posts
    2,786
    i don't know the code offhand but wouldn't it be something like root.format/2 on x and y?
    Reply With Quote  

  3. #3  
    Join Date
    Apr 2007
    Location
    Los Angeles
    Posts
    782
    Root is the Nuke scripts format not a nodes.

    [value somenode.width] [value somenode.format.width]
    Reply With Quote  

  4. #4  
    Join Date
    Mar 2009
    Posts
    11
    hi,

    Nathan, whats the deal with the nfx plugins tried to download them today but no dice.

    Anyway thanks for the reply,

    awesome
    Reply With Quote  

  5. #5  
    Join Date
    Sep 2004
    Posts
    1,202
    input.format.w/2
    input.format.h/2

    on the center x y field of your GodRays.
    dg | ••• | imdb
    Reply With Quote  

  6. #6  
    Join Date
    Sep 2006
    Location
    Wellington
    Posts
    232
    if the node itself doesn't change the format (i.e. like a crop node), you can just use "width/2 and height/2, otherwise you need to include the "input." bit like Diogo is suggesting.
    ________
    frank rueter
    compositor / 2D technical director
    www.beingfrank.info
    www.ohufx.com
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Simple Nuke expression help
    By jporter313 in forum NUKE from The Foundry
    Replies: 5
    Last Post: August 26th, 2010, 07:11 PM
  2. Nuke 5.1 v1 Released
    By shot_grable in forum NUKE from The Foundry
    Replies: 36
    Last Post: July 17th, 2010, 01:33 AM
  3. Noob Nuke Expression Question
    By token_kiwi in forum NUKE from The Foundry
    Replies: 3
    Last Post: March 9th, 2009, 06:21 PM
  4. Nuke: How to create an If statement in Nuke's Expression Node
    By Kouseki in forum NUKE from The Foundry
    Replies: 4
    Last Post: October 14th, 2008, 01:04 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts