SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Maya Camera Settings
To Unity
Unity Technologies Japan G.K.
Community Evangelist
Nobuyuki Kobayashi
Abstruct
This is how to move the Value of positon, rotation, near and far
clipping planes, and FOV to Unity.
• You can get the values of FOV which is calculated from the Focal
Length and the Vertical Film Aperture on Maya.
• You can set keys of FOV by setting keys on the channel of the Focal
Length on Maya.
• You can export the FBX animation data including the locator which has
been simulation-baked the attributes of Maya Main camera with the MEL
script.
Sample Scene
I uploaded the sample scenes under URL.
http://d.pr/lLDx
Sample:Scene View in Maya
Sample:Camera View in Maya
Sample:Camera View in Unity
Workflow on Maya
Setting Animations to Camera
●
 First, The name of your camera is Main_Camera, and the name of your
camera’s shape is Main_CameraShape.
●
 Set the value of “Fit Resolution Gate” within Main_CameraShape to “Vertical”
from the Attribute Editor.
●
 You can set the key on channels for Camera Animation below:

 ●
 Translate X/Y/Z, Rotate X/Y/Z, Focal Length at Main_Camera’s Channel Box

 ●
 If you want to set the key on FOV, you should do on Focal Length instead.

 ●
 You cannot set the key on Angle of View on Maya, because this value is
calculated inside Maya.
Focal Length
Translate X/Y/Z,
Rotate X/Y/Z
Setting Animations to Camera
Fit Resolution Gate
Focal Length
near and far clipping planes
Translate X/Y/Z,
Rotate X/Y/Z
Making the locator
●
 Make the new locator with “Create>Locator”
●
 Change the name of the locator to “locator_Camera”
When you finished the
constraint of camera
and locator, you will get
the view like this.
Making constraints locator to camera
●
 Make point and orient constraints with the position and rotation of
the locator_Camera to Main_Camera.
●
 Select Main_Camera firstly, and select locator_Camera secondly,
  Make Constraints twice: Constrain>Point, Constrain>Orient
●
 Check out “Maintain offset” in Option Window.
●
 You can get the same values of position and rotation from
Main_Camera to the locator_Camera.
Maintain offset
Sending the Value of Near Clipping Plane to the
Scale.X of the locator_Camera
●
 Select “Scale X” from the Channel Box of “locator_Camera”, and Select
“Edit>Expression” from the manu of the Channel Box.
●
 Using the Expression Editor, copy and paste the MEL script below, inside the box
named “Expression”.
float $ncp;
$ncp = `getAttr
Main_CameraShape.nearClipPlane`;
setAttr locator_Camera.scaleX $ncp;
Scale X
Expression
Expression
Edit
Edit
float $fcp;
$fcp = `getAttr Main_CameraShape.farClipPlane`;
setAttr locator_Camera.scaleY $fcp;
Sending the Value of Far Clipping Plane to the
Scale.Y of the locator_Camera
●
 Select “Scale Y” from the Channel Box of “locator_Camera”, and Select
“Edit>Expression” from the manu of the Channel Box.
●
 Using the Expression Editor, copy and paste the MEL script below, inside the box
named “Expression”.
Sending the Value of FOV to the Scale.Z of the
locator_Camera
●
 Finally select “Scale Z” and copy and paste the MEL script into Expression.
float $fl;
float $vfa;
float $FoV;
// get focalLength from CameraShape node
$fl = `getAttr Main_CameraShape.focalLength`;
// get verticalFilmAperture from CameraShape node
$vfa = `getAttr Main_CameraShape.verticalFilmAperture`;
// caluculate FOV from two values above
$FoV = 2.0 * atan((0.5 * $vfa) / ($fl * 0.03937)) * 57.29578;
// send FOV to scale.Z
setAttr locator_Camera.scaleZ $FoV;
1 mm = 0.0393700787 inch
1 rad=180/Pi=57.29578 degree
Simulation-Baking of the Value of Locator
●
 Select from Translate.X to Scale.Z on the Channel Box.
●
 Use the Simulation-Baking command to all keys baked, with “Edit>Keys>Bake Simulations” from menu.
●
 If you want optimize F-Curves, open the Graph Editor and use “Curves>Simplify Curve” from menu.
All key are baked when you finish the simulation-
baking.
Turn red in the box
Bake Simulations
Keys
Edit
Export the FBX files
●
 It is easy to export FBX files separately for understanding: the one includes objects which
have animation data, the one includes the scene objects only, finally the one includes
locator_Camera only.
●
 You use the FBX includes locator_Camera only as the Camera path.
•	 For example : We use the Ball.fbx (Animated Objects), the Floor.fbx (Scene files), and the
MayaCamera.fbx as the camera path.
Workflow on Unity
Import the FBX files
●
 First of all, you must set the same scale factor of Maya and Unity before you import the camera path FBX.
●
 Setting below:
>When your unit of scale is Meter on Maya :
When you export the FBX, Set the Unit of scale as Centimeters,
and the value of Scale Factor of Unity is 0.01.
>When your unit of scale is Centimeter on Maya :
When you export the FBX, Set the Unit of scale as Centimeters,
and the value of Scale Factor of Unity is 1.
●
 After adjusting the scale factor, Import Ball.fbx, Floor.fbx, MayaCamera.fbx, you can get the same as scale
of scene in Unity as Maya.
>When your unit of scale is Meter on
Maya :
When you export the FBX, Set the Unit
of scale as Centimeters,
and the value of Scale Factor of Unity
is 0.01.
>When your unit of scale is Centimeter
on Maya :
When you export the FBX, Set the Unit
of scale as Centimeters,
and the value of Scale Factor of Unity
is 1.
Import the FBX files
Setting the Main Camera of Unity to the child of
MayaCamera
●
 Set the Main Camera of Unity to the child of MayaCamera object in Hierarchy
●
 Set the local position and rotation of Main Camera below:

 ●
 Position(x,y,z) = (0,0,0)、Rotation(x,y,z)= (0,180,0)、Scale(x,y,z)=(1,1,1)
●
 In this point, you can get the same position and rotation of Maya camera in Unity.
Set the Main Camera of Unity to the child
of MayaCamera object in Hierarchy
Set the value of rotation.y = 180 to adjust
the Maya coordinate system
Attaching the script to MayaCamera Object
●
 Attach the script to MayaCamera objects below:
using UnityEngine;
using System.Collections;
public class MayaCameraConverter : MonoBehaviour {
Camera _camera;
void Awake ()
{
_camera = GetComponentInChildren<Camera>();
}
void LateUpdate ()
{
	 	 _camera.nearClipPlane = transform.localScale.x;
	 	 _camera.farClipPlane = transform.localScale.y;
	 	 _camera.fieldOfView = transform.localScale.z;
}
}

Contenu connexe

Tendances

Tendances (20)

MAYAで作ったアニメーションをUnityに取り込んで動かしてみるの巻
MAYAで作ったアニメーションをUnityに取り込んで動かしてみるの巻MAYAで作ったアニメーションをUnityに取り込んで動かしてみるの巻
MAYAで作ったアニメーションをUnityに取り込んで動かしてみるの巻
 
攻略リニアカラー改訂版
攻略リニアカラー改訂版攻略リニアカラー改訂版
攻略リニアカラー改訂版
 
GCC2016 ゲームエフェクト制作の現状報告
GCC2016 ゲームエフェクト制作の現状報告GCC2016 ゲームエフェクト制作の現状報告
GCC2016 ゲームエフェクト制作の現状報告
 
【Unity道場】新しいPrefabワークフロー入門
【Unity道場】新しいPrefabワークフロー入門【Unity道場】新しいPrefabワークフロー入門
【Unity道場】新しいPrefabワークフロー入門
 
