2014-09-02 21:58:22|?次阅读|上传:huigezrx【已有?条评论】发表评论
关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网
Unity Manual>Advanced> Optimizing Graphics Performance > Optimizing for integrated graphics cards
Unity手册->高级->优化图形性能->针对集成显卡优化
Polygon count matters 多边形计算材料
On most graphics cards today, polygon count does not really matter. The common knowledge is that object count and fillrate is much more important. Unfortunately, not so on the majority of integrated chips (most of them being Intel cards). Every polygon matters. How much it matters depends on the complexity of the vertex shaders or lighting and the speed of the CPU (thats right, most integrated cards transform & light vertices on the CPU).
在大多数显卡今天,多边形数量其实并不重要。对象数量和填充率的常识是非常重要的。不幸的是,不是对多数(其中大多数是英特尔卡)集成芯片。每个多边形内容。多少取决于它的内如对顶点着色或照明设备和CPU速度的复杂性。(集成度最高的显卡变换和顶点光在CPU上)
Big Bang Brain Games never went above 25,000 triangles in a scene using 1-2 vertex lights and no pixel lights. Quality Settings were used to speed up performance automatically when frame rate drops. So on higher end machines a higher quality setting was used which had pixel lights enabled.
大爆炸电脑游戏从来没有超过25,000三角形在一个场景里使用1-2顶点光源和没有像素光源。质量设置被用来自动加速性能当帧速率下降时。所以在高端更高质量的设置是用启用高精度的像素光源。
What slows things down is drawing objects multiple times, using complex vertex shaders and lots of polygons. This means:
什么东西慢下来是绘图对象多次,使用复杂的顶点着色器和大量的多边形。这意味着:
Optimize model geometry 优化模型几何结构
When optimizing the geometry of a model, there are two basic rules:
当优化一个模型的几何结构,有2个基本规则:
Note that the actual number of vertices that graphics hardware has to process is usually not the same as displayed in a 3D application. Modeling applications usually display the geometric vertex count, i.e. number of points that make up a model.
请注意,顶点的实际数目图形硬件的过程通常是不一样的在3D应用里显示出来。建模应用程序通常显示几何顶点计数,例如:点的数即构成一种模式。
For a graphics card however, some vertices have to be split into separate ones. If a vertex has multiple normals (it's on a "hard edge"), or has multiple UV coordinates, or multiple vertex colors, it has to be split. So the vertex count you see in Unity is almost always different from the one displayed in 3D application.
然而对于显卡,一些顶点必须纳入单独的分开。如果一个顶点有多个标准(这是一个“硬优势”),或有多个UV坐标,或多个顶点颜色,它必须被分割。因此,你看到顶点计数在Unity里几乎总是不同于在3D应用程序里的一个显示。
Bake lighting. 烤光源
Bake ligthing either into lightmaps or vertex colors.烤光源要么进入到光映射或顶点颜色。
Maya has good builtin lightmapping tools. Unity can import secondary UV maps or vertex colors from Maya.
Maya具有良好的内建光源映射工具。Unity可以从Maya导入紫外线地图或顶点颜色。
The process of generating a lightmapped environment takes a little longer than just placing a light in the scene in Unity, but:
在生成处理一个光源映射环境需要一点长的时间仅是放置一个光源在Unity的场景里,但是:
Even next-gen games like Gears of War still rely on lightmapping a lot. Usually they use lightmapped environments and place dynamic lights on top. The builtin Lightmapped shaders can do exactly that in Unity!
即使未来像战争机器游戏仍然依赖于光映射很多。通常它们使用光源映射环境和放置动态光在上面.内置的光映射阴影可以做到这点在Unity里!