Render Center

Patryk's Avatar

Patryk

24 Nov, 2019 12:07 PM

Hi, do you have any way for the project you made to fit in the rendering area? Not to do it manually

  1. Support Staff 1 Posted by john on 24 Nov, 2019 09:56 PM

    john's Avatar

    Hi Patryk,

    Yes, it's easy to center and resize drawings in NodeBox.

    First of all, just in case you weren't already aware, you can redefine the rendering area itself by going to File / Document Properties... and changing the values for canvasHeight and canvasWidth. This defines what gets saved when you export as a PNG, etc.

    To center your drawing just feed the final node into a group node and then an align node (see attached screenshot).

    You can then feed that into a scale node to resize the drawing so that it fits perfectly into the canvas area. When scaling it is sometimes necessary to adjust the line thickness in the colorize node.

    Another option is to hook that group node to a fit_to node. This will translate and resize your drawing to fit any bounded area you wish. Just feed in a rect node to define the bounds and adjust the position and size of that rectangle to your heart's content.

    It's also possible to add some nodes up top to automatically fit the quad curve to any bounding area and then redraw the whole thing from scratch. But I don't think that's necessary in this case.

    One of the joys of NodeBox is getting instant feedback as you adjust the dimensions of a scale node or bounding rect.

    Enjoy!

    John

  2. 2 Posted by Patryk on 26 Nov, 2019 08:33 AM

    Patryk's Avatar

    You are amazing, thank you!

Reply to this discussion

Internal reply

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

Attaching KB article:

»

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

Generic

? 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

01 Oct, 2024 07:59 AM
30 Sep, 2024 11:37 PM
30 Sep, 2024 11:11 AM
30 Sep, 2024 02:37 AM
28 Sep, 2024 10:33 AM

 

26 Sep, 2024 06:41 AM
24 Sep, 2024 12:32 AM
24 Sep, 2024 12:27 AM
13 Sep, 2024 12:07 AM
12 Sep, 2024 11:54 PM
07 Sep, 2024 05:16 AM