MAXScript101_3.3 Working with Modifeirs

MAXScript101_3.3 Working with Modifeirs

 

1. modifier

-- operation (1): add a modifier: way 1

b = bend angle:45 direction:90

addModifier $box01 b

-- operation (2): add a modifier: way 2

addModifier $box01 (twist angle:90)

-- operation (3): get existing modifiers

$box01.bend

$box01.twist

-- operation (4): adjust bend modifier

$box01.bend.angle += 20

-- operation (5): get all modifires or one modifier for an object

$box01.modifiers -- #modifiers(TwistMod: Twist, ... )

for m in $box01.modifiers do pring m.name

-- top modifier

$box01.modifiers[1].angle = 45

-- bottome modifier

botMod = $box01.modifiers[$box01.modifiers.count]

-- index modifier by it's name

bendM = $box01.modifiers["Bend"]

 

2. most modifier parameters are animatable

-- 在小球进行转动的时候,长柱子向小球方向弯曲

addModifier $column (bend())

animate on

for t in 0 to 100 by 5 do

at time t

(

local dv = $ball.pos - $column.pos

$column.bend.angle = atan2 dv.z dv.x

$column.bend.direction = -(atan2 dv.y dv.x)

)

 

3. For detatails, please refer to MAXScript Reference

. Modifier Common Properties, Operators and Methods: eg. deleteModifier ... 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值