Maya导入Unity的教程

原地址:http://www.cocoachina.com/gamedev/gameengine/2010/0601/1586.html
昨天已经发布了1Vr.Cn翻译的 多维材质模型烘培入Unity 以及 3ds Max光照纹理导入Unity两段教程,今天继续送上Maya导入Unity的教程,由威阿译自: http://forum.unity3d.com/viewtopic.php?t=9606

1,给你的模型打上你需要的灯光,添加贴图材质等等..



2,渲染你的场景,比如用Mental Ray,你喜欢用什么就用什么.



3,选择所有物体并使用"Mesh->Combine"命令.然后给这些物体打开"Create UVs->Automatic Mapping",进行展UV操作.打开"Window->UV Texture Editor"并检查用于烘培的新的UV.



4,切换到"Rendering"工具栏,并且确保你要渲染的物体是被选择的,打 开"Texture/Lighting->Batch Bake(mental ray)"对话框,并用如下的设置,然后点击"Convert and close":

Objects to bake: Selected 
Bake to: Texture // IMPORTANT 
Bake shadows: checked // IMPORTANT 
Keep original shading network: checked // IMPORTANT 
Use bake set override: checked // IMPORTANT 
Color mode: light and color // IMPORTANT 
Normal direction: surface front // IMPORTANT 
Prefix: myLightmap // IMPORTANT this will be the filename of the lightmap TIFF, pick a name you like 
X resolution: 2048 // depends on the size of the object usually 2048 is plenty, try various values 
Y resolution: same value as "X resolution" 
File format: TIFF // others work to as long as Unity can import them 
Bits per channel: 8 bits // IMPORTANT 
Number of samples: 1 
Bake to one map: checked // IMPORTANT 
UV range: Normal [0 to 1] // IMPORTANT, other settings lead to distorted maps 
Fill texture seams: 3 // IMPORTANT, this is the bleed area in pixels around each UV shape to avoid jaggy edges later in Unity 
Override mesh UV assignments: checked 
UV set name: Lightmap

5,Maya将帮你渲染出 Lightmap(根据你设置的分辨率和渲染选项不同可能消耗比较长的时间),这个图不会在Maya中显示,这个文件看起来会像下面这种:



9,保存场景和切换到Unity,找到Lightmap并导入到Unity中.默认路 径"user/[your username]/documents/maya/projects/[maya project name]/renderData/mentalray/lightMap/[prefix].tiff",选择你的模型,更改材质 为"Lightmapped",并将tiff格式的烘培图文件赋予给它,搞定!
 
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值