sidebar features
sidebar content

Go Back   Blender Artists Forums > Support > Tutorials

Reply
 
Thread Tools
emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
Blender comes with a script called Unfold. It can easily turn mesh into a flat net, without deforming any faces. What is it good for?

If you use some more tricks around and are not afraid of mat-knife, you can have all your blends staying in front of you on the table. All you need is a printer, a good glue, two hands and blender (blender is almighty!).

I've made three models yet - the Suzanne (topic here), post appocalyptic tank (topic here) (Alltaken made that model, but he released it under CC here) and a spaceship, the topic is here. It is a simple spaceship without any interesting ideas, because I made it mainly for needs of this tutorial.
You can get the .blend file here.
Two renders:
Click image for larger version

Name:	slepovanka-1.png
Views:	714
Size:	146.6 KB
ID:	23725Click image for larger version

Name:	slepovanka-top.png
Views:	593
Size:	222.4 KB
ID:	23726

And a photo: (camera made it blue, not the printer)
Click image for larger version

Name:	slepovanka-fotka1.png
Views:	3209
Size:	236.5 KB
ID:	23724
So, let's start!

First, we need a model.
You can choose any, but it's obvious that paper model has some limitations. It is hard to make thin pieces, but it is possible (toothpicks or spaghetti can help). You shouldn't choose too complex model (but we are going to simplify it nevertheless). And mechanical, sharp models will (of course) look more natural than the organic.
Then you have to fix the lighting.
It has to be even, because you don't live (sorry if you do) in absolutely diffuse light. Your light setup will be made by the window in you room this time. It would look weird if the model would be enlightened by a (virtual) light source and the rest of your table would not ;)
Ambient Occlusion is really good for our purposes.
Make a low-poly mesh that will look likely as the original model.
That will be the mesh that you are actually going to make. It would last years to cut and stick together a normal model. When I say low-poly, I mean something less than 200 faces. But it's up to you to choose the face count ;)
How should it look like? Look at my ship:
Click image for larger version

Name:	slepovanka-scr.png
Views:	789
Size:	122.9 KB
ID:	23728Click image for larger version

Name:	slepovanka-scr-kostra.png
Views:	475
Size:	38.3 KB
ID:	23729
Keep on mind that all quads must be flat. You can flatten a quad using Scale in Normal Z axis to zero, or you can just change it to triangles by Ctrl+T. Triangles are no harder to work with.
Also, not suprisingly, faces shouldn't intersect. But after all, this can be solved with a knife cut - either virtual or real.

Important: Make sure that this object's scale is 1. To do so, go to Object mode, select it and press Ctrl+A. Otherwise the printed model could be stretched in one direction.
Mark seams.
That is not necessary, but it gives you more control over the unfold script, because you can choose where the mesh is to be divided. The model can be easier to make when you select the right seams.
Divide it apart.
Some models are simply made from more - nearly independent - parts, and the spaceship is a good example. There is a main part, two pieces of something on the sides and two... eh, wings that connect it altogether. All of the parts are simple, convex, and seem to be easy to work with.
It was different when I was making the tank. I had to separate the main body in about 10 parts - usually it is easier to make small pieces and stick them together than work with one big piece. And a more important reason is that too complex meshes can't be unfolded - you have to look at them and split them manually into reasonable parts.
Before you unfold the mesh, you have to separate all submeshes.
It is called Separate all loose parts (PKEY). Unfold script just can manage only a mesh that has all faces connected together.
Important: Before you start unfolding the mesh, remove double vertices (edit mode: select all, Ctrl+V, Remove Doubles) and recalculate normals outside (edit mode: select all, Ctrl+N).

Go on! Unfold it!
It will help to open one Script window before you start. Unfold is in Scripts > Mesh > Unfold. Unfortunately, the script is a bit hard to use correctly. Do this for every one part of your model you need to unfold:
  1. Select the part, go to Edit mode and click the "Unfold" button;
  2. go to Object mode and click the "uv" button.
If unfolding fails (try it at least 10 times), go to UV/image editor and look at the UVs. It can help you to find where the problem actually is. If you find out, divide the mesh and unfold the parts separately. If you don't, you have to guess where it could be :)

Does it show a message "Python script error: Check console" when you are trying to run the script? Probably you don't have python installed. You can download it from http://python.org.

The unfold script always creates one more object - a flat grid. Don't mind about that and simply delete all of those, they're pretty useless. All we will need is saved in UV layout of the unfolded mesh(es).

Join all the meshes.
It will give you a mess of UVs.
To clean it up, easiest is to use the Pack Islands tool (ctrl+P).

If you would want to resize the UVs, only all at one time!

The UV layout of the ship looks like this:
Click image for larger version

Name:	slepovanka-scr-uv2.png
Views:	751
Size:	27.0 KB
ID:	23727

Before you bake the texture, you'll need an image to bake it to. Simply select all the UVs and in the UV/Image Editor menu use Image -> New.
............................................
Since I've got an interesting signature, I don't have to write interesting posts.

Last edited by emu; 12-Dec-09 at 09:41.
#1   Old 20-Jul-07, 15:26   
Reply With Quote


emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
So, let's bake the base model on the low-poly one. From version 2.46, this is a simple task:
Select first all the high-poly parts and then the simple low-poly model (so that they're all selected and the low-poly is the active one). Go to render buttons and find the Bake toolbox. Turn on the buttons 'Selected to Active' and 'Full render'. Then, when you hit BAKE, it all renders and finishes.
Look in the UV/image editor. If everything went OK, you should have an image with the whole model baked. [indent]If you kept a copy of the low-poly model, you can look how is the paper model going to look like: in 3D window, select it, press the / key on numpad and ALT+ZKEY to see the texture. Then press / again to continue.

If the image seems to be allright, create a new one with a much higher resolution - at least 1500x1500. This will be the final image. Bake it in the same way how you baked the previous one. It can take a long time.

Save the image and save UV face layout.
The layout will show you where to cut/fold the paper. I save it as SVG and then open the both images in Inkscape.
Set the resolution of UV face layout the same as the image's resolution, it would be complicated to mix the images otherwise.
Prepare it for the printer.
At first, open both the baked image and SVG face layout in your favorite vector editor (hint: Inkscape). The face layout should be visible over the image and they should be placed accurately to fit to each other.
You will probably want to edit the lines' thickness, color or opacity.
Export the whole page as PNG.

Open that image in Gimp and open (at least, maybe more) one new A4-preset image. Then put all the parts from the baked image to the A4 to fit it the best. Again, you may scale the original image, but only as a whole.
Try to imagine if the size of the model is big enough to work with (depending just on how precise your hands are), sensitively resizing all the parts and possibly adding more sheets (new A4 images).
Here is the spaceship prepared for print, if you want it:

Sorry that it's a low resolution, but I had to scale it down for my printer - it reports "lack of memory" for big images.

Go on! Print it!
Unfortunately it's only up on you to draw the little sticking areas around, and it is necessary. You can keep them around the whole model and then cut them off with scissors if some of them are not needed.
But it is hard to stick the model when they are missing - you would have to take a piece of paper and stick it from the back side.
A bit of tips for the remaining work:
  • Print on hard paper if your printer can handle it.
  • Use a mat-knife instead of the scissors.
  • Cut the folds with the knife slightly (but not too much - do not cut them off!) before you start.
  • Use a really good glue.
I'd love to see your creations!

All critics / questions are welcome.
............................................
Since I've got an interesting signature, I don't have to write interesting posts.

Last edited by emu; 11-Dec-09 at 21:17.
#2   Old 20-Jul-07, 18:54   
Reply With Quote
NEENJA's Avatar
NEENJA NEENJA is offline
Member
 
Join Date: Apr 2007
Posts: 60
Amazing. I cannot wait to try out that technique! (Well, I will have to wait till tomorrow...)
#3   Old 21-Jul-07, 07:28   
Reply With Quote
noidtluom's Avatar
noidtluom noidtluom is offline
Member
 
Join Date: Aug 2005
Location: Malaysia
Posts: 584
very good technique! *applause*
............................................
The ThoughtScore Project

thinkMoult.com - Your source for animation, artwork, music, graphics design, cooking (whoah), and much more to liven up your day! Laughter & Interest ensured!
#4   Old 21-Jul-07, 14:01   
Reply With Quote
MeiaLua MeiaLua is offline
Member
 
Join Date: Jan 2006
Location: Mashing up a dancehall
Posts: 92
I love it!, really cool

I'm going to try it when i make a model worthy of my desk

i read through the tutorial and have a question, - when it comes to baking, is there any reason why you cannot use blender's default render baking once you have unfolded the mesh? It seems like you get the same result with your technique as if you press CTRL-ALT-B and select ambient occlusion?

Anyway its still a great idea!
#5   Old 22-Jul-07, 09:00   
Reply With Quote
Netrieb Netrieb is offline
Member
 
Join Date: Jul 2007
Posts: 5
Super, thanks. I am returning to my child age :-)
#6   Old 22-Jul-07, 09:40   
Reply With Quote
coodle coodle is offline
Member
 
Join Date: May 2007
Posts: 149
great!
I am looking forward to a Blender Origami Contest!!
#7   Old 22-Jul-07, 10:01   
Reply With Quote
LarryPhillips's Avatar
LarryPhillips LarryPhillips is offline
Member
 
Join Date: May 2006
Location: USA
Posts: 468
Hey that's cool! Will have to try this. Thanks!
.
............................................
New to Blender? Blender Manual - Release Logs
Blender Newbies - Blender Underground
Intro to Character Animation
#8   Old 22-Jul-07, 10:09   
Reply With Quote
Hoehrer's Avatar
Hoehrer Hoehrer is offline
Member
 
Join Date: Nov 2005
Posts: 442
That's very cool - I used the Unfold script long before 2.44 but combined with this bake-method it's even more powerful. Thanks for sharing.

