Thread: expression to limit random value betwween 0.9 to 1

Reply to Thread
Results 1 to 3 of 3
  1. #1 expression to limit random value betwween 0.9 to 1 
    Join Date
    May 2006
    Posts
    20
    I want to influence a fade node to flicker slightly. I am trying to write an expression that will generate this by randomly setting the value between 0.9 and 1.

    I know to do this with values of 0 to 1, noise, but I'm stuck when writing this to control the low value.

    I hope this is clear.

    Thanks for your help
    Reply With Quote  

  2. #2  
    Join Date
    Jan 2003
    Posts
    3,135
    What you want to think about is the range and the lowValue....

    So, in your case:

    range = 0.1
    lowVal = 0.9

    To get this, do:

    (noise(time) * range) + lowVal

    (replace "noise(time)" with whatever you want, as long as it is between 0 and 1)
    Hugh Macdonald
    Reply With Quote  

  3. #3  
    Join Date
    May 2006
    Posts
    20
    Perfect, you're a legend. I fall down at the scripting side of shake, really need to delve into it further.

    I think this little script is something I will use often.

    Thanks for the quick response.
    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. Expression based on 3d Distance?
    By scottdf in forum Digital Fusion / DFX+
    Replies: 2
    Last Post: April 18th, 2007, 03:33 AM
  2. shake scripting - limiting random positioning to grid pattern
    By Justin Alvarez in forum Apple Shake
    Replies: 7
    Last Post: March 12th, 2007, 11:57 PM
  3. expression Nuke
    By 5sense in forum NUKE from The Foundry
    Replies: 4
    Last Post: January 3rd, 2007, 10:48 AM
  4. Next Limit releases Maxwell Render OSX Universal Binary Edition
    By VFXTalkDotCom in forum Industry News
    Replies: 0
    Last Post: October 20th, 2006, 09:55 AM
  5. Facial expression using morph and bones
    By harikesh_k in forum Maya
    Replies: 4
    Last Post: August 5th, 2006, 07:18 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