Page 1 of 19 12311 ... LastLast
Results 1 to 20 of 362

Thread: Export Paper Model

  1. #1
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346

    Export Paper Model

    You maybe remember my interest in paper models. The described process of creating a net is rather complicated and boring. So, this export script is supposed to simplify it all to two mouse clicks.
    kostka_page1.png
    >> Download & Try << (Right click -> Save as)
    Install
    To make it work, you need blender 2.70 or later. In User Preferences > Add-Ons, use the Import Add-on tool. Then in the list of available add-ons, look for Export Paper Model and enable it.
    If you just want to see some action quickly, the export is done from menu File > Export > Paper Model.

    How to Use
    • The first, optional, step is to mark edges where the model will be cut. From the Toolbox panel, call the Unfold operator on the selected model. The edges will get marked as Edit mode Seams, you can edit them in any way you like. The script will use the seams you mark and mark some more as necessary.
    • Second step is to save the document. Use the Export Paper Model button in the Toolbox. A File Browser appears, which also allows you to change the export settings in the bottom-left corner.
    • Then, if everything goes well, the script saves one or more files without any further talking. In the settings, if you switch No Texture to something else, Blender's Bake Render functionality will be exploited to create the images: that may take some time. Blender Internal is the only supported render engine.
    • The file format is SVG. Most web browsers can open it and will allow you to directly print it. If you want to edit the net before printing, I would recommend Inkscape as a vector editor.


    A humble panel is in the 3d View Toolbox. Currently it gives you an overview of how the net will be split into parts (aka. islands). It can show one of them directly in the 3D view, highlighted in orange. You can edit the name of each island and give it a three-letter abbreviation that will be used on the sticking tabs.

    Official description and a detailed user manual is located at a Blender Wiki page.

    More development details may be found in the project at github.org. There is a TODO list and a list of known bugs, but most people prefer to report bugs in this thread directly.

    Animate the net
    I also wrote an addon for animating the net using bones. You can get it from the repository too (Right click -> Save as). Installation and usage is explained on its own wiki page.

    Task list
    • Fix for correct scaling (and to draw printer marks)
    • Drawing fold lines outside of the net


    Coding experiments
    • Constraining island size to page dimensions (mostly done)
    • Direct PDF output
    • Switching tab positions from within Blender
    • Avoiding overlaps of tabs/arrows with the net
    • Packing islands using Gauss-Newton optimization


    Bug reports and constructive ideas are appreciated. If the script fails or creates something useless, please, let me know, I will try and fix it. Also, if something feels unnatural to you or you need support for a specific task, this thread is the right one to post to.
    Last edited by emu; 29-Nov-14 at 12:00. Reason: Task list: removed presets
    Since I've got an interesting signature, I don't have to write interesting posts.



  2. #2
    there was already a script to do some unfold / paper equivalent in 2.49 did you look at it ?

    this should be an interesting project


    there was some advance math apper on this subjecft don't know if these can be used to do the unfold here !

    good luck



  3. #3
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346
    A little bump: finally, the script is functional (yeehaa!)
    Originally Posted by RickyBlender View Post
    there was already a script to do some unfold / paper equivalent in 2.49 did you look at it ?
    Of course I did - actually the script is what made me toy with paper models :)
    Originally Posted by RickyBlender View Post
    there was some advance math apper on this subjecft don't know if these can be used to do the unfold here !
    Well - nor do I know about it. Most of the code I wrote by myself and I wouldn't consider the math advanced. I guess there are many much better possible solutions to several parts of the job, but I don't even know where to get such information on the net.
    So all I use is wikipedia ;)
    Since I've got an interesting signature, I don't have to write interesting posts.



  4. #4
    well a saw a documentary on PBS on Origami and paper modeling this winter
    so that's why i mention that
    look on PBS might find some links for origami or paper modeling!

    search for these titles there are several books on this subject too
    and some includes math models

    i think there are up to close to 200 unfolds for paper modelling
    but in the next few years it could go up to 500 or may be 1000 unfold

    it requires lot's of patience to do theses as paper model
    don't think i would have the patience to do that !LOL

    but good luck with this

    happy 2.5



  5. #5
    I'm rather interested in trying to build my own paper models using Blender 2.5. I tried downloading your script, but it seems to be missing? I only get a google docs page with nothing below it. Is it possible that it has been moved?



  6. #6
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346
    fxkill:: Thanks! I didn't realize that one needs a google account in order to download the document. Now it should be fine.
    Since I've got an interesting signature, I don't have to write interesting posts.



  7. #7
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,632
    I tried it and nothing happened. The addon is enabled and seems to be working.

    What is the work flow?

    I am using the default cube. Does this script unfold it?
    I rarely use Blender anymore.
    Houdini Indie is only $200.00 and Apprentice is free!
    Atom's Links Page



  8. #8
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346
    Originally Posted by Atom View Post
    I tried it and nothing happened. The addon is enabled and seems to be working.
    What is the work flow?
    When you click Unfold, it should only mark seams where to cut the model. That happens nearly immediately. I think one might want to edit the seams by hand, that's why I separated this step.
    Then you click Export Net and blender should ask you where to save the output. If it doesn't, try downloading a newer blender build.
    Note that there's no message when everything goes ok. See whether something has been saved or not.

    Originally Posted by Atom View Post
    I am using the default cube. Does this script unfold it?
    Well yes, but the net will be saved in real dimensions. If you try to save a 2x2 meter cube onto a A4 page, the script fails with an error message.
    Scale it down by 0.02 (to 4 cm) to be sure it will work.
    Since I've got an interesting signature, I don't have to write interesting posts.



  9. #9
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,632
    I guess I still do not understand this NET thing? When do I see the unfold animation occur?

    Also, when I first enabled the addon the script ran, but now I can not figure out how to re activate it. I type unfold in the operator search field but it never shows up?
    I rarely use Blender anymore.
    Houdini Indie is only $200.00 and Apprentice is free!
    Atom's Links Page



  10. #10
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346
    Originally Posted by Atom View Post
    I guess I still do not understand this NET thing? When do I see the unfold animation occur?
    There is no animation. The script serves to paper modelling, it creates documents ready for printing. Trying to be like Pepakura ;)

    Originally Posted by Atom View Post
    Also, when I first enabled the addon the script ran, but now I can not figure out how to re activate it. I type unfold in the operator search field but it never shows up?
    Everytime you run Blender you have to enable all addons you want to use, unless you save user settings.
    When enabled, the script should provide two operators: Unfold and Save Net. However, I rather recommend to open the side toolbox (with TKEY) as there are more settings to the script.
    Since I've got an interesting signature, I don't have to write interesting posts.



  11. #11
    T H A N K S A L O T for writing and sharing this script! How on earth can you bend your mind around the mathamatics needed for a program that is capable of doing this?!



  12. #12

    your script applied in 3D

    I don't know if this is the best place to show off my work, but I feel that the writer of the script deserves to see how his work is used by other people. Here's a picture of a lamp I created with your unfold-script, a A3+ printer, semi-transparent paper and a some vector-software. The great thing about an unfold-script is, that it turns a regular desktop printer into a 3D printer



    The model in Blender:



  13. #13
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346
    Amazing! Yeah, I do love seeing it in use.
    Moreover, I would like you to comment on any drawbacks you encountered. I will continue work on the script (over the last month I have not written a line) and you might want - at least - to affect my TODO list priority.
    Since I've got an interesting signature, I don't have to write interesting posts.



  14. #14
    Hi! Well, I'm quite satisfied with your software as it already is. But if I were to write a wishlist, here it is:
    -create an option to have the result automatically scaled down to the paper-size one chooses, without having to bother about scaling everything down to 0.01 to make it fit an A4. Just make it fit automatically.
    -thinking of that,... maybe it would help to create a "scale" option... Something like: "1 blender unit equals ______ cm"? I tried using the "scale" option under the world-panel, but that didn't realy work.
    -this might be something only I will ever need, but I need double gluing strips. I add them manually now in Illustrator.
    -I find the option to edit the seams very convenient and I use it a lot.

    Thanks again for the fun!



  15. #15
    Member DavidOne_1's Avatar
    Join Date
    Jan 2007
    Location
    Vega Alta, PR, USA
    Posts
    86

    Learned most of the script already

    Hi, I'm the person that wrote the free paper model design e-book for Blender.

    I tried the script and I liked it. Some observations from my part (this is my mini review of the script so far):

    Some good points:

    The fact that it separates the edge lines, the folding lines and the tab lines (they appear as different objects in Inkscape) is good cause it is easy to change the properties of those later on like for example when you want to give the folding lines a custom pattern in an illustration program.

    The fact that it generates the tabs automatically is a plus. The other unfolding script writers have talked about this but they have not been able to implement this yet so you were first. I'm not saying that their scripts are bad cause they are good scripts anyway but you did that first and that is to your credit.

    It is the first unfolding script that works with the new Blender 2.5, another plus.

    It works pretty fast like the B-Paperizer script.

    You don't have to scale everything to 1 before unfolding like with the other scripts which was kind of annoying.

    Some not so good ones:

    You cannot preview the unfolded patterns in Blender like with the other two unfolding scripts. I feel that this is necessary, at least it would be a big plus.

    It would be much better if it generated the tabs as separated filled shapes instead of rendering them as continuous lines cause for editing and rearranging them it would be way easier. Some people like to rearrange them and color them one way or the other including me. Also that would be much better in situations in which you have to compromise and fix the shape of a tab due to it being close to part that overlaps it due to to a small, sharp angle cause it would make it easier to edit the tab shape.

    You have to click on the Make Unfoldable button first and then rearrange the seams to your liking afterward. It would be better if you could mark the seams first and then click the button and that the program accepted your marked seams as the correct pattern and if you marked them wrongly or incompletely perhaps the script giving you a warning about that. Now all this is very secondary compared to the other issues so don't worry too much about it.

    I couldn't find a way to adjust the size of the gluing tabs. It would be nice to have a slider (with numeric input too for precise control when you want it) that allowed you to adjust their size (how wide they are).

    Some additional thoughts:

    I haven't tested the other 4 settings yet. Later on I will. I suppose that the first two have to do with the script deciding which lines to write and which ones not depending on the angles of adjacent faces to each other similar to what the B-Paperizer script does and then the other two settings which I haven't checked yet.

    I did assemble a test cube in which I pulled one of the vertexes away from the flat plane of the quad to test how the script handles the invisible quad folds and it didn't mark the fold but when I assembled the cube I had to fold that edge. I think that this has to do with those two first sliders of the concave and convex folds but like I said I haven't had the time to test more for now. When I test those things more I'll give you further input.

    You are doing a great job with this script. It already works and it does so with the new Blender. I hope that the other unfolding scripts are adapted to the new Blender too but at least we already have one that does. Please keep up the good work, I hope that you keep evolving your script and making it better and better but it is pretty good already and that is definitely going in the right direction.

    I understand that there is a lot of work in doing this and that this is a first version of the script and for a first version it already does a lot so it is very promising. The paper modeling community will appreciate your efforts for sure.


    PS: For those users of other illustration programs like CorelDraw and Illustrator, and this is a tip from my book that could be useful for those that haven't read it yet:


    CorelDraw and Illustrator import the SVG patterns generated by these three unfolding scripts (Unfold, B-Paperizer for Blender 2.49b and Export Paper Model for Blender 2.5) but when you import the patterns in these programs the dashed pattern of the fold lines that the Unfold and Export Paper Model scripts create in the SVG file are lost. An exception to this was the pattern generated by the Export Paper Model script with Illustrator CS4 (haven't tested it in CS5 yet) but not in CorelDraw. In illustrator CS4 the dashed lines of the Export Paper Model SVG file were preserved.


    To preserve these lines with many software that have this problem you open the patterns in Inkscape (which is open source and free and preserves the dashed lines just fine) and save them as PDF from there and when you open the PDF in many other vector illustration programs they will be preserved.


    There is a little bit more info about that last thing in my book in chapter 2 in the section entitled:


    The Confusion Between UV Texture Unfolders And Paper Modeling/Other Unfolders


    Just in case the links for downloading my free e-book are these:


    http://pixeloz.deviantart.com/


    and also:


    http://www.mediafire.com/?sharekey=b...eada0a1ae8665a



  16. #16
    Member emu's Avatar
    Join Date
    Mar 2007
    Location
    GMT +2 (Czech Republic)
    Posts
    346
    Originally Posted by DolorSitAmet View Post
    this might be something only I will ever need, but I need double gluing strips. I add them manually now in Illustrator.
    I guess that's really something only you will ever need. You can change it in the code:
    Find the function def generate_stickers(self, default_width):
    and remove the decision code. Change this:
    Code:
    if uvedge_priority(edge.uvedges[0]) >= uvedge_priority(edge.uvedges[1]):
        edge.uvedges[0].island.stickers.append(Sticker(edge.uvedges[0], default_width))
    else:
        edge.uvedges[1].island.stickers.append(Sticker(edge.uvedges[1], default_width))
    to this:
    Code:
    edge.uvedges[0].island.stickers.append(Sticker(edge.uvedges[0], default_width))
    edge.uvedges[1].island.stickers.append(Sticker(edge.uvedges[1], default_width))
    Don't forget that python cares about indentation, you'll have to keep it right.

    Originally Posted by DolorSitAmet View Post
    maybe it would help to create a "scale" option (...)
    I edited the code to take the Scale Length into account. Now it's a real mess, because Blender automatically multiplies all lengths, including page size. If you don't edit it in the toolbox, the dimensions will appear correct again in the file selector. I'll have to solve this somehow. Maybe separate size setting is good, but you'd have to calculate the object's dimensions by hand. Or it could be changed in Blender so that external lenghts won't get affected by the scale length.

    Originally Posted by DavidOne_1 View Post
    You cannot preview the unfolded patterns in Blender like with the other two unfolding scripts. I feel that this is necessary, at least it would be a big plus.
    Well, I am aware of this, but I could not find a good solution as Blender has no integrated SVG editor. The script could save UV layout, if you think that would be more convenient for previews. But you cannot see the gluing tabs there.
    - Actually, it already saves the UV layout, if you uncheck Pure Net. It would be just an easy edit in the code to make it save UVs everytime.

    Originally Posted by DavidOne_1 View Post
    It would be much better if it generated the tabs as separated filled shapes instead of rendering them as continuous lines (...)
    Good point. Fixed, download the current version (from Git repository, not from Google).

    Originally Posted by DavidOne_1 View Post
    You have to click on the Make Unfoldable button first and then rearrange the seams to your liking afterward. It would be better if you could mark the seams first and then click the button and that the program accepted your marked seams as the correct pattern and if you marked them wrongly or incompletely perhaps the script giving you a warning about that. (...)
    The script should accept your marked seams. It takes all the current seams and possibly adds its own ones - just to make the model unfoldable.
    If you click Export Net, that also makes the model unfoldable beforehand. I think of removing the Toolbox panel completely (it behaves weirdly and most of the time nobody needs it).

    Originally Posted by DavidOne_1 View Post
    I couldn't find a way to adjust the size of the gluing tabs. It would be nice to have a slider (with numeric input too for precise control when you want it) that allowed you to adjust their size (how wide they are).
    Another very good point, fixed too. It is not in the Toolbox, but will appear when you execute the Export Net operator, along with the file selector.

    Originally Posted by DavidOne_1 View Post
    I haven't tested the other 4 settings yet. (...)
    Sorry, that is messy. These are more of debug settings, I exposed them to be editable because I am not satisfied with the script's performance.
    How the algorithm works: it assigns every edge a 'priority', depending on its angle and length. Then it cuts the edge with the highest priority and slightly tweaks priority of all its neighbours. This is repeated until the mesh is cut enough for unfolding.
    These sliders change, how much effect do convex / concave angles / edge lengths / special situations during the marking process have on an edge's priority.
    I think it is pretty simple, and often it gives fine results. You can try and edit the priority settings, in Edit mode you will get an interactive preview. But (I do not know why) some of them have little effect or none at all. I will have to look at this thoroughly.

    Originally Posted by DavidOne_1 View Post
    (...) it didn't mark the fold but when I assembled the cube I had to fold that edge. I think that this has to do with those two first sliders of the concave and convex folds (...)
    No, those sliders have nothing to do with this. There is a simple switch, the angle must equal to zero for such edge not to be drawn. What you write about seems rather like a bug to me.

    Thanks for your comments :) I'm glad to have feedback.
    I'm going to be away for about two weeks, but I'll continue working on this script later.
    Last edited by emu; 01-Jul-10 at 03:34.
    Since I've got an interesting signature, I don't have to write interesting posts.



  17. #17
    Member DavidOne_1's Avatar
    Join Date
    Jan 2007
    Location
    Vega Alta, PR, USA
    Posts
    86

    Hey that is terrific!

    Hey you already improved two things and rather quickly. That is a good thing, terrific! The separated tabs are easier to handle than a single continuous line but what I really meant was if it was possible to have the ability to generate closed shapes that would accept a fill color in Inkscape by just assigning it to them.

    At the moment you have to close the tabs shapes by adding a line to each one of them. it would save a ton of work for the model designers but again you already improved it a lot and maybe that is too complex. The bottom line is that the script already works and now it works even better, thanks for the improvements that was well done.

    Another thing is that I noticed that the main outer shape is disconnected when I open the pattern in an illustration program. I mean that the shape is not a continuous line but a series of segments, it looks like one but when I tried to give it a fill it wouldn't take it and I went to the node editor and I moved a few nodes (control points, vertexes) and I moved them and the corners were not connected. Is this suppose to happen? Is there a setting that prevents that from happening? Cause I played with several of them for a while but I couldn't get it to create connected shapes.

    Is this Ok? it is OK if that is what the script can do at the moment. I don't expect it to be perfect in a jiffy I'm just pointing out what would be ideal of course. In my case in CorelDraw X3 which I have is very easy to fix that cause you just select that shape and use the Create Boundary function and it generates the connected shape out of the original one in one click but in other illustration programs one must join all the nodes one by one to be able to give the shape a fill. In bitmap editors of course it is not a problem either cause you just paint over the pattern so that is covered and it works rather well as it is.

    Interestingly the tab shapes do not have this problem, their corners remain connected and as for the folding lines they are disconnected but that is not a problem there, actually they are better like that so in the fold lines and the tab lines no problem with the corners or the nodes. So far so good.

    I tested the tab width adjustment and it worked very nicely, another terrific improvement cause I know that many designers will like to adjust their size to their liking so that is very, very nice.

    Hey I found out that you were the same person that wrote the tutorial about baking ambient occlusion shading into textures for paper models. I though that that was a great idea and because of that I placed a link to that tutorial in the e-book.

    That is another alternative that could be used for texturing things like greeble (as you showed in the tutorial) which in most cases, cannot be modeled in paper models (at least not with that much detail) cause it is impractical so this is an alternative method that one could have among the others as a choice for texturing.
    Last edited by DavidOne_1; 08-Jul-10 at 03:16.



  18. #18
    Member DavidOne_1's Avatar
    Join Date
    Jan 2007
    Location
    Vega Alta, PR, USA
    Posts
    86

    About the quad fold that didn't show

    What I mentioned about the fold that didn't show is about the invisible fold in quads cause many quads are not as flat as some people think but this is something that is a wee bit complex to explain.

    This is a paper cube that I did with your script. I pulled the vertex shown by the blue arrow and notice how the invisible quad fold which is shown by the red arrow had to be folded in the paper model even if it is not marked as a fold or even if the quad is shown as a smooth shape in 3D software:

    http://img143.imageshack.us/img143/6...equadfold1.jpg

    I sustained some communications about this with Czestmyr (the creator of the B-Paperizer script) cause it is something that all unfolder software creators and paper model designers have to deal with one way or the other sooner or later.

    Because I though that it was necessary that paper model designers understood better about the invisible quad folds I created a section in the book for that. If anybody wants to understand better what exactly I'm talking about they can check the section in my free e-book titled: A Common Misunderstanding About Quads And Triangles in chapter 4 from page 79 to 93 in Edition 1.0 of the book.

    Right there people can see some of the communications I had with him about this and there is also a very good explanation about this issue with many pictures that show this with more clarity.

    That is what I'm talking about and that is exactly the issue with the paper cube that I did with the new unfolding script and that is something that have to be dealt with whenever the quads stop being flat which happens in different circumstances when you model in 3D cause it is a natural part of the 3D modeling process when you model with triangles and quads cause quads are always made with two triangles and those triangles do not always remain flat.

    For those interested in understanding this more the links to my free e-book are in one of my previous posts above.
    Last edited by DavidOne_1; 01-Jul-10 at 22:08.



  19. #19
    Member Herbert123's Avatar
    Join Date
    Apr 2009
    Location
    Vancouver
    Posts
    1,431
    Thanks for your hard work. I tested it, and it seems to work, however I do have a question: does it support uv-textured images for output? In Pepakura (http://www.tamasoft.co.jp/pepakura-en/) I can print the texture, which is kinda essential. My workflow is: a) create model; b) create uv's; b) create image texture; export as *.obj and import in Pepakura; d) create pattern; e) Print to Pdf and import in Illustrator to get rid of seams/clean it up for printing final model; f) print model and glue it together.

    So, will your script support image textures? I added an image, but no go.
    Last edited by Herbert123; 02-Jul-10 at 10:30.



  20. #20
    @Emu,

    Thanks for your hard work, indeed! And specifically for the very precise suggestion on how to change the script to my needs. It is much appreciated!



Page 1 of 19 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •