标题: Working with Unity3d,unity3d工作流程概览(下) [打印本页] 作者: 奔跑的小兔 时间: 2012-1-16 14:29 标题: Working with Unity3d,unity3d工作流程概览(下) Modeling
模型
• Support for Blender (.blend), Maya (.mb,
.ma), Cheetah3d (.jas)
• XSI SoftImage & ModTool via FBX
– colors not supported, use textures
– plot IK & constraints
– neutral pose breaks the model
• Test the pipeline from modeling software to
Unity
Animations
动画
• Imported with the model from the 3D
software
• Skeleton
– Plan for Mixin
• Consistent Naming
• Clear Hierarchy
• Same hierarchy for similar models (i.e. shared
skeleton for humanoids)
Textures
纹理
• Unity can import multilayered PSD & tiff
– no need to flat them
• Textures for game objects should be 2nx2m (2, 4,
256, 512, 1024, 2048, ...)
– older cards does not support textures larger than 1024
• GUI textures
– disable mip maps
– use clamp (not repeat)
• Alpha channel better than transparent layer
– at least in PSD
Game Project 2008-2009 8
Fonts
字体
• True type fonts (.ttf) supported
• Size definable in import setting
– duplicate & set size in import setting
• Custom fonts
– ttf font editor
– photoshop, etc.
• fonts are textures in Unity
Physics Engine
物理引擎
• Realistic physics engine
– Ageia PhysX™ physics engine
• Colliders define object shape and size
• Rigid Bodies define physical behaviour
– gravity
– persistence of movement
• Physics Materials
– friction
– bounciness
Scripts
脚本程序
• Needed for game mechanics
– the physics engine
• Javascript, C#, and Boo available
– Examples in documentation in Javascript
– Best support for C# from us
– Mixing possible in some cases
• Variables can be exposed to the Unity
graphical interface
– good for defining game object specific values
Scripts: MonoBehavior
脚本:行为事件
• Awake()
– Initializations
• Start()
– Initializations
– After all Awake() is executed for all MonoBehavior instances
• Update()
– Every called in frame
• LateUpdate()
– Called after Update()
– Use for follow camera, etc.
• FixedUpdate()
– Called every fixed framerate frame
• OnGUI():
– Called every frame
– GUI handling goes here
GUI
图形用户界面
• OnGUI()
• Can be scaled to fit different screen sizes