rodrigorc / papercraft

Papercraft is a tool to unwrap 3D models.
GNU General Public License v3.0
130 stars 1 forks source link
handcraft papercraft

Papercraft

Introduction

Papercraft is a tool to unwrap paper 3D models, so that you can cut and glue them together and get a real world paper model.

The main purpose of this program is to do the unwrapping, that is, it takes a 3D model as input and outputs a printable document with the pieces to cut. It is not a 3D modelling program. For that I recommend using Blender.

The interface looks like this:

UI

The printable document will look like this (just a piece):

PDF

And the final model is:

Note: the model in the example is based on the Low-Poly Pikachu by Agustin "Flowalistik" Arroyo, published under CC BY-NC-SA 4.0. You can get this Papercraft project from the examples directory, with the same license.

License

This program is published under the GPL-3.0-or-later license. See the LICENSE file for the full text.

Files generated with this program are not affected by this license but by that of the 3D model you use, as it will be a derivative work. If in doubt contact a real lawyer.

If you create any nice paper model, I'd appreciate if you open an issue and send some pictures.

Installation

If you use Windows, this program does not use any installation, you just copy it into a local folder and run it. Just download the latest package from here and uncompress it to your destination folder.

Select the Win32 or Win64 version depending on your particular Windows and preferences. If you do not know which one you need, try both and see what happens.

Then run the program directly by double-clicking or create a shortcut to your desktop.

If you use Linux you can compile it from source (quite easy, really) or use the precompiled AppImage from the releases page. Remember to set the downloaded file to executable, then just run it.

If you use any other OS you can try compiling from source, but I don't know if you will succeed. Let me now either way.

Basic usage

In the left side of the screen there is a 3D view of the model. In the right side there is the current 2D unwrapping.

First of all you need a 3D model. Currently it only understands the Wavefront OBJ format, that is exportable by most (or all) usual 3D editing programs. Just remember that the material definition (textures) of an OBJ file is in a separate file with MTL extension. And the textures themselves, if any, are in separate image files, so if you move the model around remember to move all the dependent files too.

When you load a model into Papercraft it will start with all faces split and distributed around the paper. Before startint cutting you should join them in big pieces and reorder them in the paper.

For that the program has three basic working modes, selectables with the buttons in the toolbar or the Edit menu:

Edge mode

This is probably the most important mode. If you click an open edge, faces to both sides of the edge will snap together. If you click on a closed edge it will split. If the Shift key is pressed while an open edge is clicked, then it will join a whole strip of faces, as long as they are composed of simple quads. This is useful for big meshes that are mostly made of quads and are usually unwrapped as parallel strips.

With this tool you can create the pieces to be cut as big as you want.

Flap mode

In this mode, if you click an open edge the flap will switch to the other side. Press the Shift key while clicking to hide the flap.

Face mode

In this mode you can select and move the pieces in the 2D paper. Press the shift key while dragging to rotate the pieces.

You can also move the pieces in any other mode, but this one disables clicking on edges, making the handling of smaller pieces much easier.

Document properties

In the menu Edit / Document properties you can edit many options related to the document as a whole:

Document properties

Other options

There are a few other options in this program, available from the main menu. These options do the expected thing:

More interesting are the following:

File/Update with new model

If you are unwrapping a model and you realize that there is some part that you don't like, you have to go back to your 3D editing tool and re-export the model file. Then, do you have to start the Papercraft unwrapping from scratch? Of course not! Just use this option to update the current Papercraft projects with an updated 3D model. It will try to keep the current work as much as it can.

File/Export OBJ

Did you import an OBJ model into Papercraft and then lost the original model? No problem, you can re-export the OBJ with this option and then import it in your 3D model software.

Generate Printable

The main purpose of this program is to create a document with the 2D unwrapping of the 3D model. This option does it. Big models with big paper and high resolution may take a while, so be patient.

There are currently three formats for the printable document:

View/Textures

Hides/shows the texture from 3D and 2D views. It may be easier to see the geometry. It will not affect the printable document.

View/3D lines

Hides/shows the lines from the 3D view. It makes the model look nicer.

View/Flaps

Hides/shows the flaps in the 2D view. It may be easier to see the geometry, particularly with small pieces. It will not affect the printable document.

View/X-ray selection

Normally the selected face/piece is shown in the 3D view over the geometry, even if it is hidden behind something. That is to make it easier to find it, but sometimes it may get confusing. This option can be used to disable that behavior.

View/Highlight overlaps

When two pieces overlap, or even one piece overlaps with itself, it may not be obvious. This option will highlight in pink any overlapping pixels. It will also highlight pieces that are outside of the paper, although that is easier to see.

Note that some overlapping in flaps is perfectly acceptable, you just cut through them, but overlapping in real faces is not nice.