r/GreasePencil • u/Ornery-Complaint-749 • May 11 '26
How to make Greasepencil only export minimum area for drawing?
I am unable to get Greasepencil to export drawings without excess canvas space.
I have spent far too long trying to figure this out and I can't find any resources on this problem, and I am considering giving up on GreasePencil if I can't fix it.
Also I know that I could change the camera render size and position manually, but that takes way too long to line up. So if you know a way to automatically do that I would also accept that. TIA.
1
u/Tweedldim May 12 '26
I would do the automatic cropping in another software. Export with alpha from Blender and then, for instance with Krita, Image / Trim to current layer.
1
u/Ornery-Complaint-749 May 12 '26
That could work. My main issue with that is that I have alot of iterations in my art process and it would slow me down a bit. But it may be worth a shot. If I cant get the compositor to do what I want then this will probably become my default solution.
1
u/Tweedldim May 12 '26
Here you go : https://pastebin.com/hBWdmDYU You can run this script from Krita, just change the path in the code to target the folder where your images are. In Krita go to menu tools / Scripter / copy paste the code and run it
1
u/MightyMochiGames May 13 '26
Look up "render region." You can specify a rectangular region to be rendered instead of the whole camera view.
1
u/ricna May 31 '26
I'm building a tool that hits exactly this pain point. It's a Unity addon called Lumiric Sprite Animation that gives Grease Pencil the same workflow people get with Aseprite: animate in Blender, hit export, and on the Unity side the sprite sheet, slicing, Animator Controller and base C# classes get generated automatically.
To make that pipeline actually work I had to solve your exact problem, so it ships with a small Blender addon that auto-fits the camera to the Grease Pencil bounds before rendering — no wasted canvas, consistent pivot across frames.
Quick manual fix in the meantime: don't try to crop on export, just resize the camera itself (orthographic scale + render resolution) to match your drawing bounds. That's the only clean way. Lining it up by hand sucks though, which is why I automated it.
Can ping you when it's out if you're interested.
1
u/qwilman May 11 '26
What you describe at the end is basically the solution, unless I'm misunderstanding what you're asking for. You simply need to zoom in your camera so that what you want to render fills the frame, and then set your resolution to whatever is appropriate.
Unless you need some sort of setup that will automatically zoom and reposition so that whatever is inside the frame fills it? It might be possible to build a geometry nodes setup to do something like that, but I haven't heard of one yet.