Saturday, November 6, 2010

Selection features, better controlled unfolding

I added some selection features last weekend, and I finally got edge loop selection working and added "edge ring" selection.

Debugging line loop selection:
I just deleted the whole shit and started from scratch again. I did everything the same way as before, and it worked fine...

Edge ring selection:
It's very similar to edge loop selection, it's just the data are the opposite:
I search all the edges that share the same polygon (in case of loop: same vertex) with the current edge. If there are 3 selectable edges (4, including the current one), we can proceed. Get the edge, that doesn't share any vertices (in case of loop: any polygons) with the current edge, and if it's not selected: select it and continue with the algo.

Convert polygon selection to edge border selection:
If bunch of polygons are selected, it will select the borders of it:

Only unfold selected polygons and it's controlled by selected edges: the algo will split the geometry at the selected edges.

This level of control is still not enough. Simple objects can be unfolded fast and easy, but convex objects not: I still have problems with the chair model. I don't know how would I unfold it with experience with manual unfolding. So I need a way to at least show/advise the user how to unfold at least some general objects.

Okay, I guess it's not clear, so some screenshots:

Unfolding a sphere
edge selection level: selecting one edge

select edge ring feature
select edge loop feature

deselecting the "equator" ring: shift+mouse drag selection (note, that "backfacing" edges can be selected, maybe I add "ignore backfacing" feature to edge selection too)

element selection level: select element (thus whole mesh in this case)

unfold feature, and switched to unfold view.


  1. hi, your project looks promising... will it be binary for testing? i really interested in!

  2. Thanks!
    I think I'll upload it as soon as the main workflow is implemented: when the edit unfolded patch features are added.

  3. check this out - , i think it's a good stuff and can be used also for semi-auto-semi-manual unfolding.
    also, i think it's a good idea to keep process interactive. alike pepakura, there you pressing "unfold" and it's over(a mean your work with 3d model in 3d)

  4. Thanks.
    I think the automatic unfold has to be the most important thing. Since I plan to work with hi-poly models too: I want this tool to be a serious tool so that I can make serious paper models, not just some toys. Car models for example.

    The other feature that's not so common in these types of programs: editing the 3D model, most importantly making surfaces unfoldable.

    Slicing/layering feature: a 3D model is converted to layers of patches: so a paper part can be made from many layers of paper. Take a look at the video of the tank: you can see this kind of part.

  5. as i playing more around with this custom unfold tool, it's seems it works good with complicated meshes too. it's not discarding auto-unfold, its' just good handy tool.

    wow! corresponding editing will be really(really) awesome feature.

    also that is really needed(and i'm trying to implement it myself with blender scripting) is taking in calculations paper (material, more general) thickness.

    for now, it's seems it can turn out in to a article, so maybe i will publish it here.
    some illustration is -
    the idea is thickness is really matter. not only for cardboard but also for 200g/m or even 120g/m paper as such errors summarized.

  6. Yes, I know thickness is important, and I understand why. Even your pictures have the error I'm referring to: cardboard does not bend in the middle because you have to scratch the cardboard before you bend it.

    But I don't know how to handle it yet. Not even big applications (like 3ds Max) can handle the "shell" thing properly. It has so many corner/degenerate cases, it's just very hard if not impossible to handle. I made the 2D version of it: it produced a very complex code, and the thing isn't even perfect. Take a look at this video:
    I can't even imagine how complex a robust 3D version would be.

  7. no no no. first, it's no errors, second you don't need to shell.
    it's not clear on such draft, but it's a model for calculation, - there you have material thickness, cut deep, flap type or\and angle on this edge. so after all unfold done your calculations will be simple(i guess): everytime it's just for given edge, - you know params such above, so you draw face "smaller or bigger" in direction parallel to this edge. no need to shell in 3d at all.

  8. ok, as it's goes forward it's look like it is a kind of shelling. and maybe it's not so simple, as i through.

  9. Hi.
    I'm employed and I haven't really used to it yet and I'm a bit tired all the time, so I've put this project on hold for a while.

    It's time to start the GUI programming (at least a placeholder GUI, because there are too much features, and testing became tedious), but I'm not very motivated about it...

  10. What are your plans for this? Do you have e-mail?