unity2018.3.1_如何在2018.1中充分利用新的Unity项目模板

unity2018.3.1_如何在2018.1中充分利用新的Unity项目模板

unity2018.3.1

Project Templates (introduced earlier this year in this blog post) change the way you launch a new project in Unity.  The aim of Unity Project Templates is to improve the majority of users “out of the box” Unity experience. They provide preselected settings based on common best practices for different project types such as mobile, high-end PC, 3D, 2D, VR, etc. The templates also seamlessly introduce people to new (and old) Unity features such as Scriptable Render Pipelines, Shadergraph, and the Post-Processing Stack.

项目模板(今年早些时候在此博客文章中介绍 )更改了在Unity中启动新项目的方式。 Unity项目模板的目的是改善大多数用户的“即用型” Unity体验。 它们根据常见的最佳实践为不同的项目类型(例如移动设备,高端PC,3D,2D,VR等)提供预选择的设置。模板还无缝地向人们介绍了新的(和旧的)Unity功能,例如可脚本化的渲染管线, Shadergraph和后处理堆栈。

Unity 2018.1 will ship with six Templates to choose from when you create a new project. The first two will feel familiar to veteran Unity users:

创建新项目时,Unity 2018.1将附带六个模板供您选择。 熟悉Unity的老用户将对前两个感到熟悉:

  • 2D

    2D
  • 3D

    3D

However, you can also choose from the more specialized options of:

但是,您也可以从以下更专业的选项中进行选择:

  • 3D with Extras

    具有附加功能的3D
  • Lightweight Render Pipeline

    轻量级渲染管线
  • Lightweight Virtual Reality Render Pipeline

    轻量级虚拟现实渲染管线
  • High Definition Render Pipeline

    高清晰度渲染管线

These four distinct Templates are in “Preview,” which means they introduce brand new features and workflows. As such, some of these features may be subject to change (API, UX, scope, etc.) and aren’t covered by traditional Unity support. You can report issues with Preview features on our forum page.

这四个不同的模板位于“预览”中,这意味着它们引入了全新的功能和工作流程。 因此,其中某些功能可能会发生更改(API,UX,作用域等),并且不受传统Unity支持的覆盖。 您可以在 我们的论坛页面 上报告有关预览功能 的问题

Because the 2D and 3D Templates contain familiar features and workflows, this blog post will focus on the new Preview Templates as they are a great place to explore many of the new graphics features introduced in 2018.1. Each Template includes the same example scene that you can use as a resource for learning how to make your 3D scenes visually excel, regardless of the hardware limitations of the platform you are targeting.

由于2D和3D模板包含熟悉的功能和工作流程,因此本博文将重点介绍新的预览模板,因为它们是探索2018.1引入的许多新图形功能的好地方。 每个模板都包含相同的示例场景,无论您要针对的平台的硬件限制如何,您都可以将其用作学习如何使3D场景在视觉上脱颖而出的资源。

All Templates have a Readme in the project that contains a short description of their intended purpose as well as links to documentation for the new features they introduce.

所有模板在项目中都有一个自述文件,其中包含对其预期用途的简短描述以及它们所引入的新功能的文档链接。

模板基础 (Template Basics)

So how can you get the most out of these projects? Each new Project Template shares some similar features.

那么如何从这些项目中获得最大收益呢? 每个新的项目模板都有一些相似的功能。

Because all Templates share the same example content, it is easy to compare and contrast the visual differences between using one Template over another.

由于所有模板共享相同的示例内容,因此可以轻松比较和对比使用一个模板与另一个模板之间的视觉差异。

This default content is intended to showcase how to set up lighting, materials, and post-processing for the best results on a target platform. The content itself provides a good reference for how to lightmap your meshes (for meshes marked as Lightmap Static), place light probes, and author textures for use with the Standard PBR material.

此默认内容旨在演示如何在目标平台上设置照明,材料和后处理以获得最佳效果。 内容本身为如何对网格进行光照贴图(对于标记为“静态光照贴图”的网格),放置光探针以及与标准PBR材质一起使用的作者纹理提供了很好的参考。

If you don’t want the example content in the scene you can easily delete it by deleting the ExampleAssets Object in the Hierarchy and ExampleAssets folder in the Project’s asset directory.

如果您不希望场景中出现示例内容,则可以通过删除Project资产目录中Hierarchy和ExampleAssets文件夹中的ExampleAssets对象,轻松地将其删除。

This will remove all the example content without breaking any Post-Processing or lighting settings. From here you can add your own meshes to this scene and have a well-lit asset without any additional work.

这将删除所有示例内容,而不会破坏任何后处理或照明设置。 在这里,您可以将自己的网格添加到该场景中,并且无需任何其他工作即可拥有光线充足的资产。

Here’s an example of an .fbx file imported and placed into a 3D With Extras Template in 18.1 with comparison to a 3D project in 2017.3:

这是一个导入的.fbx文件示例,并将其放入18.1中的3D with Extras模板,与2017.3中的3D项目进行了比较:

unity2018.3.1_如何在2018.1中充分利用新的Unity项目模板

Some notable improvements are outlined here:

这里概述了一些显着的改进:

unity2018.3.1_如何在2018.1中充分利用新的Unity项目模板
  1. Colors are more balanced throughout the scene; no color is too dark or too bright and we aren’t losing any details. This is because the color space is now linear by default and the scene contains post-processing that utilizes the filmatic ACES tonemapper.

    整个场景中的色彩更加平衡; 没有颜色太暗或太亮,我们也不会丢失任何细节。 这是因为默认情况下颜色空间现在是线性的,并且场景包含利用胶片ACES色调映射器的后处理。

  2. Our anti-aliasing has improved, making our scene much smoother than before. anti-aliasing (now with new options) is now controlled through our Post-Processing volume.

    我们的抗锯齿功能得到了改善,使我们的场景比以前更加流畅。 现在,可以通过我们的后期处理量来控制抗锯齿(现在有新选项)。

  3. Our shadows line up; we don’t have large gaps where two pieces of geo meet. The bias settings of our directional light have been tuned to balance between shadow contact quality while minimizing artifacting and banding.

    我们的影子齐齐; 我们在两个地理区域相交处没有大的空隙。 我们已经调整了定向光的偏置设置,以在阴影接触质量之间取得平衡,同时最大程度地减少伪影和条纹。

  4. The scene has ambient occlusion to make everything feel more grounded. This is, again, due to the addition of post-processing in our project.

    场景具有环境光遮挡,使所有物体都更加扎实。 同样,这是由于在我们的项目中增加了后处理。

There are some other perks found in all the Templates.

在所有模板中还发现了其他一些好处。

By default you will now find a script on the Camera that allows for simple WASD navigation through the scene and the speed of your movement is tunable via the camera inspector. This allows you to quickly navigate while in Play to inspect your geometry without having to write any C# code. (Note: the VR Template has a unique script for VR movement.)

默认情况下,您现在将在摄像机上找到一个脚本,该脚本允许在场景中进行简单的WASD导航,并且可以通过摄像机检查器调整运动速度。 这样一来,您无需编写任何C#代码,即可在游戏中快速导航以检查几何体。 (注意:VR模板具有用于VR移动的唯一脚本。)

There are also a number of presets, most notably those that can help set import settings for textures and audio.

还有许多预设,最著名的是可以帮助设置纹理和音频的导入设置的预设。

Let’s look at texture presets as an example. By default, the Template will assume a texture is an albedo, but if it is a normal map or for another purpose simply hit the preset button and select the appropriate preset option from the list.

让我们以纹理预设为例。 默认情况下,模板将假定纹理是反照率,但是如果它是法线贴图或出于其他目的,只需单击预设按钮,然后从列表中选择适当的预设选项。

Different Templates have separate import settings that have been tuned for that Template’s purpose.

不同的模板具有单独的导入设置,已针对该模板的目的对其进行了调整。

Now that we’ve covered the basics let’s look at the purpose each Template serves.

现在,我们已经涵盖了基础知识,让我们看一下每个模板服务的目的。

具有附加模板的3D (3D with Extras Template)

This Project Template is a great starting point for a brand new user looking to experiment and learn more about using Unity. It uses Unity’s built-in render pipeline so you can easily find answers to questions and tutorials online. It is also great for artists who want to easily see what their content looks like in a balanced, outdoor lighting scenario.

对于希望尝试并了解有关使用Unity的更多知识的新用户来说, 该项目模板 是一个很好的起点。 它使用Unity的内置渲染管道,因此您可以轻松地在线找到问题和教程的答案。 对于想要在平衡的室外照明场景中轻松查看其内容外观的艺术家来说,这也非常有用。

轻量级渲染管道模板 (Lightweight Render Pipeline Template)

This Template is setup to use the Lightweight Render Pipeline which is an easily accessible example of the new Scriptable Render Pipeline feature shipping with Unity 2018.1. The Lightweight Render Pipeline is optimized towards delivering high performance across lower-end hardware and resource intensive media such as VR.

该模板设置为使用 轻量级渲染管道 ,这是 Unity 2018.1附带 的新的 可脚本渲染管道 功能 的易于访问的示例 。 轻量级渲染管道 经过优化,可在低端硬件和资源密集型媒体(例如VR)上提供高性能。

As stated above, this Template was created with performance in mind. Not only are settings adjusted to use the Lightweight Render Pipeline, the project, lighting, and post-processing settings have been tuned for more performant results and to only include features that work with the Lightweight Render Pipeline. This makes it a great starting point for users targeting a broad range of mobile platforms, low-end to mid-tier hardware, or for developers making games that have limited realtime lighting needs.

如上所述,创建此模板时会考虑性能。 不仅调整了设置以使用“轻量级渲染管道”,还调整了项目,照明和后处理设置,以实现更佳的效果,并且仅包括可用于“轻量级渲染管道”的功能。 对于面向各种移动平台,低端到中端硬件的用户,或者对于制作实时照明需求有限的游戏的开发人员来说,这是一个很好的起点。

When using the Lightweight Render Pipeline a number of rendering settings have been moved to a special asset in your project. This Template comes with multiple of these setting assets allowing you to further customize your project based on what type of hardware you are targeting.

使用轻量级渲染管道时,许多渲染设置已移至项目中的特殊资产。 该模板带有多个设置资产,可让您根据要定位的硬件类型进一步自定义项目。

By default the project uses the LWRP-High asset to showcase the best visual results.

默认情况下,项目使用LWRP-High资产展示最佳视觉效果。

Try out the other ones by changing the Scriptable Render Pipeline asset in the Graphics Settings (Project Settings -> Graphics).

通过在“图形设置”(“项目设置”->“图形”)中更改“可脚本绘制的渲染管线”资源来尝试其他方法。

Some additional characteristics you’ll notice while working with this template is a new set of Standard Shaders (all included assets use the new Standard Physically Based shader) and that only one real-time shadow casting light is supported (in this case, the spotlight in our construction scene).

使用此模板时,您会注意到的一些其他特征是一组新的标准着色器(所有包含的资产均使用新的基于物理的标准着色器),并且仅支持一个实时阴影投射光(在这种情况下,聚光灯在我们的施工现场)。

This Template also includes the new Shader Graph tool. You’ll be able to create shader graphs via Create -> Shader and selecting one of the Graph options (PBR Graph, SubGraph, Unlit Graph).

该模板还包括新的“ Shader Graph” 工具。 您将可以通过“创建”->“着色器”并选择“图形”选项之一(“ PBR图形”,“子图形”,“未照明图形”)来创建着色器图形。

轻量级虚拟现实渲染管道模板 (Lightweight Virtual Reality Render Pipeline Template)

The Lightweight VR Template is very similar to the normal Lightweight Template, except it is more optimized (by default it only uses one pixel light, hdr is off, and only two shadow cascades) and some settings are tuned specifically for Virtual Reality (Post-Processing, anti-aliasing, texture anisotropic filtering, etc).

轻量级VR模板与普通的轻量级模板非常相似,不同之处在于它是经过优化的(默认情况下,它仅使用一个像素的光,hdr处于关闭状态,并且只有两个阴影级联),并且某些设置专门针对虚拟现实进行了调整(后置处理,抗锯齿,纹理各向异性过滤等)。

There is also a VR Camera Rig setup designed to work with multiple VR headsets. It also includes options to use Stationary or Room Scale (when applicable) and set camera height for stationary experiences.

还有一个VR摄像机装备设置,旨在与多个VR耳机配合使用。 它还包括使用固定比例尺或房间比例尺(如果适用)以及设置相机高度以进行固定体验的选项。

By default it assumes a seated, stationary experience.

默认情况下,它假设您坐着就坐,静止不动。

This means you can just put on your headset, hit play, and enter the experience right away.

这意味着您可以戴上耳机,点击播放并立即输入体验。

There are also containers setup for Left and Right Hand Controllers using the Tracked Pose Driver. Just add some geometry and you’ll be able to see your virtual hands without any additional work.

还使用“跟踪姿势驱动程序”为左右手控制器设置了容器。 只需添加一些几何图形,您就可以看到虚拟手,而无需进行任何其他工作。

高清晰度渲染管线模板 (High-Definition Render Pipeline Template)

Our last new Template is the High-Definition Render Pipeline Template. The High-Definition Render Pipeline prioritizes stunning, high-fidelity visuals and is intended for high-end hardware: GPU-compute-capable consoles, and PC hardware (DX11 and above, Xbox One, PS4, Metal (macOS), and Vulkan (PC)).

我们的最后一个新模板是“高清晰度渲染管线模板”。 在 高清渲染管线 优先惊人的,高保真的视觉效果和适用于高端硬件:GPU-计算能力的设备和PC硬件(DX11及以上,使用Xbox One,PS4,金属(MacOS之外),和福尔康( PC))。

Because this Template was created to deliver great visuals the render pipeline asset, project, lighting, and post-processing settings have been tuned with a high-end experience in mind. This makes it a great starting point for developers who want to make games with realistic, believable graphics that target high-end platforms and utilize the latest in rendering advancements.

由于创建此模板的目的是为了提供出色的视觉效果,因此渲染管线资产,项目,照明和后处理设置在调整时会考虑到高端体验。 对于想要使用逼真的,逼真的图形制作游戏的开发人员来说,这是一个很好的起点,这些图形针对高端平台并利用最新的渲染功能。

The High-Definition Scriptable Render pipeline introduces a lot of new features, some of which you’ll see right away when exploring this Template. These include a new light editor with several additional light properties, new materials with new options (including several advanced material types such as subsurface and clear coat), volume-based scene settings (these control aspects of your projects such as your sky, fog, and shadow cascade settings), and a subsurface profile asset that includes examples for skin and foliage.

高清晰度脚本渲染管道引入了许多新功能,在探索此模板时,您会立即看到其中的一些功能。 其中包括具有多个其他灯光属性的新光源编辑器, 具有新选项的新材料(包括几种高级材料类型,例如地下和透明涂层) ,基于体积的场景设置(这些 项目的 控制 方面,例如天空,雾,和阴影级联设置),以及 包含皮肤和树叶示例 的 地下轮廓资源。

Some other new features accessible in this template include a large suite of new debug options, Layered Materials, Decals, and real-time Area Lights.

此模板中可访问的其他一些新功能包括一整套新的调试选项,分层材质,贴花和实时区域灯光。

项目模板向前发展! (Project Templates moving forward!)

As you can see there is a lot to explore and learn about with Templates! We hope they will help you get the best visuals out of your new projects.

如您所见,使用模板可以进行很多探索和了解! 我们希望他们能帮助您从新项目中获得最佳视觉效果。

You can expect many updates for Templates in the future. In addition to more new project Templates (some more for XR are close on the horizon), we are also working towards allowing users to create and share their own Templates – a feature we are all super excited about!

您可以预期将来会有许多模板更新。 除了更多的新项目模板(即将推出XR的更多模板),我们还致力于允许用户创建和共享自己的模板-我们都非常兴奋的功能!

Today these Templates are just the beginning, but we see them as a great starting point. With Templates there are fewer barriers to learning which project settings are best for making your scenes look good, which means more time for the fun parts: creating worlds and experiences for your users!

今天,这些模板仅仅是开始,但我们认为它们是一个很好的起点。 使用模板,学习哪种项目设置最适合使场景看起来更好的障碍就更少了,这意味着更多的时间用于有趣的部分:为用户创建世界和体验!

翻译自: https://blogs.unity3d.com/2018/04/26/how-to-get-the-most-out-of-the-new-unity-project-templates-in-2018-1/

unity2018.3.1