Unity Graphics (Unity 图形渲染 )
- Everything for Lighting and Rendering in Unity
- 主要涉及到光照与渲染方面的知识
本文档主要是对Unity官方教程的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://unity3d.com/cn/learn/tutorials/s/graphics
下面是将要介绍的章节,黑体是本次内容:
- Introduction to Lighting and Rendering(1)
介绍光照和渲染(1) - Precomputed Realtime GI (Realtime Global Illumination)
预处理实时全局光照 - Rendering and Shading
渲染与着色 - Cameras and Effects
相机与效果 - Geometry in Unity
几何体
1. Introduction to Lighting and Rendering
1.介绍光照和渲染
Modern game lighting makes extensive use of ‘global illumination’.
现在的游戏光照系统广泛使用“全局光照”。
Global illumination, or ‘GI’, is a term used to describe a range of techniques and mathematical models which attempt to simulate the complex behaviour of light as it bounces and interacts with the world. Simulating global illumination accurately is challenging and can be computationally expensive. Because of this, games use a range of approaches to handle these calculations beforehand, rather than during gameplay.
全局光照,或GI,是指用大量技术和数学模型来尝试模拟光照与世界碰撞和交互的复杂行为的一种描述。但模拟出精确的全局光照也是一种挑战,并且计算量庞大。由此,很多游戏会提前用大量方式处理这些计算,而不是在运行时计算。
The same scene: With no lighting (Left), with ‘direct light’ only (Center) & with indirect ‘global illumination’ (Right). Note how colors are transferred as light ‘bounces’ between surfaces, giving a much more realistic result.
上图左为无光照,中间为只有直接光照,右图为全局光照。注意光照在表面的碰撞,表现的更加真实
In this document we will give you an overview of how GI works in Unity. We will walk you through the different lighting techniques available, explain how to setup your project for lighting and then explore the various tools at your disposal when considering how to light a scene.
此文档将概述GI是如何在Unity内部运行的。通过介绍不同的光照技术,便于你在考虑设计自己场景光照时如何建立光照和使用丰富的工具。
2. Choosing a Lighting Technique
2.选择光照技术
Broadly speaking, lighting in Unity can be considered as either ‘realtime’ or ‘precomputed’ in some way and both techniques can be used in combination to create immersive scene lighting.
一般说来,Unity中光照一般使用包括 “实时”或“预计算”,或者两者结合达到光照逼真效果。
In this section we will give a brief overview of what opportunities the different techniques offer, their relative advantages and individual performance characteristics.
下面将简单介绍这两种技术,及他们相对优