Thursday, March 3, 2011

Some 3dsMax Script Ideas

  • Orient object pivot according to the face normal
Update : March 3, 2011

[3dsmax Script] Align Pivot to Face
        I have finished creating the script.More like compiling actually.I had to handle the Node Transformation through the script, which is not clarified still to me.But i really needed the script to be made.I found a helpful piece of  function by Martijn van Herk from CGTalk, what it does is it takes a source and target as input.It aligns the source's pivot to the target.It is actually easier said than done.Afterwards, following the 3dsmax help on maxscript, i found the face normal of a selected face.Rest all was really nothing more than stitching the both codes together with error checking.The limitation is it only works on Editable Poly object now.It can be added easily.Just need to dig through the Editable mesh code.

     You can download the maxscript from the following link.

      Installation :
  1. Drag and drop on to 3dsmax.
  2. You can find the script under category "PB_Tools".
  3. Create a Quad menu,Shortcut or Toolbar button to access at anytime.
      How to Use :
  1. The script presently only support Editable Poly objects.
  2. Select a Editable Poly Object's face to which you want the pivot to align to.
  3. Avoid selecting multiple faces for it might show undesirable results.
  4. Click on the button, or shortcut for "Align Pivot to Face".

      Initial Idea :
It can be fairly useful, when a object has lost it’s xform, we can use this way to retain the orientation of the object.As a result modeling can be really fast for these kind of object.

Getting it done:
  1. Calculate the selected face normal.
  2. Orient(Pivot position doesn’t change) the selected object’s pivot according to the face normal.

1 comment:

Thank you for visiting my blog.Post your comments here.:)

Creative Commons License
This work by Priyabrata Biswal is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.