ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

04.Rendering on Game Engine

2022-04-08 14:02:05  阅读:284  来源: 互联网

标签:Engine into cache Rendering Game GPU Modeling CPU


 

 

Challenges on Game Rendering

1.Tens of thousands of objects with different type of effects.

2.Deal with architecture of modern computer with complex combination of CPU and GPU

3.Commit a bullet-proof framerate

  -30FPS(60FPS,120FPS+VR)

  -1080p,4K and 8K resolution

4.Limit access to CPU bandwidth and memory footprint.Game logic, network, animation, physics, and AI system are  major consumers of CPU and major memory

Rendering on Game Engine is a heavily optimized software framework to fulfill the critical rendering requiremennts of games on modern hardware(PC,console and mobiles)

 

 

 

 

 

 

 

 

 

 Modern GPU architecture:

 

 Fermi架构

 

 sin cos等特殊运算

 

 冯诺依曼架构,计算和数据分开。数据传输消耗很大,因此尽可能不回读数据,单向传输数据。

 

 

做一次加减乘数a+b可能只用一个clock,但是a在cache中找不到要在内存中找,这要花费一百多个clock。因此尽可能把数据放在一起,在缓存中找到了,cache hit;数据不再缓存中,cache miss。

 

GPU Bounds and Performance 

Application performance is limited by:

-Memory Bounds

-ALU Bounds 数学运算太多了

-TMU(Texture Mapping Unit) Bound

-BW(Bandwidth) Bound

.......

 

 

 

 Renderable

 

 

 

 

 

 smarter way to save data:

 

 

 

 

 

 视觉材质和物理材质是两回事

 

 

 

 

 

 

shader是源码也是数据

 

Render objects in Engine:

 

 

 

 

 

 divided into submesh according to different material.But we will insert all verter into one buffer

 

 

 

 

 

 

 

 rendering每一次为gpu设置了数据,更换数据(set pass call)并不高效,。因此可以把同material的object先绘制,更高效

 

 

尽可能一个drawcall绘制相同submesh和material的instance

Visibilty Culling

视锥外的object其实是看不见的,

 

 

 

 

 

 

 

 要考虑动态物体结构的再构建

 

 

 

 

 

 所谓的开放世界实际也分成了不同的zone

 

 Texture Compression:A must-know for game engine

 

 block-based

 

 

Authoring tools of modeling

Modeling of Polymodeling:3dmax,maya,blender

Modeling of Sculpting:Zbrush

Modeling -Scanning

Modeling -Procedural Modeling:Houdini,Unreal

Clustered-Base Mesh Pipeline:

Divide a complex mesh into a fixed-size cluster(like 32/64 triangle)

 

 

 

 

 

 We can do culling based on mesh clusters instead of object

 

 

In UE5 Nanite:

-Hierarchical LOD clusters with seamless boundary

-Don't need hardware support, but using  a hierarchical cluster culling on the precomputed BVH tree by persistent threads(CS) on GPU instead of task shader

 

Take Away

1.The design of game engine is deeply related to the hardware architecture design

2.A submesh design is used to support a model with multiple materials

3.Use culling algorithms to draw objects as possible

4.As GPU become more powerful, more and more work are moved into GPU, Which is called GPU Driven

 

标签:Engine,into,cache,Rendering,Game,GPU,Modeling,CPU
来源: https://www.cnblogs.com/pisconoob/p/16116521.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有