Grease Pencil Max script


Hi Guys

Anyone interested in writing a ‘Grease Pencil Script’ like the one Maya has called the 'poor man’s grease pencil’, or something. Brilliant for roughing out Poses and your Lines of Action before animating. Pixar also used its own version for the incredible’s.

This will be brilliant!



Yup I’ll take a look at it.


i don´t have any expirience with maya, could u discripe it a little bit more??
greetz TGM


You can write to the screen in Max with gw but I have never had good luck with it. If I remember right MEL had a bit better hendling on this. Bobo might correct me on this as I haven’t tried using it in Max 7 or 8 but I know that my scripts that I set up in Max 6 still don’t work overly well.

Any clue as to what the tool in Maya that you are using does? Does it draw open GL renders to the screen?


Jason Schleiffer wrote that tool. It uses Maya’s pencil tool (to draw lines as objects) and links it to a frame number. You can then edit what drawing corresponds to what framenumber.

It sure would be handy to have in MAX. I was about to mail Autodesk the other day with some suggestions to ease up MAX as an animator’s tool and the grease pencil was one of them.

Maybe Bobo or Jason can join in on the conversation??


Hey how about that I have it working. It isn’t drawing at my mouse yet which is odd as it is only in the screen Y axis that it is backwards. Very cool. I’ll post it if I get it all working.


Sounds cool, man! I invited Jason, hope he drops around. Bobo had his PM list full, so couldn’t invite him.

Keep us posted, Paul!


Well here it is…

Drop in the macro in 3dsMax8\UI\macroScripts and add it to your fav quad, button bar or menu and have fun.


Oh sorry John:( I beat you to it.


Don’t worry about it Paul - i’m getting used to it :wink:


This is my first test:

This one paints strokes to the viewport while in selection mode (which might be a bad idea, but I wanted to keep the interactivity of the scene behind it). So you should go to Paint Selection mode (the last in the selection tool flyout, or press Q multiple times).

You can set any color, use colors from the preset palette, delete all strokes or delete the last stroke. The drawing is registered as redraw view callback, too, so after you stop drawing, you can pan/zoom/orbit or work on your objects and the drawing will persist as long as the tool is open.

If you close the tool and open it again, the last drawing will be shown again and you can continue drawing. The data will be saved with the MAX file, so you can open a file, start the tool and continue working.

Options to delete a specific (not just the last) stroke could be added later. Same with changing the color of an existing stroke.

Next will be storing a painting per frame, onion skinning and animation playback…


Geezzz, show me up or what:S I guess I got what was comming to me eh John?

Thanks bobo. I will learn alot form this as I didn’t know you could do any of that.


Bobo, the whole selection thing is a bit of a pain. Interesting how you are going about this. Just how are you able to orbit view ports and not loose the drawing, what are you doing different then mine?


I think I see. You are saving the array of lines to persistent data and then redrawing them. Very cool. Please let me know if I’m on the right track. The selection mode drives me nuts but very cool.


Heya folks, thanks for the invite! :slight_smile:

the script for maya that I wrote is a pretty nasty hack… basically I’m creating nurbs planes which are parented to the camera that are made “live” which can be drawn on with a curve tool.

So when you add a “draw frame”, it creates a nurbs plane, parents it to the camera, sets it live, and then puts you in the pencil tool.

The nifty bit, though, is making it so onion skinning works (just templating the previous and next frames) and allowing you to modify the timing of your animation quickly by moving keys around in the text scroll list.

Also, having layers of drawings is incredibly helpful…

I’d like to add line width and color in the future. :slight_smile:


From what I understand, the really cool thing about the Disney version of this tool is that you can draw over a chain of bones and the bones will align themselves, as much as possible, to the line. So, for example, you have a spine setup with a few bones in a chain, or a some tentacles or a tail, and you draw on the viewport, the bones will rotate to match the curve. I’m guessing you’d have to draw in at least two viewports, like the front and side, to rotate the bone chain in three dimensions.

How’s that for a challenge? :slight_smile:


Thanks for dropping in Jason. That does sound a bit of a hack but hey if it works. We are doing it in Max by drawing to the viewport and not creating geometry. I havn’t looked at line thickness or transparency but that could be interesting but I don’t know if it can be done with this method.

I’m sure Bobo will find a way though.


I changed it so it freezes all objects when you enter the pencil mode, so you don’t select anything accidently. With “show frozen in gray” enabled, of course…

Here is the latest version with:

*Support of drawings per frame (relative to the first frame in the segment)
*Frame Offset to define the start frame or shift the animation
*Onion Skinning (currently up to 5 frames) with user-defined color reduction per layer
*Copying of a whole frame to the next frame
*Instancing (!) of a whole frame to the next frame - drawing in either frame will update both
*Deleting a specified stroke - if the current stroke > 0, it will be shown in the Onion Skin color reduction factor
*Copying a specified stroke to the next frame - using the same number as above
*Changing the color of a selected stroke - using the same number as above
*Deleting one frame or all frames
*Deleting Last Stroke is still there as a quick undo.

I also added << and >> buttons for quickly sliding in time. Hold Shift to jump to first/last frame of the segment.

Same place, same file.


I’d love to do it by drawing directly into an imageplane & saving the files as images… but maya doesn’t have the ability to do that right now, or at least I can’t figure out how to get it to. :slight_smile:

the nice thing about doing it as geometry, however, is that it saves with the file & you can export it & bring it into other files, too. :slight_smile:


sounds impressive, bobo! :slight_smile:

wish I had max so I could try it out! haha :slight_smile: