3D脚本 maxscript入门教程(6)
生活随笔
收集整理的這篇文章主要介紹了
3D脚本 maxscript入门教程(6)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
3D腳本?maxscript入門(mén)教程(6)
?(2013-05-23 19:59:32) 轉(zhuǎn)載▼標(biāo)簽:? 建模?maxscript?3dmax?it | 分類:?腳本 |
這是伏羲先天八卦,乾1兌2離3震4巽5坎6艮7坤8
據(jù)易經(jīng):天地定位,山澤通氣,雷風(fēng)相薄相,水火不相射
*/
--第一步
--創(chuàng)建數(shù)組為后面雕刻八卦用
arr8=#(#(0,0,0),#(0,0,1),#(0,1,0),#(0,1,1),#(1,1,1),#(1,1,0),#(1,0,1),#(1,0,0))
--創(chuàng)建八卦的文本
atext=#("乾","兌","離","震","坤","艮","坎","巽")
--創(chuàng)建一個(gè)倒角修改器
bev=bevel Level_1_Outline:1.4 Level_1_Height:2 Use_Level_2:1 Level_2_Outline:0 Level_2_Height:30\
use_Level_3:1 Level_3_Outline:-1.8 Level_3_Height:2
for i in 1 to 8 do (
--把八卦文本分布到八個(gè)對(duì)應(yīng)的位置上
atex=text font:"隸書(shū)" text:atext prefix:"txt" pos:[0,300,0]
in coordsys world about coordsys rotate atex (eulerangles 0 0 (45*(i-1)))
--創(chuàng)建八卦的卦爻
for j in 1 to 3 do (
r=180+j*30
--創(chuàng)建八卦的卦爻
badd=box pos:[0,r,0] length:16 width:120 height:30 lengthSegs:5 widthSegs:10 heightSegs:4 \
prefix:"badd" wirecolor:white
in coordsys world about coordsys rotate badd (eulerangles 0 0 (45*(i-1)))
--創(chuàng)建給八卦的卦爻雕刻多余部分的雕刻刀。
if arr8[j] !=0 then(
bsub=box pos:[0,r,-2] length:22 width:30 height:34 lengthSegs:5 widthSegs:10 heightSegs:4\
prefix:"bsub" wirecolor:white
in coordsys world about coordsys rotate bsub (eulerangles 0 0 (45*(i-1)))
)
)
)
--第四步
--合并卦爻并刪除多余的部分
for i in $badd* do (if i.name != "badd01" then( $badd01+i;delete i))
--合并雕刻刀并刪除多余的部分
for i in $bsub* do (if i.name != "bsub01" then( $bsub01+i;delete i))
--為八卦文本加上倒角修改器,并分配材質(zhì)
for i in $txt* do (
addmodifier i bev
i.material=currentMaterialLibrary["Metal_Dark_Gold"]
)
--雕刻卦爻并分配材質(zhì),然后光滑處理
$badd01-$bsub01
delete $bsub01
$badd01.material=currentMaterialLibrary["Metal_Dark_Gold"]
addmodifier $badd01 (meshsmooth())
--結(jié)束
轉(zhuǎn)載于:https://www.cnblogs.com/superjn/p/6179445.html
總結(jié)
以上是生活随笔為你收集整理的3D脚本 maxscript入门教程(6)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Java异常与运行时异常,以及与线程的关
- 下一篇: (三)RocketMQ集群部署实践