Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive polygons mk2 node #2651

Merged
merged 16 commits into from
Nov 3, 2019
Merged

Adaptive polygons mk2 node #2651

merged 16 commits into from
Nov 3, 2019

Conversation

portnov
Copy link
Collaborator

@portnov portnov commented Nov 2, 2019

This provides a new version of Adaptive Polygons node, which is more precise (especially for Tris faces) and has more features. Some features are ported from Tissue addon, I hope Alessandro will not mind :)
Direct translation of Tissue code is not possible, as Tissue is heavily based on bpy API.

For the list of new features, just see the documentation https://github.com/nortikin/sverchok/blob/adaptive_polys_mk2/docs/nodes/modifier_make/adaptive_polygons_mk2.rst - always all parameters are new :)

TODO for later Mk

  • Iterative / fractal tessellation - this feature of Tissue gives nice results sometimes, but i'm not sure it is practically useful
  • Possibility to provide specific donor object for each recipient face. In simple cases, this can be done by combining several "Adaptive Polygons" nodes with different masks.

Preflight checklist

Put an x letter in each brackets when you're done this item:

  • Code changes complete.
  • Code documentation complete.
  • Documentation for users complete (or not required, if user never sees these changes).
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.

@portnov
Copy link
Collaborator Author

portnov commented Nov 2, 2019

Screenshot_20191102_215606
Screenshot_20191102_215945
Screenshot_20191102_220433
Screenshot_20191102_220603
Screenshot_20191102_223247

@portnov
Copy link
Collaborator Author

portnov commented Nov 2, 2019

adaptive_polys_2
adaptive_polys_3
adaptive_polys_4
adaptive_polys_5
adaptive_polys_6
adaptive_polys_7

@vicdoval
Copy link
Collaborator

vicdoval commented Nov 2, 2019

I was also thinking is re-coding this node 😄
One feature I would like to have is the possibility to add a "frame" for the donor object like happens with the "barycentric transform" node, that way you could place the donor relative to the frame:
t

@portnov
Copy link
Collaborator Author

portnov commented Nov 2, 2019

Hmm. "Adaptive polygons mk2" has two modes for coordinate translation:

  • "Bounds": similar to mk1 version; for quad faces, it takes "source area" = bounding rectangle of the donor object; for tris faces, it takes "source area" = bounding triangle of the donor object (i.e. the smallest triangle with equal sides, which covers all donor vertices while having bottom side parallel to X axis). This source area is then mapped to the recipient face.
  • "As is": similar to Tissue's "Global" mode. For quads, this takes "source area" = [-1/2; 1/2] x [-1/2; 1/2] square; for tris, "source area" = the triangle with all sides equal to 1 with center at (0,0,0). Then it maps the whole XOY space so that "source area" becomes recipient face.

So, in the later case, you can just manually make donor object smaller than this fixed "source area", or move it from center, or whatever.

@portnov
Copy link
Collaborator Author

portnov commented Nov 2, 2019

adaptive_voronoi_1

@portnov
Copy link
Collaborator Author

portnov commented Nov 3, 2019

Screenshot_20191103_124417
Screenshot_20191103_124714
Screenshot_20191103_124811

@portnov portnov merged commit e7fba56 into b28_prelease_master Nov 3, 2019
@portnov
Copy link
Collaborator Author

portnov commented Nov 3, 2019

adaptive_icosphere_4

@portnov
Copy link
Collaborator Author

portnov commented Dec 29, 2019

Screenshot_20191229_174804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants