官术网_书友最值得收藏!

How it works...

As we've seen in previous recipes, materials are not homogeneous entities. And we are not even talking about the ones in real life, but, of course, the ones we have created within Unreal. The mathematics and functions used to describe the different shading and blend modes carry a weight with them that vary from one type to the next. Knowing how heavy each of them is can be a complicated task to burden oneself with, but having an overall idea is key to running a well-oiled application.

In the previous pages, we've taken a look at some examples, which included an opaque material and a translucent one—examples that we've worked on in the past. However, we need to keep in mind that there are more types we can—and will—encounter in the future. Unreal includes the following different shading models, which I will list now in order of how costly they are to render:

  • Unlit
  • Default lit
  • Preintegrated skin
  • Subsurface
  • Clear coat
  • Subsurface profile

(The other shading models—hair and eye—are very specific to characters and we will cover them in the appropriate section.)

Of course, the actual cost of a material depends on how complex we make the graphs for each of them, but that previous order applies to base materials with nothing more applied to them. On top of that, there are options within each type that can make them more or less expensive to render: having a material being two-sided or use a particular type of translucency can increase the cost to the GPU, for example.

On top of this, there are other things to be considered in terms of efficiency that we might want to keep in mind. Epic has created some performance guidelines for artists that highlight where we should be focusing our attention in order to keep our applications running well. You can take a look at them at the following link: https://docs.unrealengine.com/en-us/Engine/Performance/Guidelines.

We've used this recipe to take a look at how fast Unreal can process different types of shaders. We've done so by comparing an opaque material against a translucent one, which gives us a good idea about how instruction counts vary and how efficient some shaders are compared to others. Not only that, we've also had the opportunity to see what optimization tools are available for anyone using the engine. All in all, there is a wide variety of options that give the user control over how well their application runs, and now we are in a position in which we know how to use them.

主站蜘蛛池模板: 天镇县| 潮州市| 西华县| 呼伦贝尔市| 齐河县| 遵义县| 荔浦县| 枣阳市| 龙岩市| 孟津县| 呼玛县| 乌鲁木齐县| 巧家县| 天长市| 西乌| 荔浦县| 明水县| 凤翔县| 新乡县| 正定县| 柳州市| 承德县| 会理县| 斗六市| 陕西省| 巴林左旗| 新郑市| 岑巩县| 塘沽区| 响水县| 枣庄市| 玉溪市| 高雄县| 嘉义县| 台南县| 丰顺县| 沙坪坝区| 乐山市| 光泽县| 玉溪市| 白城市|