unfold - Printable Version +- Wings 3D Development Forum (https://www.wings3d.com/forum) +-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1) +--- Forum: Design & Development (https://www.wings3d.com/forum/forumdisplay.php?fid=6) +--- Thread: unfold (/showthread.php?tid=2965) |
RE: unfold - micheus - 09-13-2020 engrenage Wrote:However, I haven't figured out a way to export the result as SVG/DXF/whatever.I was afraid you could say that. That is something that would be an option to be implemented in order someone be able to make this kind of use of the UV map option (unwrap). Quote:Also, I have yet to figure out a way how to scale the object ; in such cases the base unit will be a volume in liters or m³.Well, Wings3D doesn't works with any specific measure system. One Wings3D unit (1WU) can be what you want. Recently we observed that 1WU for 3D printing purpose is equivalent to 1mm. This means users can work with this unit and at export time set a scale value for what they want as output. Wings3D give you some information about the object (you need to select it in body mode [B]) and accessing the main menu Tools->Scene Info - that includes Area and Volume. By considering the limitation you will get only a image (not a vector drawing) as output (the texture image), I'm not sure it will work well for your application. There is a application that is used for create papercraft (not so expensive) that may interest you Pepakura Designer (not so expensive). This one I already new about, but I looked for a free option and I couldn't find one. If you decide to try this app, I think you don't need to make the cuts in Wings3D since the app was designed to make that. You can download it to try and see if it will work for you somehow - you will not have available the save and export functions until you buy the activation keycode. RE: unfold - engrenage - 09-19-2020 Darn I didn't see there was a second page to the thread until now You're correct when you say that a bitmap image is totally unsuitable. Thinking it would be more comfortable to select folding edges rather than cutting edges, as they will _always_ be less numerous. Pepakura looks like some fine software. A little worried about the output format though.. However, I am ultimately trying to get things done that are beyond simply this folding : selecting my object and applying a Doo-Sabin subdivision to it, I can observe the result is pretty close to what would happen when inflating the volume WITH ONE MAJOR DIFFERENCE : Doo-Sabin subdivision smoothes the vertices when inflating really makes those vertices stick out like the corners of a pillow. Doo-Sabin could actually be a very good base to start from, because some of the work is already done (though I'm surprised the user has no control over the intensity of the effect). I'll post a picture, this might be clearer than I am likely to be with just words. vertex_smoothing.pdf (Size: 14.85 KB / Downloads: 6) For each vertex (or all together as a group), the red circle defines a "vertex recess radius", which in turn defines the center of the blue circles that will "bend" the vertex inwards, this effectively smoothing out the overall geometry without the cost of extra faces, requiring only that the material be bent a little. Using Bezier curves could be a pretty solution, but I am not too familiar with the mathematics of those. Note the opposite is also true ; where there are no folds, a vertex can be pushed outwards, this exaggerating the pillow-effect. great for star-like shapes. IMHO, that totally comes with the "need" to be able to inflate/deflate objects (also for volume calculation!!) in order to better adjust the radii involved. Of course, inflation and smoothing vertices out requires the use of non-flat surfaces, which could be problematic to render. But with a little bit of imagination, it's not hard to guess what the shape will be like after vertex smoothing and inflation ; I would say that as long as the vertices can be smoothed out in the resulting vector output that is totally sufficient. RE: unfold - gilboonet - 09-19-2020 Hello, I'm Gilboonet, if you want to unfold a 3d model with my sites' jscad script, here are things to know : - it is done for .obj models exported from Wings3d with triangulation tesselation - if you want to have pieces unfold separately, each must be colored differently, then colors turn to material ( Body mode, MRB, Vertex Attributes, colors to material) and exported to .obj - the 3d model cannot have holes This way I was able to unfold models with 2000 triangles max. Recently I made a vanilla JS unfolder that doesn't unfold automatically but rather with a graphical interface, and has an option to unfold the model a simple way (It tries to unfold facet with smaller number). I wasn't satisfied with any triangle intersection algorithm I could think of to have the same automatic mode that the jscad version has, but the graphical interface allows me to unfold my models with more flexibility. And I was able to made it accept .obj with quads and holes, and it can make use of co-planarity to avoid unnecessary folds. I didn't make it serve pdf so it doesn't have multipage output, but it can serve a A1 svg that is then easy to split. It is here : https://gilboonet.github.io/depl_edit/depl_edit.html?page=1. Send me a mail or message here if you want some help to use it, Briefly, it accepts .obj from Wings, you choose your .obj, then choose first facet to unfold, and clic on numbers on borders to unfold/fold. You can also select only some faces, then export selection. You can drag the starting facet to move the pattern, on the right there's a matrix button that open a window with all facets to unfold. When you completed the unfold, if you export to .svg, the pattern will be simplified. The green numbers are length of unknown neighbours. The github is here : https://github.com/gilboonet/gilboonet.github.io/tree/master/depl_edit A short video : https://www.youtube.com/watch?v=NYeVw_rwDnw RE: unfold - micheus - 09-21-2020 engrenage Wrote:Darn I didn't see there was a second page to the thread until nowI though you had gave up. I see two situations for what you have talking about: - start from a flat object and inflating it to create the 3D object; - have a 3D object and "slice"/cut it in a way the faces can be unfold in a flat piece. For the first one what I have seen in other 3D apps is the use of cloth simulation. I didn't see any process of unfold the resulting object. (it's available in the last version of Blender) For the second I still think that cut the object manually seems to not be that complicated if we want just ensure the unfold process will not produce any distortion (something acceptable for the texturing workflow). I see the addition of an option to export the UV map as a .svg or .eps file format more feasible, since we already have an option to do that with the 3D object on the viewport. RE: unfold - gilboonet - 09-22-2020 What you describe is exactly how my unfold process works, you can see it in action on that video from 1 year ago : https://www.youtube.com/watch?v=CsVtoNZg5_k. I tried to look at Erlang to see if I could port it to Wings 3d, but I didn't understand it enough to start anything. RE: unfold - engrenage - 10-15-2020 Hey micheus! nope, didn't give up, not even yet! just busy with less fun stuff I quickly skimmed over the video, seems like it could do the job, gotta take some more time to try it. Inflating : I just found the "quick smoothed preview" which is a step in the right direction already. Trying with a simple cube though shows the edge lengths are not preserved, which is definitely an error in this case. So, the rendering is going to be too small, but if it's just to see how the overall shape will look like it's totally ok. No option to specify the "pressure", though. FYI, the way I made the flat drawing for the egg was as follow: - select one face - view -> align to selection - file -> export selected -> cartoon edges do this for all faces, then import in [inkscape, ...] and rotate+place each face relative to each other as desired. I did run into a scaling issue with one or two faces though, probably because I changed the zoom level. maybe we can simply automate this process by selecting the edges that will connect two faces? Then the process would simply be "select any number of edges to fold" and for each edge dumbly export the two adjacent faces attached to each other, recursing on other faces if other edges are to be folded on one of these faces. no need to check for overlaps, let the user do this visually. if we run into a face that is not connected to those already added to a group, then we create a new group and export it to a new page (or a different position in the page but that somehow doesn't feel as clean). I would not even bother centering the drawing in the page or make sure the page is large enough for the drawing ; again, let the user do this manually with x,y,theta,pagesize (better) or post export with [inkscape, ...] (quick and easy to do, does not interfere with the manual in-wings placement) Micheus, pas sûr d'avoir tout compris ce que tu essaye d'expliquer avec tes "deux situations", alors je propose de brièvement passer au français dans l'espoir que tu le comprends. 1) en partant d'un objet "plat", on est donc bien dans le cas de ces "ballons d'anniversaire" ou de deux "tôles" l'une contre l'autre qui sont juste plates tant qu'on a pas gonflé? 2) rien compris ce que tu cherches à exprimer. RE: unfold - engrenage - 10-15-2020 Gilboonet, ton déplieur manuel à l'air bien! I was confused at first with the icons, interpreted "import" as "export" and vice-versa. I suggest you put some "infobulles" on mouseover the buttons and input fields. one question now: how do I zoom in or out? once it was too small, now it's too big... couldn't change that. also, I exported my .obj with the option "no tesselation" (as opposed to triangles or quads) but I still get 36 triangle faces instead of 12 pentagons. re-read your line about quads, tried to re-export my obj at a different scale, now no faces are added at all (and the grid doesn't appear) but the number of faces detected seems correct. RE: unfold - engrenage - 10-15-2020 a pretty simple way to smooth out vertices when inflating models would be to replace each vertex with a n-faced polygon. size of the polygon should be a function of the "sharpness" of edges adjacent to that vertex. is this already implemented and I haven't found it yet, or is there an opportunity here? RE: unfold - engrenage - 10-15-2020 as a side-note, vertex smoothing/dampening is quite effective in making more rigid models by lessening the surface tension. IMHO there should definitely be a "smooth vertices/edges that are sharper than <some_value*>. And that should (obviously) be recursive. :-) * in case of edges, some_value is the angle between the two planes. in case of vertices... I'm not sure at all ; maybe some weighted average of the adjacent plane angles? RE: unfold - micheus - 10-15-2020 engrenage, I thought I understand your English, but for the French I had to use the translator. From the top of the thread I see to approaches in the #post1: 1) You stated by sharing a sample video of hydroforming (flat object being inflated) ; 2) Then, you attached and 3D object which you extracted the flat faces by unfolding it; For the second one I think it's easier to implement what I mentioned in the #post14 But, for the first one I still believe the way it will work is the same we know about Cloth in computer graphics. I think a good example is what Marvelous do: Cloth is something I have been reading articles time from time, but I still not able to produced nothing in terms of code. |