原地址: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格式的烘培圖文件賦予給它,搞定!
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格式的烘培圖文件賦予給它,搞定!
