Freehand in presentation mode
I am encountering a problem in NodeBox 3.
I have made a drawing tool that uses a freehand node as data input.
I am recording my screen while drawing and I'd like to avoid seeing the
freehand handles (a small grey circle, like a cursor, that appears where I draw).
If I deselect the "handles" option from nodeBox however, freehand will not draw.
At the same time, if I access presentation mode, the handles are not there but
I cannot draw anything.
Is there anything I am doing wrong?
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by john on 17 Apr, 2015 08:56 AM
I hadn't noticed this before, but you're right: freehand only seems to work when handles are enabled.
This seems to be a hardwired NodeBox behavior, so I don't see any easy fix unless the program can be updated. However, I do have a workaround that might work for you.
With just a few nodes you can capture the path created by the freehand tool and redraw it using the frame node. This creates an animation that you can export to an MP4 file. That video animation will not show the cursor!
I have attached an example of this technique with the NodeBox file, a screenshot, and an MP# recording of a drawn heart.
To capture the path created by the freehand tool I attached a lookup with the key set to "points". I then used the Metadata dialog for the lookup node to change its setting (output) from value to list. This list feeds into a slice node which uses the frame counter to create increasingly larger slices of that list which I then draw using a connect node.
Here is how to use this example to redraw whatever you want:
1. Double click on the freehand node to render it. Clear the screen if necessary.
2. Draw whatever you want.
3. Double click on the connect node to render that. Screen should clear.
4. At bottom of window hit rewind to make sure you are starting on frame 1
5. Hit play. You should now see your drawing redrawn before your eyes.
6. Double click on the count node and notice the number displayed in the upper left corner of the view window. This is the number of frames you will need for your movie.
7. Double click on the connect node again so that it will render for your movie.
8. Choose Export Movie... from the File menu.
9. Choose a file name and enter the total number of frames from step 6
10. Hit the Export button. You will soon have a cursor free animation!
This is just a simple example, but the basic technique should work for you. Instead of simply redrawing the freehand path, you can use the data from the freehand path to draw whatever you want and then replay the whole thing. As an added bonus, NodeBox's export movie feature produces extremely compact MP4 files, MUCH smaller than anything made by a screencast recording.
Note: this simple example assumes you are drawing a single connected path. If you need to lift your mouse and draw multiple paths you will either have to add logic to detect multiple "contours" (maybe by noticing larger than usual jumps in the path) or find some other way of combining multiple redraws.
I set the document size to 500x500 to create a small sample movie. Reset document size (Document Properties under the File menu) to whatever frame size you want for your movie.
Hope you find it useful. The rest of us may also find situations where this technique could come in handy.
P.S. I will be offline for the next few weeks so will not be able to respond further till I return. Have fun without me fellow NodeBoxers!
Support Staff 2 Posted by Stefan Gabriels on 20 Apr, 2015 01:29 PM
Hi, currently when the handles checkbox is unchecked handles stop functioning, but going over the nodes there doesn't seem to be a good reason why this should be the case. I'm going to change this so that in the next release, unchecked will take on the meaning of functioning but invisible handles.
As for not functioning in full screen mode, this is definitely a bug and will be fixed as well. Thanks for the feedback!
3 Posted by Francesco Tacch... on 20 Apr, 2015 02:15 PM
@John: Thank you for the feedback. I tried what you suggested and it works nicely, as long as I don't lift the mouse, as you say.
I do need to lift it, so my idea was to make a subnetwork that calculates the distance between the last point I drew and the one before the last, and then returns a true or false value if that distance is larger than a custom small amount I set. That effectively checks if I have lift the mouse or not while drawing my path.
I use true and false as units 0 and 1 when drawing the strokeWidth of my path, but as soon as I draw the second point of my "second" path the whole path gets connected once again: the last point of my "first" path connects to the first point of my "second" path.
I should check if a value is false, and if so, store the points separately and draw them on a new path until a new false value is found. Not quite sure how...
@Stefan: nice to hear, looking forward to the next release.
I also have a quick ( = shitty) fix that might work in my case: can I change the colour of that handle element to be the same as the default background colour of nodeBox canvas? I tried to look into the files but cannot find the bit that deals with it.
Support Staff 4 Posted by john on 24 Apr, 2015 02:34 AM
Instead of changing background color of NodeBox you can make a large rectangle, color it the same as the handle, and place that rectangle under everything else (connect it first in a combine node).
John (from the middle of the Atlantic!)
5 Posted by Francesco Tacch... on 24 Apr, 2015 11:49 AM
That was my first thought, however the background (128) is a bit too dark, hence me asking to change the handles element's colour.