Shrink-Wrap Constraint: Align to Normal (Option) -- iteration 1
Needs ReviewPublic

Authored by Masado Ishii (starintheuniverse) on Aug 17 2016, 7:12 AM.

Details

Summary

Performs correctly in this scenario: https://vimeo.com/234564499

Remaining considerations:

  1. This is a first approximation to an appropriate "definition of UP." Currently an axis of the object is constrained to a projection of its initial direction, the projection is orthogonal to the target normal. There may be a more intuitive definition in a later version. This implementation, translated from linear algebra, should be easily adaptable to a future version of UP.
  2. Disappointingly, there was not an easy way to access the target normal for the shrink type of 'nearest vertex'. So as to not disrupt existing code, I have left the align-to-normal transformation disabled in that case.
  3. Surface normal interpolation (smoothing) has not yet been implemented.

Fixes T47440

Diff Detail

Repository
rB Blender
Branch
shrink-wrap-align
Build Status
Buildable 106
Build 106: arc lint + arc unit
Masado Ishii (starintheuniverse) retitled this revision from to Added property 'normal_align_factor' to the Shrinkwrap constraint. Added/modified properties for the Shrinkwrap constraint. Added the bulk of the Align-to-Normal transformation code to the Shrinkwrap constraint (see T47440). Added default values....Aug 17 2016, 7:12 AM
Masado Ishii (starintheuniverse) retitled this revision from Added property 'normal_align_factor' to the Shrinkwrap constraint. Added/modified properties for the Shrinkwrap constraint. Added the bulk of the Align-to-Normal transformation code to the Shrinkwrap constraint (see T47440). Added default values... to Shrink-Wrap Constraint: Align to Normal (Option) -- iteration 1.

An animation to display the added functionality.
I am interested to know if this "definition of UP" is satisfactory to other devs/users, so please experiment with the file. :)

Well I finally saw the news that Campbell is stepping away... best of luck to him in his future endeavors. I need to ask someone else to review my code! :)

Sorry to bother you with this, @Bastien Montagne (mont29), I just couldn't find out who is the right person to ask for review (IRC people were nice but unknowledgeable). I figure this is a better way than to scribble on IRC every few hours... :P