- Unity 2018 Shaders and Effects Cookbook
- John P. Doran Alan Zucconi
- 356字
- 2021-06-18 19:04:12
How to do it...
- We first create a new Post Processing Profile by right-clicking within the Assets folder in the Project window and then selecting Create | Post Processing Profile. Once selected, it will allow us to rename the item. Go ahead and set the name to HorrorProfile.
- Select the Post-process volume object and, from the Inspector window, go to the Post Processing Volume component and assign the Profile property to the HorrorProflie we just created.
- Unlike previous settings, though, the fog settings are located in the Lighting window, which can be accessed by going into Window | Lighting.
- From there, scroll all the way to the bottom until you reach the Other Settings option. Once there, check Fog and set the color to a value that is close to the skybox. I used the following settings:

If you know the hex values of the color from your graphic editing software you can just type it in the Hex Color property of the Color window.
- Next, change the Mode to Exponential and the Density to 0.03:

As you can see, it's already much more spooky that it was previously, but there are still more options that we can change.
- Open up the HorrorProfile again and go to the Inspector tab. Press the Add effect... button and select Unity | Ambient Occlusion. Check the Mode option and select Scalable Ambient Obscurance. Afterward, change the Intensity to 2 and the Radius to 20:

- Lastly, lighting often has a big effect on the theme of a scene as well. If you're using the example map, select the Directional Light object in the Hierarchy tab and, from the Inspector tab under the Light component, change the Intensity to 0.5 and then adjust the Color to something darker. (I used the same color as in step 4 with a HEX of 5F7684FF.)
- Save your game and then start it to see the effect of all of the changes:

The final result of our horror look
推薦閱讀
- Docker and Kubernetes for Java Developers
- Getting Started with CreateJS
- Access 2010數據庫基礎與應用項目式教程(第3版)
- Learning Raspbian
- UML 基礎與 Rose 建模案例(第3版)
- C語言程序設計
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- 現代C++編程實戰:132個核心技巧示例(原書第2版)
- UI設計全書(全彩)
- Extending Unity with Editor Scripting
- jQuery技術內幕:深入解析jQuery架構設計與實現原理
- Angular Design Patterns
- 算法訓練營:海量圖解+競賽刷題(入門篇)
- Android開發進階實戰:拓展與提升
- Slick2D Game Development