enzyme69 / blendersushi

Blender Sushi related scripts. Mostly about Sverchok, Geometry Nodes, Animation Nodes, and related Python scripts.
243 stars 33 forks source link

Knitting Pattern ala Entagma (Houdini) using Sverchok in Blender 3D #14

Open enzyme69 opened 7 years ago

enzyme69 commented 7 years ago

Was inspired by this video: http://www.entagma.com/knitting-in-3d-building-a-uv-deformer/

I have not watched the whole video, but trying to tackle the Knitting problem right away in Blender using Sverchok Add-On, and perhaps with Tissue Add-On.

screen shot 2017-06-21 at 10 25 27

There must be a simpler way, less technical to achieve this...

enzyme69 commented 7 years ago

Blend ZIP: UV_intro_001_2017_06_21_00_29.zip

enzyme69 commented 7 years ago

Further study, I came up with this solution, should be pretty good for flat knitting surface. In here, I am using Grease Pencil to actually draw the knitting element, but that part can also be 100% procedural.

screen shot 2017-06-21 at 18 21 51

knit_pattern_03_2017_06_21_08_20.zip

You can then use the polygon adaptive using Tissue Add-On or Sverchok own Adaptive node. In order to make this work 100%, we might need to work out how the seam connects together. There is a few caveat still...

There is one clever thing that Entagma did with Houdini, where they actually sample the UV info and then sort of doing point by point projection... in order to have a smooth displacement wrap around of knitting of actual 3D object surface. Complex stuff! But super interesting.

I don't know how to simulate this yet using Sverchok.

Maybe the answer is there somewhere.

enzyme69 commented 7 years ago

screen shot 2017-06-21 at 18 38 46 knit_pattern_04_2017_06_21_08_38.zip

Tweaked it slightly... I think PI should be multiplied by 3.14 or 6.28 ... to make the loop.

enzyme69 commented 7 years ago

Mifth Tools, like Mira and Wrap actually works interestingly, although around the edge can get pretty dirty. UV dependant.

https://blenderartists.org/forum/showthread.php?366107-MiraTools

This is a dodgy example.

screen shot 2017-06-22 at 16 34 39

This kind of process can get pretty heavy for computer. 2-12 millions polygon faces is easy.

To think about it, we might not need to use this wrap thing as Adaptive Polygon of Sverchok, or Tesselation of Tissue does the job.

enzyme69 commented 7 years ago

I figured it out, it might be like this:

enzyme69 commented 7 years ago

screen shot 2017-06-22 at 18 17 35 screen shot 2017-06-22 at 18 16 09 screen shot 2017-06-22 at 17 21 03 screen shot 2017-06-22 at 17 20 51

It is very important to always consider the final resolution of the mesh. Do not go too far, it might crash your system.

enzyme69 commented 7 years ago

To have a more natural knitting, the actual topology of the quad also needs to be considered. And also think the final volume form of the 3D model, it needs to feel like fluffy knitting, so, lots of factor like this to consider!

enzyme69 commented 7 years ago

I don't have time to refine the render, but this is a quick test. screen shot 2017-06-22 at 18 30 41

enzyme69 commented 7 years ago

A couple more test:

screen shot 2017-06-22 at 20 40 46 screen shot 2017-06-22 at 20 40 08 screen shot 2017-06-22 at 20 39 53

Kind of curious how this thing would print out actually.

enzyme69 commented 7 years ago

A couple more test:

screen shot 2017-06-22 at 20 40 46 screen shot 2017-06-22 at 20 40 08 screen shot 2017-06-22 at 20 39 53

Kind of curious how this thing would print out actually.

enzyme69 commented 7 years ago

knitting_hairy_001

I just realized: if it is for render, it is possible to create the look of knitting via texture, displacement and hair of some sort.

I guess what we made here is good for 3D printing.

enzyme69 commented 7 years ago

knitting

enzyme69 commented 7 years ago

Latest: knitting_demo_003_2017_06_23_08_44.zip

enzyme69 commented 7 years ago

Alessandro Zomparelli from Tissue Add-On gives an example how to do this correctly, apparently 1 element per polygon face...

img_7941 img_7942

enzyme69 commented 7 years ago

I still don't quite get the Tissue add-on. This is actually wrong:

screen shot 2017-06-23 at 19 57 22

Use wires, instead of solid mesh, probably better luck...

enzyme69 commented 7 years ago

The element/component is apparently need to that part that will seamlessly stamp over the surface. We can use edge.

enzyme69 commented 7 years ago

screen shot 2017-06-23 at 20 05 26

screen shot 2017-06-23 at 20 28 35

enzyme69 commented 7 years ago

screen shot 2017-06-23 at 20 27 29

enzyme69 commented 7 years ago

screen shot 2017-06-23 at 20 57 27

Need a good element to tile and adapt, and tissue and Sverchok can do the job.

alessandro-zomparelli commented 7 years ago

Good, try with a human model: http://www.makehuman.org/ http://www.manuelbastioni.com/manuellab.php

:-D

melMass commented 5 years ago

Nice examples, do you know a way in blender or sverchok to transform each point to their uv space in 3D ?