【Unite Tokyo 2018】トゥーンシェーダートークセッション#1『リアルタイムトゥーンシェーダー徹底トーク』
【Unite Tokyo 2018】トゥーンシェーダートークセッション#1『リアルタイムトゥーンシェーダー徹底トーク』【Unite Tokyo 2018】トゥーンシェーダートークセッション#1『リアルタイムトゥーンシェーダー徹底トーク』
【Unite Tokyo 2018】トゥーンシェーダートークセッション#1『リアルタイムトゥーンシェーダー徹底トーク』
 
それを早く言ってよ〜パフォーマンスを出すエフェクト制作のポイント
それを早く言ってよ〜パフォーマンスを出すエフェクト制作のポイントそれを早く言ってよ〜パフォーマンスを出すエフェクト制作のポイント
それを早く言ってよ〜パフォーマンスを出すエフェクト制作のポイント
 
【CEDEC2018】Scriptable Render Pipelineを使ってみよう
【CEDEC2018】Scriptable Render Pipelineを使ってみよう【CEDEC2018】Scriptable Render Pipelineを使ってみよう
【CEDEC2018】Scriptable Render Pipelineを使ってみよう
 
シェーダーを活用した3Dライブ演出のアップデート ~『ラブライブ!スクールアイドルフェスティバル ALL STARS』(スクスタ)の開発事例~​
シェーダーを活用した3Dライブ演出のアップデート ~『ラブライブ!スクールアイドルフェスティバル ALL STARS』(スクスタ)の開発事例~​シェーダーを活用した3Dライブ演出のアップデート ~『ラブライブ!スクールアイドルフェスティバル ALL STARS』(スクスタ)の開発事例~​
シェーダーを活用した3Dライブ演出のアップデート ~『ラブライブ!スクールアイドルフェスティバル ALL STARS』(スクスタ)の開発事例~​
 
中級グラフィックス入門~シャドウマッピング総まとめ~
中級グラフィックス入門~シャドウマッピング総まとめ~中級グラフィックス入門~シャドウマッピング総まとめ~
中級グラフィックス入門~シャドウマッピング総まとめ~
 
【Unity】より良い表現のためのライティング戦略
【Unity】より良い表現のためのライティング戦略【Unity】より良い表現のためのライティング戦略
【Unity】より良い表現のためのライティング戦略
 
【Unite Tokyo 2019】MeshSyncを有効活用したセルルックプリレンダーのワークフロー
【Unite Tokyo 2019】MeshSyncを有効活用したセルルックプリレンダーのワークフロー【Unite Tokyo 2019】MeshSyncを有効活用したセルルックプリレンダーのワークフロー
【Unite Tokyo 2019】MeshSyncを有効活用したセルルックプリレンダーのワークフロー
 
【Unite Tokyo 2018 Training Day】ProBuilderで学ぶレベルデザイン ProBuilderをマスターしよう!
【Unite Tokyo 2018 Training Day】ProBuilderで学ぶレベルデザイン ProBuilderをマスターしよう!【Unite Tokyo 2018 Training Day】ProBuilderで学ぶレベルデザイン ProBuilderをマスターしよう!
【Unite Tokyo 2018 Training Day】ProBuilderで学ぶレベルデザイン ProBuilderをマスターしよう!
 
UE4における大規模背景制作事例 描画特殊表現編
UE4における大規模背景制作事例 描画特殊表現編UE4における大規模背景制作事例 描画特殊表現編
UE4における大規模背景制作事例 描画特殊表現編
 
猫でも分かるUE4のポストプロセスを使った演出・絵作り
猫でも分かるUE4のポストプロセスを使った演出・絵作り猫でも分かるUE4のポストプロセスを使った演出・絵作り
猫でも分かるUE4のポストプロセスを使った演出・絵作り
 
Cinemachineで見下ろし視点のカメラを作る
Cinemachineで見下ろし視点のカメラを作るCinemachineで見下ろし視点のカメラを作る
Cinemachineで見下ろし視点のカメラを作る
 
Mask Material only in Early Z-passの効果と仕組み
Mask Material only in Early Z-passの効果と仕組みMask Material only in Early Z-passの効果と仕組み
Mask Material only in Early Z-passの効果と仕組み
 
UE4における大規模背景制作事例(コリジョン編)
UE4における大規模背景制作事例(コリジョン編) UE4における大規模背景制作事例(コリジョン編)
UE4における大規模背景制作事例(コリジョン編)
 
第2回UE4勉強会 in 大阪 - マテリアル基礎・初級
第2回UE4勉強会 in 大阪 - マテリアル基礎・初級第2回UE4勉強会 in 大阪 - マテリアル基礎・初級
第2回UE4勉強会 in 大阪 - マテリアル基礎・初級
 
Practical usage of Lightmass in Architectural Visualization (Kenichi Makaya...
Practical usage of Lightmass in  Architectural Visualization  (Kenichi Makaya...Practical usage of Lightmass in  Architectural Visualization  (Kenichi Makaya...
Practical usage of Lightmass in Architectural Visualization (Kenichi Makaya...
 
実行速度の最適化のあれこれ プラス おまけ
実行速度の最適化のあれこれ プラス おまけ  実行速度の最適化のあれこれ プラス おまけ
実行速度の最適化のあれこれ プラス おまけ
 

Similaire à Maya Camera Settings to Unity

Manual after effects us
Manual after effects usManual after effects us
Manual after effects us
miacademy
 

Similaire à Maya Camera Settings to Unity (20)

Maya
MayaMaya
Maya
 
Maya
MayaMaya
Maya
 
Read mepdf v3_0_04cameracontrol
Read mepdf v3_0_04cameracontrolRead mepdf v3_0_04cameracontrol
Read mepdf v3_0_04cameracontrol
 
Virtual projector
Virtual projectorVirtual projector
Virtual projector
 
06.Programming Media on Windows Phone
06.Programming Media on Windows Phone06.Programming Media on Windows Phone
06.Programming Media on Windows Phone
 
Manual after effects us
Manual after effects usManual after effects us
Manual after effects us
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First Game
 
Building your first game in Unity 3d by Sarah Sexton
Building your first game in Unity 3d  by Sarah SextonBuilding your first game in Unity 3d  by Sarah Sexton
Building your first game in Unity 3d by Sarah Sexton
 
ANM3D-UWG-2020-12.pptx
ANM3D-UWG-2020-12.pptxANM3D-UWG-2020-12.pptx
ANM3D-UWG-2020-12.pptx
 
Cinema 4D R20 ESSENTIALS
Cinema 4D R20 ESSENTIALSCinema 4D R20 ESSENTIALS
Cinema 4D R20 ESSENTIALS
 
Tutorial il-orthophoto-dem-neogeo
Tutorial il-orthophoto-dem-neogeoTutorial il-orthophoto-dem-neogeo
Tutorial il-orthophoto-dem-neogeo
 
Fx570 ms 991ms_e
Fx570 ms 991ms_eFx570 ms 991ms_e
Fx570 ms 991ms_e
 
CamStudio User Guide - VIDEO EDITING AND MAKING SOFTWARE
CamStudio User Guide - VIDEO EDITING AND MAKING SOFTWARE CamStudio User Guide - VIDEO EDITING AND MAKING SOFTWARE
CamStudio User Guide - VIDEO EDITING AND MAKING SOFTWARE
 
Procedure of animation in 3 d autodesk maya tools &amp; techniques
Procedure of animation in 3 d autodesk maya tools &amp; techniquesProcedure of animation in 3 d autodesk maya tools &amp; techniques
Procedure of animation in 3 d autodesk maya tools &amp; techniques
 
Poser presentation1
Poser presentation1Poser presentation1
Poser presentation1
 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)
 
Tems operation steps
Tems operation stepsTems operation steps
Tems operation steps
 
TP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdfTP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdf
 
Goo Create: Import and Create
Goo Create: Import and CreateGoo Create: Import and Create
Goo Create: Import and Create
 
COMP340 TOPIC 4 THREE.JS.pptx
COMP340 TOPIC 4 THREE.JS.pptxCOMP340 TOPIC 4 THREE.JS.pptx
COMP340 TOPIC 4 THREE.JS.pptx
 

Plus de 小林 信行

ハリウッド流映画脚本講座・特別編 「ゲーム」は「キャラクター」がドライブする 〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜
ハリウッド流映画脚本講座・特別編「ゲーム」は「キャラクター」がドライブする〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜ハリウッド流映画脚本講座・特別編「ゲーム」は「キャラクター」がドライブする〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜
ハリウッド流映画脚本講座・特別編 「ゲーム」は「キャラクター」がドライブする 〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜
小林 信行
 
『天空の城ラピュタ』のエピソード構成表
『天空の城ラピュタ』のエピソード構成表『天空の城ラピュタ』のエピソード構成表
『天空の城ラピュタ』のエピソード構成表
小林 信行
 

Plus de 小林 信行 (20)

CEDEC2017 アーティストのためのリアルタイムシェーダー学習法
CEDEC2017 アーティストのためのリアルタイムシェーダー学習法CEDEC2017 アーティストのためのリアルタイムシェーダー学習法
CEDEC2017 アーティストのためのリアルタイムシェーダー学習法
 
Unite2017 tokyo toonshadermaniax
Unite2017 tokyo toonshadermaniaxUnite2017 tokyo toonshadermaniax
Unite2017 tokyo toonshadermaniax
 
Unity道場aseスペシャル補足資料
Unity道場aseスペシャル補足資料Unity道場aseスペシャル補足資料
Unity道場aseスペシャル補足資料
 
Unity道場 14 Shader Forge 102 ~ShaderForgeをつかって学ぶシェーダー入門~ カスタムライティング/トゥーンシェーダー編
Unity道場 14 Shader Forge 102 ~ShaderForgeをつかって学ぶシェーダー入門~ カスタムライティング/トゥーンシェーダー編Unity道場 14 Shader Forge 102 ~ShaderForgeをつかって学ぶシェーダー入門~ カスタムライティング/トゥーンシェーダー編
Unity道場 14 Shader Forge 102 ~ShaderForgeをつかって学ぶシェーダー入門~ カスタムライティング/トゥーンシェーダー編
 
ハリウッド流映画脚本講座・特別編 「ゲーム」は「キャラクター」がドライブする 〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜
ハリウッド流映画脚本講座・特別編「ゲーム」は「キャラクター」がドライブする〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜ハリウッド流映画脚本講座・特別編「ゲーム」は「キャラクター」がドライブする〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜
ハリウッド流映画脚本講座・特別編 「ゲーム」は「キャラクター」がドライブする 〜ヒットする、原作付きキャラクターゲームシナリオの作り方〜
 
Unity道場08 Unityとアセットツールで学ぶ 「絵づくり」の基礎 ライティング 虎の巻
Unity道場08 Unityとアセットツールで学ぶ「絵づくり」の基礎 ライティング虎の巻Unity道場08 Unityとアセットツールで学ぶ「絵づくり」の基礎 ライティング虎の巻
Unity道場08 Unityとアセットツールで学ぶ 「絵づくり」の基礎 ライティング 虎の巻
 
Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編
Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編
Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編
 
ゲームシナリオ構成法 2015版
ゲームシナリオ構成法 2015版ゲームシナリオ構成法 2015版
ゲームシナリオ構成法 2015版
 
Unityを使ったゲームデザイン超入門
Unityを使ったゲームデザイン超入門Unityを使ったゲームデザイン超入門
Unityを使ったゲームデザイン超入門
 
マネタイズセミナー「経験からモデルを導く方法論」
マネタイズセミナー「経験からモデルを導く方法論」マネタイズセミナー「経験からモデルを導く方法論」
マネタイズセミナー「経験からモデルを導く方法論」
 
ゲームデザイナーのためのキャラクター表現&コンセプトメイキング:抜粋版
ゲームデザイナーのためのキャラクター表現&コンセプトメイキング:抜粋版ゲームデザイナーのためのキャラクター表現&コンセプトメイキング:抜粋版
ゲームデザイナーのためのキャラクター表現&コンセプトメイキング:抜粋版
 
『天空の城ラピュタ』のエピソード構成表
『天空の城ラピュタ』のエピソード構成表『天空の城ラピュタ』のエピソード構成表
『天空の城ラピュタ』のエピソード構成表
 
最新Mayaを使ったUnity 5向けキャラクターセットアップセミナー&使いこなしTips
最新Mayaを使ったUnity 5向けキャラクターセットアップセミナー&使いこなしTips最新Mayaを使ったUnity 5向けキャラクターセットアップセミナー&使いこなしTips
最新Mayaを使ったUnity 5向けキャラクターセットアップセミナー&使いこなしTips
 
「ユニティちゃんを踊らせよう!」モーションキャプチャーデータのアニメーション演出
「ユニティちゃんを踊らせよう!」モーションキャプチャーデータのアニメーション演出「ユニティちゃんを踊らせよう!」モーションキャプチャーデータのアニメーション演出
「ユニティちゃんを踊らせよう!」モーションキャプチャーデータのアニメーション演出
 
『THE COMPREHENSIVE PBR GUIDE – Vol. 2: Practical guidelines for creating PBR ...
『THE COMPREHENSIVE PBR GUIDE – Vol. 2: Practical guidelines for creating PBR ...『THE COMPREHENSIVE PBR GUIDE – Vol. 2: Practical guidelines for creating PBR ...
『THE COMPREHENSIVE PBR GUIDE – Vol. 2: Practical guidelines for creating PBR ...
 
『THE COMPREHENSIVE PBR GUIDE Volume 1: The Theory of PBR by Allegorithmic』私家訳版
『THE COMPREHENSIVE PBR GUIDE  Volume 1: The Theory of PBR by Allegorithmic』私家訳版『THE COMPREHENSIVE PBR GUIDE  Volume 1: The Theory of PBR by Allegorithmic』私家訳版
『THE COMPREHENSIVE PBR GUIDE Volume 1: The Theory of PBR by Allegorithmic』私家訳版
 
Making of ユニティちゃんステージデモ in ComicMarket 86
Making of ユニティちゃんステージデモ in ComicMarket 86Making of ユニティちゃんステージデモ in ComicMarket 86
Making of ユニティちゃんステージデモ in ComicMarket 86
 
UniteJapan2013「プレイアブルプランニングのススメ」
UniteJapan2013「プレイアブルプランニングのススメ」UniteJapan2013「プレイアブルプランニングのススメ」
UniteJapan2013「プレイアブルプランニングのススメ」
 
How to inspect complete scenes with Unity?
How to inspect complete scenes with Unity?How to inspect complete scenes with Unity?
How to inspect complete scenes with Unity?
 
有限状態マシンクラスによる会話シミュレーション表情AI管理実装仕様
有限状態マシンクラスによる会話シミュレーション表情AI管理実装仕様有限状態マシンクラスによる会話シミュレーション表情AI管理実装仕様
有限状態マシンクラスによる会話シミュレーション表情AI管理実装仕様
 

Dernier

Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
russian goa call girl and escorts service
 
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Delhi Call Girls 📞9899900591 ✔️ High Profile Service 100% Safe
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
ont65320
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
russian goa call girl and escorts service
 

Dernier (20)

👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Shyam Bazar 💫💫7001035870 Model escorts Service
 
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Behala ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
Independent Sonagachi Escorts ✔ 9332606886✔ Full Night With Room Online Booki...
 
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
↑Top Model (Kolkata) Call Girls Rajpur ⟟ 8250192130 ⟟ High Class Call Girl In...
 
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
 
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
 
Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
Top Rated Kolkata Call Girls Khardah ⟟ 6297143586 ⟟ Call Me For Genuine Sex S...
 
Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448Beautiful 😋 Call girls in Lahore 03210033448
Beautiful 😋 Call girls in Lahore 03210033448
 
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...Call Girls  Agency In Goa  💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
Call Girls Agency In Goa 💚 9316020077 💚 Call Girl Goa By Russian Call Girl ...
 
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Velappanchavadi WhatsApp Booking 7427069034 call girl ser...
 
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034  Independent Chenna...
Verified Trusted Call Girls Tambaram Chennai ✔✔7427069034 Independent Chenna...
 
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
Book Paid Sonagachi Call Girls Kolkata 𖠋 8250192130 𖠋Low Budget Full Independ...
 
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Ultadanga Call Girls In All Kolkata 24/7 Provide Call W...
 
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
College Call Girls New Alipore - For 7001035870 Cheap & Best with original Ph...
 
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
5* Hotels Call Girls In Goa {{07028418221}} Call Girls In North Goa Escort Se...
 
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service👙  Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
👙 Kolkata Call Girls Park Circus 💫💫7001035870 Model escorts Service
 
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
 
↑Top Model (Kolkata) Call Girls Salt Lake ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Salt Lake ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Salt Lake ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Salt Lake ⟟ 8250192130 ⟟ High Class Call Girl...
 
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
Dakshineswar Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Se...
 

Maya Camera Settings to Unity

  • 1. Maya Camera Settings To Unity Unity Technologies Japan G.K. Community Evangelist Nobuyuki Kobayashi
  • 2. Abstruct This is how to move the Value of positon, rotation, near and far clipping planes, and FOV to Unity. • You can get the values of FOV which is calculated from the Focal Length and the Vertical Film Aperture on Maya. • You can set keys of FOV by setting keys on the channel of the Focal Length on Maya. • You can export the FBX animation data including the locator which has been simulation-baked the attributes of Maya Main camera with the MEL script.
  • 3. Sample Scene I uploaded the sample scenes under URL. http://d.pr/lLDx
  • 8. Setting Animations to Camera ● First, The name of your camera is Main_Camera, and the name of your camera’s shape is Main_CameraShape. ● Set the value of “Fit Resolution Gate” within Main_CameraShape to “Vertical” from the Attribute Editor. ● You can set the key on channels for Camera Animation below: ● Translate X/Y/Z, Rotate X/Y/Z, Focal Length at Main_Camera’s Channel Box ● If you want to set the key on FOV, you should do on Focal Length instead. ● You cannot set the key on Angle of View on Maya, because this value is calculated inside Maya. Focal Length Translate X/Y/Z, Rotate X/Y/Z
  • 9. Setting Animations to Camera Fit Resolution Gate Focal Length near and far clipping planes Translate X/Y/Z, Rotate X/Y/Z
  • 10. Making the locator ● Make the new locator with “Create>Locator” ● Change the name of the locator to “locator_Camera” When you finished the constraint of camera and locator, you will get the view like this.
  • 11. Making constraints locator to camera ● Make point and orient constraints with the position and rotation of the locator_Camera to Main_Camera. ● Select Main_Camera firstly, and select locator_Camera secondly,   Make Constraints twice: Constrain>Point, Constrain>Orient ● Check out “Maintain offset” in Option Window. ● You can get the same values of position and rotation from Main_Camera to the locator_Camera. Maintain offset
  • 12. Sending the Value of Near Clipping Plane to the Scale.X of the locator_Camera ● Select “Scale X” from the Channel Box of “locator_Camera”, and Select “Edit>Expression” from the manu of the Channel Box. ● Using the Expression Editor, copy and paste the MEL script below, inside the box named “Expression”. float $ncp; $ncp = `getAttr Main_CameraShape.nearClipPlane`; setAttr locator_Camera.scaleX $ncp; Scale X Expression Expression Edit Edit
  • 13. float $fcp; $fcp = `getAttr Main_CameraShape.farClipPlane`; setAttr locator_Camera.scaleY $fcp; Sending the Value of Far Clipping Plane to the Scale.Y of the locator_Camera ● Select “Scale Y” from the Channel Box of “locator_Camera”, and Select “Edit>Expression” from the manu of the Channel Box. ● Using the Expression Editor, copy and paste the MEL script below, inside the box named “Expression”.
  • 14. Sending the Value of FOV to the Scale.Z of the locator_Camera ● Finally select “Scale Z” and copy and paste the MEL script into Expression. float $fl; float $vfa; float $FoV; // get focalLength from CameraShape node $fl = `getAttr Main_CameraShape.focalLength`; // get verticalFilmAperture from CameraShape node $vfa = `getAttr Main_CameraShape.verticalFilmAperture`; // caluculate FOV from two values above $FoV = 2.0 * atan((0.5 * $vfa) / ($fl * 0.03937)) * 57.29578; // send FOV to scale.Z setAttr locator_Camera.scaleZ $FoV; 1 mm = 0.0393700787 inch 1 rad=180/Pi=57.29578 degree
  • 15. Simulation-Baking of the Value of Locator ● Select from Translate.X to Scale.Z on the Channel Box. ● Use the Simulation-Baking command to all keys baked, with “Edit>Keys>Bake Simulations” from menu. ● If you want optimize F-Curves, open the Graph Editor and use “Curves>Simplify Curve” from menu. All key are baked when you finish the simulation- baking. Turn red in the box Bake Simulations Keys Edit
  • 16. Export the FBX files ● It is easy to export FBX files separately for understanding: the one includes objects which have animation data, the one includes the scene objects only, finally the one includes locator_Camera only. ● You use the FBX includes locator_Camera only as the Camera path. • For example : We use the Ball.fbx (Animated Objects), the Floor.fbx (Scene files), and the MayaCamera.fbx as the camera path.
  • 18. Import the FBX files ● First of all, you must set the same scale factor of Maya and Unity before you import the camera path FBX. ● Setting below: >When your unit of scale is Meter on Maya : When you export the FBX, Set the Unit of scale as Centimeters, and the value of Scale Factor of Unity is 0.01. >When your unit of scale is Centimeter on Maya : When you export the FBX, Set the Unit of scale as Centimeters, and the value of Scale Factor of Unity is 1. ● After adjusting the scale factor, Import Ball.fbx, Floor.fbx, MayaCamera.fbx, you can get the same as scale of scene in Unity as Maya.
  • 19. >When your unit of scale is Meter on Maya : When you export the FBX, Set the Unit of scale as Centimeters, and the value of Scale Factor of Unity is 0.01. >When your unit of scale is Centimeter on Maya : When you export the FBX, Set the Unit of scale as Centimeters, and the value of Scale Factor of Unity is 1. Import the FBX files
  • 20. Setting the Main Camera of Unity to the child of MayaCamera ● Set the Main Camera of Unity to the child of MayaCamera object in Hierarchy ● Set the local position and rotation of Main Camera below: ● Position(x,y,z) = (0,0,0)、Rotation(x,y,z)= (0,180,0)、Scale(x,y,z)=(1,1,1) ● In this point, you can get the same position and rotation of Maya camera in Unity. Set the Main Camera of Unity to the child of MayaCamera object in Hierarchy Set the value of rotation.y = 180 to adjust the Maya coordinate system
  • 21. Attaching the script to MayaCamera Object ● Attach the script to MayaCamera objects below: using UnityEngine; using System.Collections; public class MayaCameraConverter : MonoBehaviour { Camera _camera; void Awake () { _camera = GetComponentInChildren<Camera>(); } void LateUpdate () { _camera.nearClipPlane = transform.localScale.x; _camera.farClipPlane = transform.localScale.y; _camera.fieldOfView = transform.localScale.z; } }