Shake tip mond… uh… tuesday - Fixing crashing quickpaint nodes
(I’m having some trouble getting this post formatted correctly… apologies if it doesn’t look right - it’ll be keeping changing until it looks good…)
I’ve been away all weekend (plus monday) so I was ‘unavailable’ to post yesterday (if you count being on a boat on a canal all day as ‘unavailable’, anyway…
I promised some Shake tips/tutorials every monday, so, for the moment, let’s just call today monday.
While I get some ideas together for these, I’ll post a couple of that I’ve written out before, so apologies to anyone who’s come over from VFXTalk.com who will have seen this one before…
When you use a QuickPaint node, try not to have too many strokes in the same node. If possible, keep it below 100, and you should never have any problems with it.
If you do have a node with a ridiculous number of strokes in it, and Shake gives a Segmentation Fault when you load the script, all is not lost….
Here’s what you do:
- Open the script in a text editor
- Find your biggest QuickPaint node (searching for “QuickPaint(” will give you the nodes)
- Each string of ASCII characters is one stroke in your paint node. What we’re going to do is split this node up into two.
- Copy the whole of this line up until the first long string of characters.
- Scroll down, and find a point about halfway through the long list of strings.
- What we’re going to do is leave everything in the first half of the node in the node, and make a new node after this with everything from the second half.
- Paste in the start of the node between two long string of characters, like so:
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
QuickPaint1 = QuickPaint(SwitchMatte1, 0, “v1.11″, 1, 1, 1, 1,
1, 20, 30, 1, 1, 100, 0, JSplineV(x,1,0@0,1@1), 0.2, 1,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,Currently this will chuck up an error - you need to make sure the previous node is ‘finished’ in the script - at the moment, it hits the new node while still thinking that it’s inside another node.
- So, the line BEFORE your new node starts, replace the “,” at the end with “);”
- The last thing we need to do is give our new QuickPaint node a new name - replace the QuickPaint1 (before the “=”) with a name that you know won’t be anywhere else in the script.
- This section should now look like:
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”);
QuickPaint1_SECOND_HALF = QuickPaint(SwitchMatte1, 0, “v1.11″, 1, 1, 1, 1,
1, 20, 30, 1, 1, 100, 0, JSplineV(x,1,0@0,1@1), 0.2, 1,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
This will start with something like:
QuickPaint1 = QuickPaint(SwitchMatte1, 0, “v1.11″, 1, 1, 1, 1,
1, 20, 30, 1, 1, 100, 0, JSplineV(x,1,0@0,1@1), 0.2, 1, “<long string of ASCII characters>”,
“<long string of ASCII characters>”,
“<long string of ASCII characters>”,
And it should load up into Shake. You’ll find the first half still connected where it used to be, and the second half coming off the same node. Place the second half after the first in the tree, and it should work just as it did before.
The last time I fixed one of these, the original node had over 5000 strokes in. When we cut it down to about 2600 in each, it worked fine. I’d still recommend that nobody ever gets to the stage where they have this many strokes in one node!
On a kinda similar note, the same problem can strike when you have multiple shapes in one RotoShape node - I would suggest never having more than one shape in each RotoShape node.
Hopefully this will be helpful to some of you - I know a lot of people who have suffered from this kind of thing, and have put it down to a bug in Shake and then gone back to and old version and re-done all of the work.
If you’ve got anything else you’d like me to put together something on, then please to mention it… If I can help, I will…