I actually made a quick "Shoot a photo from all sides" blend file out of it and a simple cube. --- Might also be used to make seemless cubic skymaps I think (But isn't there an orthogonal camera used for baking? This would prevent correct skymaps).. gotta try that sometime.

Just one question:

In your node setup the left "Material" node is kinda confusing (what's it supposed to do?) ... Wouldn't it be better to use a "Normal" output of an Input->Geometry node?


Werner
............................................
UFO: Alien Invasion
Tutorials: Modelling a dice | Create a heightmap from a plane | Fill faces | Mix Materials via Nodes

Last edited by Hoehrer; 22-Jul-07 at 10:57.
#9   Old 22-Jul-07, 10:20   
Reply With Quote
emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
MeiaLua:: Yeah, that is just a shortcut for the same button. But it is important to turn off "Clean" button if you have divided the mesh. Yes, you can use CTRL+ALT+BKEY once you set it.

Hoehrer:: If you want to bake a cube, the "Billboard mesh" script should least you - AFAIK it does the same job.
edit: Yes, it can be also a Geometry > Normal. I just didn't know what does that do, so I used the Material node.
............................................
Since I've got an interesting signature, I don't have to write interesting posts.

Last edited by emu; 22-Jul-07 at 15:51.
#10   Old 22-Jul-07, 11:35   
Reply With Quote
emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
Wow, It's on blendernation.com! Thanks!
............................................
Since I've got an interesting signature, I don't have to write interesting posts.
#11   Old 22-Jul-07, 11:55   
Reply With Quote
solhex's Avatar
solhex solhex is offline
Member
 
Join Date: May 2005
Posts: 21
I've been interrested in this sort of thing since I was a kid. I found this site on blendernation some time ago: www.tamasoft.co.jp/pepakura-en A fun way to do it externally to blender and some great models to look at on site. I'm gonna try it this way though cos it looks more usefull in terms of texturing. Right...off to have some fun, thanks Emu!
#12   Old 23-Jul-07, 11:10   
Reply With Quote
Master Danix's Avatar
Master Danix Master Danix is offline
Member
 
Join Date: Nov 2006
Posts: 310
that is freakin cool !
But i have a problem,my Unfold script dosen't work
............................................
I´m an imperialistic portuguese blenderhead.
Master Danix a.K.a Imperador Danix a.K.a danix3000
#13   Old 23-Jul-07, 15:49   
Reply With Quote
emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
Master Danix:: The script must work the same anywhere, so probably I just didn't write the instructions exactly enough. And possibly more people encounter the same problem as you, so I would like to fix the tutorial.
So, please, write exactly what does the script do so I can tell you how to solve it.
............................................
Since I've got an interesting signature, I don't have to write interesting posts.
#14   Old 25-Jul-07, 12:15   
Reply With Quote
vvaris's Avatar
vvaris vvaris is offline
Member
 
Join Date: Aug 2006
Location: Finland
Posts: 25
excuse me and my bad english, but could this same method be used to make normalmaps/bumpmaps(wich ever they are called) from highpoly models for lowpoly models?
............................................
Get Up & Try Again
#15   Old 26-Jul-07, 11:05   
Reply With Quote
jbarrantes's Avatar
jbarrantes jbarrantes is offline
Member
 
Join Date: Jul 2007
Location: Costa Rica
Posts: 2
Impressive technique!
Did someone write a python script that makes that task automatically?
I am interested in programming one to improve Blender.
#16   Old 28-Jul-07, 05:45   
Reply With Quote
emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
jbarrantes:: That would be great!
Consider if it wouldn't be better just to improve the Unfold script (and give it new features). It is better when all controls are located together, and (but I'm a python noob) it would give you better access to the unfold process. On the other side, the unfold script seems to be quite complicated, maybe it would be hard to edit.

vvaris:: Yes, possibly. I will try to make it, but it probably won't be that simple. You need to bake the depth map someway, I'm not sure how to do it.
............................................
Since I've got an interesting signature, I don't have to write interesting posts.
#17   Old 29-Jul-07, 15:28   
Reply With Quote
Eckie Eckie is offline
Member
 
Join Date: May 2006
Location: Enschede, The Netherlands
Posts: 3
Hey,

I really don't get what you mean by "fix the lighting". It should be even, but how should you make it even? Could you tell some more about that? Thanks!

Btw i'm working on a model and i will post it when it's done!
#18   Old 03-Aug-07, 18:22   
Reply With Quote
emu's Avatar
emu emu is offline
Member
 
Join Date: Mar 2007
Location: GMT +1 (Czech Republic)
Posts: 143
I mean that the model shouldnt be from one side light and one side dark. There can be darker parts, but only small details, not a half of the model.
Do not use one main light, but many lights from all sides. Or use simply ambient occlusion.

I am looking forward to see your model!
............................................
Since I've got an interesting signature, I don't have to write interesting posts.
#19   Old 04-Aug-07, 10:37   
Reply With Quote
monk_aw's Avatar
monk_aw monk_aw is offline
Member
 
Join Date: Jul 2007
Posts: 3
When i hit the unfold script i get the same message over and over "python error:check console" How do i fix this?
#20   Old 04-Aug-07, 14:48   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 18:47.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists