PDA

View Full Version : Maya2LW2_MDDMotionIA.ls



faulknermano
10-13-2006, 05:54 AM
this is a new part of the maya2lw2 project i'm doing. it's a motion modifier that sticks to an mdd file that's applied to an object.

position is defined by specifying a point index obtainable by selecting a point in modeler pressing `o`. the # denotes the point index. input this point index at the User Index in the interface. you can alternately use an object's name as point index (e.g."NULLA_10239" will use the point index of 10239).

rotation is computed using two vectors, usually defined by adjacent points that resolve to being the point normal ("normal constraint"). Pt A is the point relative to the `main` point that the right side will face, and Pt B is the point the top side will face. this enables xyz orientation. remember that Pt A and Pt B is 'connected` to the main `position` point. that's where orientation is based.


of course, the script is not really that novel, there are other stuff that gets you to constrain nulls to points, but this works just fine in context with maya2lw2.

Cageman
10-14-2006, 10:38 AM
Cool...

Thanks alot! :)

faulknermano
10-15-2006, 08:59 PM
updated some things. please use attachment above. updates only involve bulletproofing against errors regarding reading beyond mdd file and making sure that point indices that are inputted are correct. denis pontonnier has informed me of a bug i have not been able to reproduce as of yet. will update here when an update is made.

also, diver's p2p script is another utility you can use to parent an object to a point, but this requires no mdd.

http://interialabs.de/lw/lscript/index.html
look for IL_Parent2Pnt2.