Export Paper Model

I’ve just done some big changes.

The most visible one is that there is no more a panel in the Toolbox. All settings have to be adjusted directly when exporting. The “Make Unfoldable” operator is still available. The current state is not final, I will add more sensible controls.

On the other hand, I added a panel to the View settings. Currently, it can visualise tilted quads (those that cannot be exported at all - see my conversation with DavidOne).
But it works rather weirdly: you have to use Make Unfoldable first. It works in all view modes, but does not react to changes on the mesh. It works for the lastly unfolded object, no matter if it is selected. And any transformations to the object cause strange patterns over the surface (some floating point issue, maybe it is specific for my computer).

And, finally, I added the Scale setting, which lets you easily fit the model size as you export it. There is even a warning message if something is too large. Note that this should change too, I am going to let the script divide those big islands into halves as needed.

I synced the changes to hosting at Google, so that you do not have to download from git.

Finally, the script can solve islands that overlap with themselves. The computation takes some time, but the outcome is worth it: finally, I would say the script works. You can get it from Git.
http://img706.imageshack.us/img706/4282/papermodelsplit.png
At a point I will return to this and optimize, but now there are still many more important issues with the script other than it is slow.
In the next few days, I will probably make it split impossibly big islands in this same way.

Then I would like to create a basis of description tags for sticking. There will be a number on each tab and the same number near the corresponding edge. If it will entertain me, these numbers should be user editable, most probably a auto-generated swarm of Text objects.

Hey Addam! Very thank you for the script! It saves a lot of my time! All of my friends do like it too! You’re man! :slight_smile:

Thanks. Works just fine!

Can I ask does this unwarp a cube, so its flat in the viewport, or does the cube stay a 3d cube and it just exports an image of what it would look like were it unwrapped?

It just exports an image.
I didn’t find a reason to flatten it in the viewport. If you have a good one, there’s no technical problem about this. I could make it an option.

EDIT, Just realised why my idea doesnt work, ignore me.

Hi, a few questions:
This script needs version 2.54? I tried working with version 2.55 and the console says something about “geometry” is not defined, or “geometry to G” isn’t valid operation. But I have to admit that for some reason version 2.5 doesn’t detect python 3.1 even tough I have it installed.

Also, I’ve tried using the unfold script that comes with blender 2.49, and it works great for some kind of geometry, but I’ve been trying to make it work unfolding a twisted and squeezed cylinder but it just can’t do it. Any help on this?
Here is the object:
https://sites.google.com/site/bgeatelier/file-holder/cylinder.blend?attredirects=0&d=1

Thanks for waking me up, I didn’t make any updates lately and the API got a few steps ahead. It should work again, if you grab the git version of this script. I use the newest blender from svn, beta 2.55 should work too.

However, there is something terribly wrong with the script. It produces some nets, but perhaps the worst possible. I have not much time today, but I’ll fix it soon.
Then, I will update the file at google hosting too.

The unfold script for blender 2.4x (written by Celeriac) should work reliably, in contrast to the mine. I have written a tutorial about using it, I hope that could help you: Creating Paper Models.

I’m looking forward to see it works :slight_smile:
Its one of the very useful script for me. If you work with some packing design or want just place design to unfolded object from graphics programs.
Would love to see it work with Vectex (vector textur script).
I didn’t read TODO list (so sorry if its doublepost, but in next level it would be great if script could calculate also thickness of paper (like carton or some corrugated cardboard) where it has to offset edges.
Also for visualizations it would by useful have animated unfold (like was in 2.4 version).

(Or have option if you get some unfold object that you can by selecting edge specify angle for final object like Strata has in Enfold 3D CX
http://www.strata.com/products/strata_3d_cx_suite/strata_enfold_3d_cx/ )
that you can see in video on the bottom of that page
http://www.strata.com/solutions/graphic_design/images/enfold_starfolder.flv

(I tried to use your last script and it doesnt work with last r33424 and official 2.55 build. In 2.55 export (from menu) does nothing.
r33424 it shows some error message. Tested on OS X 10.5.8, intel)

Thanks anyway hope to see you soon :slight_smile:

any news about this script? I think it’s really useful. Thanks a lot, and i hope to see more advances soon!! :wink:

I haven’t worked on it lately, unfortunately I can’t spend much time with this now. I only fixed some issues and uploaded my newest version to Google hosting.
However, there is a German called Markus Schulz, who has made some progress with making the output plotter friendly. I haven’t incorporated his changes into the master branch yet, but you can try it from his own repository.

As soon as I have more time, I will try to clean up the addon and have it included in the next official release. I need more feedback, and that’s the only way to get it.

Hi, nice script! I have some problems with it though: if I have a flat plane consisting of some tris/quads, the plane is usually broken apart by the script. Try this for simple test (I’m using blender 2.56 if that matters):

  1. create cube, select all edges, subdivide (optionally convert to tris).
  2. export - this first export is often ok
  3. export again without changing anything - planes are broken apart at some places

I wonder if it could be solved by detecting such planes and not cutting the edges lying inside of the plane or similar optimization. By the way, do you happen to be a member of the czech paper modeling forum too?

hello…this script would be very helpfull for me…but I can,t use it. I download,instal(blender 2.5 beta 55) , enable it in ad ons user preferences,and when I try to unfold defoult cube,there happens nothing. only my mouse cursor change from arrow to some small cross.There doesn,t apper any save document dialog.What should I do?? thanks :slight_smile:

@emu: thank for the script again
Please can you post number of blender release (build) with which script works?
Determine if its mine fault or soft.

In that time there were many API changes and its hard to find it.
2.55 (r32738) - I can activate addon, exporter is on a list, but file browser is not appearing
2.56 (r34764) - script is not on the addon list (script is in addon’s folder of course)

I tried your from 28 Dec and Markus one from 7 and 9 Jan

Thanks for help.

Sorry, people, I’ve had way too much other work to do - hard to believe for me it’s March already! I haven’t written a line in python since January…

Good idea, I put it on the todo list. However, there must be some limit for considering such surfaces “flat”, and it should be user editable. I’m beginning to think about bringing the Toolbox panel back.

I don’t know any, so I am probably not. Which forum do you mean?

I’m sorry about this… the script is terribly outdated. According to my own note, it should work with r33903.
I didn’t follow the api changes lately, but I hope they were nothing crucial. Please, wait some more, I will commit something functional to git, ehm… yet today.
EDIT: Done. A working version should be in the git repository; tested with blender r35312. (there were 10 more commits since I started editing the script?!)

Thank you very much !!! It works !!!
I didn’t want to ask you for update if API is still in a motion (and time all of us is too expensive).
That is why I asked for actual blender version that works with your script. And if you think it’s going to be hard for you to keep script update would be better have this information on the first page to let others in a future to use your great script.

Does it better to continue in conversation on Github (where the project is much better organized for development- features, bugs) or here, that keeps this topic on an eyes of community?

Anyway script does all that I need now.
Only scaling object (because of islands) is totally uncomfortable (but as I read you know about that).
And I’m happy that thickness of paper is on TODO list too.

p.s.: Are you thinking about animated unfold feature (that was in 2.4 version script)?
Or is there any other option to unfold object in a scene? I tried to use Shape Keys (manually rotate faces), but it deforms lenght of edges between Keyed Shapes. Thanks

Well, that depends mostly on the topic. If you want to wake me up, github works better, because I get instant email notification. I like to have my thread bumped here, but direct development questions should be better discussed directly in the repo, I think.

What exactly is this feature good for? It would take quite some time to code, but I can give it a try.

This: papirovemodelarstvi.cz/forum/ Maybe someone there could give you some more feedback? There are a few paper model designers hanging around there, though I don’t know how many use Blender.

@emu: sorry for my late answer for “what animated unfolding can be good for” - animated unfolding can explain or show how some packing design works. how to pack 2D shape to 3D or open it. Other usage is for many “simple” paper designs of invitations cards inside cover that you have to open first. There is too many ways to use it, open flower many simple mechanics animations.

For sure it can be done manually, but if there can be option do it by one click . . .

Have you seen the old script for 2.4? Since now I can’t understand how that works. There is no shape key or armature. Animation is controled by empty, but how about shape? Note: shapekey deforms size, armature is too much work compare to one click in old script (Also I remember if there is really small unprecise in model or bone position, the armature twists model in animation, that is not show in this test, but it happens me often even I’m trying to be precise). That is way I’m asking for this feature

Test of Script for 2.4
[video]http://mond.own.cz/blender/unfold-ask/Script-2.4.avi[/video]
Test ShapeKey, Armature
[video]http://mond.own.cz/blender/unfold-ask/Boxes-Bone%3AShapeKey.avi[/video]

http://mond.own.cz/blender/unfold-ask/Screen%20shot%202011-04-03%20at%2020.28.50.png

Attachments