可以创建“点到曲面”(Point to Surface)约束,以将 nCloth 组件(顶点、边或面)附加到目标曲面(nCloth 曲面或被动碰撞对象)。例如,可以使用“点到曲面”(Point to Surface)约束,以将一条 nCloth 裤子的腰带保持在被动对象角色的髋部。
创建 nCloth“点到曲面”(Point to Surface)约束
在场景视图中,选择要约束的 nCloth 组件(顶点、边或面)。
按住
键并选择要将 nCloth 组件约束到的目标曲面。
目标曲面可以是同一系统的一部分的其他 nCloth 对象、nCloth 被动对象中的一个或非 nCloth 对象。
注意:如果选定的目标曲面是非 nCloth 对象,则创建约束后,该曲面将成为被动对象。在 nDynamics 菜单集中,选择 nConstraint > 点到曲面(nConstraint > Point to Surface) >
。
此时将出现“创建点到曲面约束选项框”(Create Point to Surface Constraint Options Box)窗口。
(可选)启用“使用集”(Use Sets),以将选定的 nCloth 组件和目标曲面添加到动态约束选择集中。
单击“创建约束”(Create Constraint)或“应用”(Apply)。
选定的 nCloth 组件现在受选定的目标曲面约束,并且现在通过 dynamicConstraint 节点连接到 nCloth 的 Maya Nucleus 解算器。
dynamicConstraint 节点上的预设特性确定约束的类型(在这种情况下为“点到曲面”(Point to Surface)约束)及其行为方式。例如,可以使用以下属性设置创建“点到曲面”(Point to Surface)约束:
“弹簧”(Spring)作为“约束方法”(Constraint Method)
“对象到对象”(Object to Object)作为“约束关系”(Constraint Relation)
“全部到第一个”(All to First)作为“组件关系”(Component Relation)
“组件顺序”(Component Order)作为“连接方法”(Connection Method)
“在开始处”(At Start)作为“连接更新”(Connection Update)
请参见 dynamicConstraintShape。