用户名: 密码: 免费注册 忘记密码? 网站地图 | 加入收藏 | 设为首页
首页 | 新闻 | 工具 | 系统 | 办公 | 聊天 | 多媒体 | 网页 | 运营 | 平面 | 欣赏 | 数据库 | 程序 | 服务器 | 组网
网页 | 3dmax | Ghost | Windows Xp| Dreamweaver | photoshop | Flash | office | Alexa | Css | QQ | Asp | PHP | Jsp | Access
Flash MX 2004入门 | 网站推广策略 | CorelDRAW入门 | ASP学习 | 网站建设大师功 | Word入门
  iTbulo.com > 学院 > 多媒体教程 > Director教程 > 文章正文
Director 3D 基础(之六)
iTbulo.COM 2006-2-12 十年磨一剑()

以下的事件设定演员的directionalPreset , directionalColor , and ambientColor属性。这些是用于修饰“scene”的灯光的。

on prepareLightAndCamera
member(‘‘scene‘‘).directionalPreset = #bottomLeft
member(‘‘scene‘‘).directionalColor = rgb(255, 255, 255)
member(‘‘scene‘‘).ambientColor = rgb(255, 255, 255)

这些代码移动摄像机到新的模型的位置:

member(‘‘scene‘‘).camera[1].transform.position = vector(266, 0, 300)
member(‘‘scene‘‘).camera[1].transform.rotation = vector(0, 0, 0)

end

以下的事件应用shLines材质球于一半的字母。注意到shLines材质球仅仅应用于材质球列表中的奇数条;shMetal材质球将显示于其它字母。这儿利用了mod函数,这儿是用来除以2,得到的余数是1或者0。

on addLinesToHalf
if member(‘‘scene‘‘).model(‘‘3dText‘‘).voidP then exit
repeat with x = 1 to member(‘‘scene‘‘).model(‘‘3dText‘‘).shaderList.count
if x mod 2 = 1 then -- if x is an odd number
member(‘‘scene‘‘).model(‘‘3dText‘‘).shaderList[x] =
member(‘‘scene‘‘).shader(‘‘shLines‘‘)
else
member(‘‘scene‘‘).model(‘‘3dText‘‘).shaderList[x] =
member(‘‘scene‘‘).shader(‘‘shMetal‘‘)
end if

end repeat
end

以下的事件指派shLines材质球于所有的字母:

on addLinesToAll
if member(‘‘scene‘‘).model(‘‘3dText‘‘).voidP then exit
repeat with x = 1 to member(‘‘scene‘‘).model(‘‘3dText‘‘).shaderList.count

member(‘‘scene‘‘).model(‘‘3dText‘‘).shaderList[x] = member(‘‘scene‘‘).shader(‘‘shLines‘‘)

end repeat

end

上一页  [1] [2] [3] 

文章搜索
相关资讯
相关文章 相关下载
DIRECTOR去背技法步步高(二)
DIRECTOR去背技法步步高(一)
Director怎样制作自定义光标
Director 3D 基础(之七)
Director 3D 基础(之五)
焦点信息