MaxScript随机赋材质

 1 sphere()
 2 
 3 select objects
 4 
 5 a = $
 6 
 7 a.segs = 32
 8 
 9 a.material = standard()
10 
11 a.material = standard diffuse:orange
12 
13 a.material.specular_level=70
14 
15 a.material.glossiness=70
16 
17 a.material.specular=white
18 
19 a.material.selfillumamount=0
20 
21 a.material.opacity=0
22 
23 a.material.opacity=100
24 
25 a.material.shadertype=0
26 
27 a.material.maps[2]=checker()
28 
29 a.material.diffusemap = marble()
30 
31 showtexturemap a.material on
32 
33 a.material.maps[2].color1=red
34 
35 a.material.maps[2].coords.u_tiling = 2
36 
37 a.material.maps[2].coords.v_tiling = 3
38 
39 a.material.maps[2].coords.v_offset =3
40 
41 a.material.maps[2].coords.w_angle = 0
42 
43 meditmaterials[7] = inknpaint()
44 
45 meditmaterials[8]=multimaterial()
46 
47 meditmaterials[8] = multimaterial()
48 
49 meditmaterials[8].material1 = inknpaint()
50 
51 meditmaterials[8].material1.paint_map = checker()
52 
53 meditmaterials[8].materials1.paint_color = yellow
54 
55 meditmaterials[8].material1.paint_color=yellow
56 
57 meditmaterials[2]=copy meditmaterials[1]
58 
59 for m=1 to 24 do meditmaterials[m] = standard()
60 
61 for m=1 to 24 do meditmaterials[m].diffuse = (random black white)
62 
63 for m=1 to 24 do meditmaterials[m].specular_level=90
64 
65 for m=1 to 24 do meditmaterials[m].glossiness = 90
66 
67 for m=1 to 24 do meditmaterials[m].diffuse = (random yellow red)
68 
69 for m=1 to 24 do meditmaterials[m] = inknpaint()
70 
71 for m=1 to 24 do meditmaterials[m].paint_color = (random yellow red)
72 
73 for m=1 to 24 do meditmaterials[m].diffusemap.color1=(random black white)
74 
75 for m=1 to 24 do a.material=meditmaterials[m]
76 
77 for m=1 to 24 do selection[m].material = meditmaterials[m]
78 
79 for a in selection do showtexturemap a.material on
80 
81 for a in selection do a.material = meditmaterials[random 1 24]
82 
83 for m=1 to 24 do meditmaterials[m].diffusemap = bitmaptexture filename:"f:\mic\Vienna.avi"
84 
85 for m=1 to 24 do meditmaterials[m].diffusemap.starttime = (random 0 100)
86  

 

转载于:https://www.cnblogs.com/JimmyCode/archive/2011/11/10/2244277.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值