How to put a max number to the frame node?

shanejez's Avatar


11 Aug, 2015 12:50 AM

I am very new to Nodebox, but I feel like I am getting the hang of things -- but I am having trouble creating animations that allow for a variety of sequences/scenes over the course of the animation. I wish there was a node that capped the frame node from continuing to grow past a certain number. (I apologize if I am being silly and somehow there is already a node for this.)

My question:
Is there a way to set up the frame node to an ellipse to make it grow and eventually stop growing? Would this involve a very complex subnetwork? A special equation? Do I need to get smarter and figure this out like an adult?

I included my project below. In the animation, I wish for the circle to stop growing at frame 1,000.

Thank you!
Shane Jezowski

  1. Support Staff 1 Posted by Frederik De Ble... on 11 Aug, 2015 06:48 PM

    Frederik De Bleser's Avatar

    The frame node, by itself, just keeps growing. The trick is to append a node after the frame node to do what you want. I see two possible options:

    • Use a mod (for "modulus") node. Connect frame to the first port (value1). For the second port, use the maximum value you want to use. The mod takes the remainder of the division, and as such, will never be larger than the second value. That means that when the frame reaches zero, the mod node will wrap back to 1.
    • Use a min node. This takes the minimum of a list of values. So if your frame is 1200 and your fixed value is 1000, the minimum will be 1000. Since the min node takes a list, you'll have to build a list first using a number node and a combine node. The screenshot below demonstrates that.

    Of course, for both approaches, you can use the output to do something different: for example, divide that value by 10, or add a certain number, or whatever.

    I've attached a network that shows both approaches.



  2. 2 Posted by shanejez on 12 Aug, 2015 02:36 AM

    shanejez's Avatar


    Thank you for this. It really has helped me get over a bump in the road!

    I really appreciate the prompt response.


  3. Support Staff 3 Posted by john on 15 Aug, 2015 08:19 AM

    john's Avatar

    Dear Shane,

    Welcome to the NodeBox community! I've been here for about six months and have gotten into all sorts of mischief.

    I do a lot of projects with complex, multi-stage animations and along the way I've developed a few techniques to make it easier. Frederick's suggestion of using a Min node is a simple solution to your immediate problem, but there is another node you should know about: Convert Range.

    The Convert Range node takes one range of values and interpolates it into a second range. If you feed it a Frame node, you can use it to precisely control your animations. Set Source Start to the frame you want to begin at and Source End to the frame you want to stop at. Set your Target Start and End to whatever values you need to make your animation do its thing.

    To illustrate my point I made a quick three-part animation similar to your growing dot. I have attached the animation as an MP4 file along with a screenshot and the NodeBox network that made it. The choreography is as follows:

    Frames 1-50: a small dot sits on the screen not moving
    Frames 50-150: the dot swells in size from 10 to 300
    Frames 150-200: a second dot appears to the right and grows to size 30
    Frames 200-220: a brief pause to build suspense
    Frames 220-420: the second dot orbits the first
    Frames 420 on: the show is over

    All of this was done with three Convert Range nodes to define how long each movement lasts. The entire thing was done with only nine nodes. The Convert Range node makes animation a lot easier!

    I look forward to seeing some of your animations in the Show Your Work forum.



  4. 4 Posted by shanejez on 15 Aug, 2015 01:44 PM

    shanejez's Avatar


    This is exactly what I was looking for! ( is what came out from using the MIN node which ended up working out really well, but as you mentioned – it resulted in a very thick bush of nodes (I should have made a subnetwork, but I was a bit too “in the moment” when designing it)

    I will give a new animation a try using this node. Thanks again! Is there a Nodebox area for submitting nodebox made work? I really wish I could see what everyone (such as yourself and Fredrick) are working on.

    Shane Jezowski

  5. Support Staff 5 Posted by john on 17 Aug, 2015 04:42 AM

    john's Avatar


    Glad you found that helpful. I enjoyed your video and also checked out your site. Nice stuff! I think you will have a blast with NodeBox.

    The section next to this one in the NodeBox Forum is called "Show Your Work". That's the place to share your latest creations. You can attach MP4s, screenshots, and ndbx files if you want. I've posted various things there, more to share concepts than show art, but that's just me. It's one of the best ways of learning how to do things. I would post more often if we had a more active community.


  6. Support Staff 6 Posted by lucasnijs on 20 Aug, 2015 06:54 AM

    lucasnijs's Avatar

    Hi John,

    Brilliant solution!


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • Divided.ndbx 4.84 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

25 May, 2024 11:52 AM
24 May, 2024 07:39 AM
16 May, 2024 02:11 AM
16 May, 2024 01:58 AM
14 May, 2024 01:29 AM


13 May, 2024 12:36 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM
03 May, 2024 12:30 AM
03 May, 2024 12:09 AM