查看: 1786|回复: 6
打印 上一主题 下一主题

Working with Unity3d,unity3d工作流程概览(下)

[复制链接]

1602

主题

1

听众

2万

积分

资深设计师

Rank: 7Rank: 7Rank: 7

纳金币
24658
精华
6

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2012-1-16 14:29:24 |只看该作者 |倒序浏览
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

– GUI.matrix = ...

• Design layout and gui elements for some

arbitrary size

– e.g., 1280x854

• GUI.skin

• GUI & GUILayout methods

– button, label, box, ...
Sound
声音
• Supports common audio formats

• Native support for localized 3D sound

effects

• Plugin (for example FMOD) needed for

more sophisticated soundscapes

– Sync events with the music beat

– Modelling echoes caused 3d space

– Reactive sounds
Plugins
插件
• Possibilities to extend functionality of

Unity

– Wiimote support

– FMOD

– Audio input

• Plugins are not possible to use with

Web Player
Optimizing Models
模型优化
• Aim for 1500–4000 triangles / object

– combine near objects if they have less than 1500 triangles

• Aim for single material (+ texture) for an object

– the object will be drawn once for each material; an object

with 10 materials is drawn 10 times

– texture maps

• Characters

– 2500–5000 triangles

– 15–60 bones

– one material
Optimizing Scenes
场景优化
• Pixel lights are expensive

– object is rendered once for every pixel light

– use them for dynamic lights

– light maps for static lights (or draw lights directly

to textures)

• Dynamic Shadows

– soft shadows are more expensive than hard

– if problems with frame rate: thing using blob

shadows and shadow projectors
Optimizing Scripts
脚本优化
• Optimize if frame rate drops below 30

in low end target machine

• Avoid heavy operation in Update() and

inner loops

• Use MonoBehavior.enabled to

disable/enable scripts

• Java script & Boo: avoid Duck Type
• Light operations: plus, minus, times

• division takes ~20 times more cycles

(compared to light operations)

• Heavy operations: square root, sin, cos

(~40–50 times more)

• Heavy operations: Normalize, Distance

– distance*distance > dif.sqrMagnitude

• Heavy operations: raycasting, Object.Find,

FindObjectOfType,

FindGameObjectsWithTag
Lies
• Characters:

– 5000–7000 triangles

– multiple objects (eyes, eyelids, etc.)

– toon shader / flat shader

• Location models are rather high poly

– flat shaders

– unoptimized in terms of materials

• One directional light

• Postprocessing effects + texture animations

• Playable in PowerBook G4

– frame rate ~10 (should stay over 30)
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-2-8 23:25:17 |只看该作者
跑着去顶朋友滴铁
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

板凳
发表于 2012-3-30 23:33:15 |只看该作者
不错不错,收藏了
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

地板
发表于 2012-7-6 23:24:34 |只看该作者
呵呵,真得不错哦!!
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

5#
发表于 2012-7-15 23:28:13 |只看该作者
“再次路过……”我造一个-----特别路过
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

6#
发表于 2012-8-28 23:39:33 |只看该作者
俺是新人,这厢有礼了!
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2013-3-7 23:22:46 |只看该作者
加精、加亮滴铁子,尤其要多丁页丁页
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2024-9-21 11:05 , Processed in 0.669605 second(s), 33 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部