面向Unity平台的Shader游戏特效模块的设计与实现

 2022-06-20 11:06

论文总字数:24528字

摘 要

游戏美术是决定游戏上限的最重要的因素,为适应时代潮流,让游戏在游戏市场保持活力,游戏美术必须得到重视。在游戏中,游戏美术承担的角色并不只是美术那么简单。游戏美术表现能承接游戏剧情,用美术的方式增加玩家对游戏的代入感,并且给予玩家最直接的游戏体验,所以游戏美术对于游戏的重要性可想而知。而特效模块则是将这些效果加以升华,使游戏美术给人的美术感官达到最大化。

本文正是针对游戏美术模块的分析与设计。本文设计及实现的模块是针对《Jump》小游戏的Shader特效模块,《Jump》是一个仿微信跳一跳的小游戏,为给该游戏提升吸引力,改善操作手感,以满足现今社会游戏玩家对游戏的基本美术需求。

本文的主要工作如下:

  1. 结合《Jump》游戏大场景进行了美术风格分析,设计整体游戏美术特效,并进行整体风格适配,最后得出了需求解决方案。
  2. 面向Unity平台,基于Unity Shader技术,本论文将需求解决方案拆分为游戏整体环境素描特效和跳跃时的重影。随实时光照使环境呈现不同的阴影素描效果,动态获取光照信息与游戏内模型信息进行逻辑处理,将计算结果划分为多个梯度,按照梯度等级赋予不同密集程度的素描贴图,形成整体的素描效果。
  3. 在玩家操作交互方面,使用屏幕后处理技术增加了跳跃模糊重影的效果。
  4. 完成上述分析及解决方案的实现后,对获得的Shader实际效果进行整体适配调整,本论文综合美术人员的意见进行美术把控。

本文在对《Jump》小游戏的Shader特效模块的需求分析、解决方案设计及实现后,还对可能产生的性能问题进行了优化,使用批处理技术及LOD技术确保市面上大多数手机都能较完美的运行《Jump》小游戏。另外在大多数程序员在开发Unity Shader都会遇到的调试难题方面也找到了相关解决办法,保证了开发效率。

关键词:Unity 、Unity Shader、素描、重影

Design and Implementation of Shader Game Effect Module for Unity Platform

71114133 yun wen

School Advisor Qinjian Ni

Enterprise Advisor Guyue Yan

Abstract

Game art is the most important factor to determine the upper limit of the game. In order to adapt to the trend of The Times and keep the game alive in the game market, game art must be valued. In the game, the role of game art is not just art. Game art performance can undertake the plot, with the art of way to increase the sense of players of the game, and gives the most direct game experience, so the importance of game art for the game. The special effects module sublimates these effects to maximize the artistic sense of game art.

The module of the design and implementation is to the game Shader effects module of a game named Jump, Jump is a small game that imitation Wechat jump game, to enhance attraction for the games, and improve the operating handle, that meet the current social game players of the game's basic requirements of fine arts.

The main work of this article is as follows:

  1. The art style analysis was carried out in combination with the big game scene of Jump, and the overall game art special effects were designed, and the overall style was matched. Finally, the demand solution was obtained.
  2. Facing the Unity platform, based on the Unity Shader technology, this paper divides the demand solution into the overall environment sketch effect and the double image when jumping. With real-time environment brings different light shadow sketch effect, dynamic lighting information and game logic model of information processing, the calculated results are divided into multiple gradient, according to the gradient given the sketch map of different intensity, form the whole sketch effect.
  3. In terms of player's operation and interaction, the use of screen post-processing technology increases the effect of jumping blur and shadow.
  4. After the completion of the above analysis and the implementation of the solution, the overall adaptation and adjustment of the acquired Shader actual effect will be carried out, and the art will be controlled according to the opinions of the art personnel in this paper.

This article in to little game 《Jump》 Shader effects module requirements analysis, solution design and implementation, also optimizing for possible performance problem , using batch processing technology, and LOD technology to ensure the most cell phones on the market can be a perfect run 《Jump》 small game. In the most programmers in the development of Unity Shader will meet debugging problems also find the relevant solution, ensure the development efficiency.

KEY WORDS:Unity 、Unity Shader、Sketch、Ghosting

目录

第一章 绪论 1

1.1. 游戏业的发展 1

1.2. 游戏平台的多样化 2

1.3. 游戏玩家对游戏的追求 2

1.3.1. 游戏玩法 2

1.3.2. 游戏操作性 2

1.3.3. 游戏剧情 2

1.3.4. 游戏美术 3

1.4. 本文目标产品 3

第二章 论文相关技术 4

2.1. 图形学 5

2.2. Shader概述 5

2.3. Shader Model 5

2.4. Shader到Unity Shader 5

2.4.1. 内部架构 6

2.4.2. Shader渲染流水线 6

2.4.3. 屏幕投影 7

2.4.4. ShaderLab 10

2.4.5. 渲染后处理技术 11

2.4.6. 性能优化 11

2.5. Unity Shader的应用 11

2.6. Shader与3D游戏 12

2.7. Shader的难题 12

2.8. 本章小结 12

第三章 Shader模块的分析与设计 13

3.1. 美术风格的设计 14

3.2. 用户体验的设计 14

3.3. Shader特效实现方法的设计 15

3.3.1. 主体素描风格 15

3.3.2. 屏幕后处理模糊重影特效 15

3.3.3. 性能优化 15

3.4. 实时调试 16

3.5. 本章小结 17

第四章 Shader模块解决方案的实现——Shader实效 18

4.1. 跳跃的重影 18

4.2. 全景的素描风格 20

4.3. 本章小结 22

第五章 总结与展望 23

致谢 24

参考文献 25

绪论

随着时代的进步和城市建设的发展,人们的生活在变得更加便利的同时也对生活品质的要求越来越高。人们现在对生活的追求已经不局限得满足于吃饱喝足,而是想要更加丰富多彩的生活。近年来,随着电子产业的飞速发展,每家每户的电子设施变得愈来愈多,手机、电脑几乎成为了必需品,,手机、电脑等工具的出现成为了人们日常生活日益丰富的最佳平台,似乎有着推翻电视机统治的局面。于是当茶余饭后清闲的时候,人就会想要找点乐子,于是电子游戏时代浮出水面。最早有记录的电子游戏诞生于1952年,为井字棋游戏(Tic-tac-toe),运行于真空管计算机上。早期的游戏受限于硬件设备,最多只能到达满足人们“玩”游戏的需求的高度,而世界发展到现在,硬件问题已经大幅改善。

二十一世纪的到来,科技在不断地发展,全世界范围内都在不断地发电子科技。正因如此,电子游戏也日益浮出水面。如今社会,电子游戏几乎成为了人们生活中不可缺少的一部分。

游戏业的发展

游戏最早的发源时间可以追溯到很久很久以前的荷兰时代,著名游戏学研究专家约翰·赫伊津哈是游戏领域的开元鼻祖。尽管当时并没有明确的游戏学定义,游戏在整个世界范围内也只是出于萌芽状态,他依然充当了先驱的角色。赫伊津哈曾经说道:游戏是游戏玩家以自愿的形式接受的一种愉悦活动,在一个固定的时间和空间范围内游戏内有规则进行着。而游戏的目的就是获得紧张、愉快、思考的情感经历。

剩余内容已隐藏,请支付后下载全文,论文总字数:24528字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;