UE4 Graphics Profiling: Pipeline and Bottlenecks

  Рет қаралды 43,712

Tech Art Aid

Tech Art Aid

Күн бұрын

Learn about the pipeline in modern desktop GPUs and how it affects your game content's performance.
Get project files: techartaid.com/products/
Vertex, pixel and memory-related sources of trouble are explained. Optimization viewmodes are shown, as a tool for early detection of bottlenecks.
All parts playlist: • UE4 Graphics Profiling
Chapters:
00:00 Introduction
01:35 Anatomy of a frame. 'Stat unit' command
03:06 Types of shaders
03:55 Draw calls
04:45 Pixel-bound problems. Translucency
06:44 Quad overdraw
08:15 Vertex-bound problems
09:45 Memory-related problems
12:18 Deferred vs. Forward rendering
14:00 Optimization Viewmodes
20:29 Texture statistics
Thanks to early reviewers: Mikołaj Fabjański and Ch Hope.
Links and sources:
[1] "A trip through the Graphics Pipeline 2011" (amazing in-depth series about pipeline): fgiesen.wordpress.com/2011/07...
[2] "GPU Gems 3 - Deferred Shading in Tabula Rasa" (deferred theory): http.developer.nvidia.com/GPUG...
[3] "How bad are small triangles on GPU and why?": www.g-truc.net/post-0662.html
[4] "Counting Quads" (quad overdraw explained): blog.selfshadow.com/2012/11/12...
[5] "GPU Performance for Game Artists": fragmentbuffer.com/gpu-perform...

Пікірлер: 100
@wii58739
@wii58739 3 жыл бұрын
These tutorials are pure gold, thank you for making them :)
@mhnoni
@mhnoni 7 жыл бұрын
I can truly say this series is one of the best tutorial about optimization , i found at least 2 point i need to immediate check on my project wihc is tesselation landspace and texture compress size .
@TheGabmeisterX
@TheGabmeisterX 2 жыл бұрын
Great explanations. I keep rewatching your videos on graphics optimization.
@FitGameDeveloper
@FitGameDeveloper 4 жыл бұрын
Truly amazing video series. Well-organized structure, digestible segments, and clear examples (with images and real-time examples).
@TechArtAid
@TechArtAid 4 жыл бұрын
Thanks, I'm glad you enjoyed them!
@PolygonAcademy
@PolygonAcademy 5 жыл бұрын
dude this is awesome, I'm an environment artist and have a basic technical knowledge base but this really helps when optimizing a scene. thanks for the info :)
@TechArtAid
@TechArtAid 5 жыл бұрын
Thanks for the thanks and letting know 😊
@IceeyIceey
@IceeyIceey 7 жыл бұрын
Wielkie dzięki za tą serię. Dziś sprawdziłem lightmapy w swojej grze i wykryłem wiele niepotrzebnie wysokich rozdzielczości lightmap. Cała seria przyda się jeszcze raz przed wypuszczeniem gry!
@TechArtAid
@TechArtAid 7 жыл бұрын
+IceeyIceey No to ekstra. UE ma sporo tooli i trybów do szukania nieoptymalnych miejsc. Szczerze, na początku myślałem że to będzie temat na jeden tut :D
@SasisaPlays
@SasisaPlays 4 жыл бұрын
It’s a pure gold tutorial series!
@Khaliszt
@Khaliszt 7 жыл бұрын
I know your channel is mainly focused on art, but i would really love and appreciate a series like this (awesome by the way) about UE4's Game Thread! Profiling both graphics and gameplay would help me tons! Thanks for this.
@TechArtAid
@TechArtAid 7 жыл бұрын
+Khaliszt A. I surely lack expertise there. But at least there seems to be more info, documentation and blog posts about the gameplay code side
@Govi627
@Govi627 7 жыл бұрын
Love your videos, hoping to see more
@omri1324
@omri1324 5 жыл бұрын
I am so glad I found this! great resource!!
@projectrat5564
@projectrat5564 6 жыл бұрын
This is some really good stuff. Thanks!
@jso19801980
@jso19801980 4 жыл бұрын
no fancy new features or plugins.. just the very fundamental stuff we should all know love it!!!
@TechArtAid
@TechArtAid 4 жыл бұрын
I'm glad you appreciate the fundamentals! I found such knowledge even more important at CDP Red, due to a custom engine
@pawpotsRS
@pawpotsRS 4 жыл бұрын
for every technical surely I'll subscribe!
@AdityasinghSisodiya
@AdityasinghSisodiya 6 жыл бұрын
Made my day. Greetings Mate!!! Have a nice cup of coffee
@chiboreache
@chiboreache 7 жыл бұрын
Very useful, as usual, thanks
@iamisandisnt
@iamisandisnt 7 жыл бұрын
I haven't even watched this yet and I love it already :D
@TechArtAid
@TechArtAid 7 жыл бұрын
+iamisandisnt Haha ;) no rush. This is meant more as a compendium to return to, anytime
@AxisLotl
@AxisLotl 6 жыл бұрын
Thank you so much. You are helping me a lot to improve my work.
@TechArtAid
@TechArtAid 6 жыл бұрын
+Pepito Grillo Nice to hear that. If you'd like to know more about something, let me know. May come in handy for the optimization ebook I'm writing
@alangonzalezleon6556
@alangonzalezleon6556 4 жыл бұрын
Thank you very much. Now I know what is my problem in my game : D
@amirsaeed8733
@amirsaeed8733 5 жыл бұрын
It was very useful thank you :)
@SellusionStar
@SellusionStar 7 жыл бұрын
thank you mate!!
@yonjuunininjin
@yonjuunininjin 7 жыл бұрын
I could listen to you all day
@TechArtAid
@TechArtAid 7 жыл бұрын
+Ninjin All right! That's what I was told by another person, Simon, after this video. So I went with this advice when making part 3.2, uploaded yesterday :) Compendium-sort of thing
@esparafucio
@esparafucio 7 жыл бұрын
Awesome video! In regards to Forward Rendering, Unreal seems to use "Clustered Forward Rendering" based on Ola Olsson's work, which compute lights in a frustrum-space grid, instead of a screen space grid, like Forward+.
@TechArtAid
@TechArtAid 7 жыл бұрын
+esparafucio You're right. So I also made a mistake in Part 3.2, explaining ComputeLightGrid. It's not just for culling, it's for deciding which fragment of the 3d space the lamp affects.
@ReplicatedYT
@ReplicatedYT Жыл бұрын
Very useful thanks!
@Nerfdalocks
@Nerfdalocks 6 жыл бұрын
This content is great, just great. Thank you so much!
@TechArtAid
@TechArtAid 6 жыл бұрын
+Jacob Ben-David I'm glad you liked it, thanks! Now I'm working on a text version
@Nerfdalocks
@Nerfdalocks 6 жыл бұрын
Awesome I can see how that could be super useful as I'm basically sitting here taking notes for the entire length of the video. Though having you explain it and demonstrating it in editor/scene is extremely valuable and makes everything that much more clear. Keep up the great work!
@fonfa
@fonfa 7 жыл бұрын
Such good information! Thanks a lot!
@TechArtAid
@TechArtAid 7 жыл бұрын
Nice to hear it. I tried to compile many tips that I think are not popular enough ;) Like quad overshading, texture cache coherency. Of course their significance may vary
@fonfa
@fonfa 7 жыл бұрын
Yeah, you've explained it in an easier way than I've seen elsewhere so I'm pretty sure this will be useful to artists of all disciplines and not only tech artists :)
@RSS6612
@RSS6612 7 жыл бұрын
this is awesome thanks
@MarcusHouseJumper
@MarcusHouseJumper 7 жыл бұрын
first of all a big compliment how you gather and bring these Tech-Art infos to the point. keep this channel like it is, spacially for people who are seriously interested in the UE4 pipeline. Could you give some hints about how to avoid lightbleeds? giving objects just a bigger lightmap resolution is probably not the best solution i guess. A big THX for this channel and plz keep going ;)
@TechArtAid
@TechArtAid 7 жыл бұрын
+Hansi HansHans Good to hear that the formula works for "theoretical" topics as well. As for the lighting, I plan to do a multi-part lighting tutorial, late Summer. But does increasing the lightmap resolution help? Can you test it? If yes, then maybe it's a problem of UV islands having too small margin between them
@MarcusHouseJumper
@MarcusHouseJumper 7 жыл бұрын
In some cases it works, unless you choose a material which is not that bright in the diffuse. When i blocking out the level design i like to use the basic_wall material comming with the starter content, and really basic geometrie of course. In this case increasing the LM-Res wont work. I think the gradient between light/shadowed areas might be too strong. In that case i use geometrie to block from outside.
@TechArtAid
@TechArtAid 7 жыл бұрын
Having a big black (unlit) cube that surrounded the entire building helped me in one scene. In another one, I used double-sided walls, with very little lightmap-UV space dedicated to those back polygons. Remember to place a Lightmass Importance Volume that will closely surround your area where lighting matters (building floors, but not background). Only if that fails, you can also try World Settings > Lightmass Settings > Level Scale (0.5, 0.75), Indirect Quality (2, 3): imgur.com/a/g25dV
@MarcusHouseJumper
@MarcusHouseJumper 7 жыл бұрын
the unlit box is a very nice workaround. never thought of changing the material type. thx. ;) will there be a houdini tutorial? it already became the tool of choice for me. but its not easy changing the workflow, and there is a lot to learn.
@TechArtAid
@TechArtAid 7 жыл бұрын
+Hansi HansHans Houdini is your main tool? What do you use it for? Next tutorial series after this I plan to do are UE4 lighting and Houdini. But I'm still looking for ideas for the second one - what cases really require Houdini
@RonnerFTW
@RonnerFTW 7 жыл бұрын
The tesselation landspace trick helped me out alot! thanks, Our deadline is in less than a week now is there any chance you'll be done with part 3 by then for a final check regarding the GPU visualizer to understand some of the processes before we hand it in? (:
@TechArtAid
@TechArtAid 7 жыл бұрын
+Johan Ronner I think I'll do it on next weekend. But ask here, or by e-mail (it's at oskarswierad.com) In general: play the game in new window, minimize other windows, press Ctrl Shift comma. Base Pass cost = complexity of shaders, object count, decal count, resolution. If you're using Forward renderer then lighting goes there too. Translucency = translucent objects, particles and lighting of such objects. HZB = generation of Z-buffer used by SSR, AO and culling. Lighting = cost of lights, depends on their attentuation radii and game resolution. ShadowDepths = avoid dynamic shadows if it's a problem. Post processing = bloom, ambient occlusion (it's costly!), screen space reflections, lens flares. All of which can be disabled or lowered in radius/quality. Cheers :)
@user-fu7zr5us5f
@user-fu7zr5us5f 4 жыл бұрын
really really useful!
@TechArtAid
@TechArtAid 4 жыл бұрын
Thanks!
@silencemoon1936
@silencemoon1936 7 жыл бұрын
Love it!Is really Help me too much :)
@TechArtAid
@TechArtAid 7 жыл бұрын
+Moon Silence I'm glad to hear that! What are you working on?
@dipeyes
@dipeyes 5 жыл бұрын
very useful!
@Bas3008
@Bas3008 3 жыл бұрын
Wow, that is some immensely useful information, thank you! When you were talking about multiple layers of translucency, I was wondering if you can limit the maximum depth it will render? Like if there are for example 10 stacked transparent leaves, can you tell UE4 to only render the translucency of say the first 3? I'd imagine that would save a lot of performance.
@TechArtAid
@TechArtAid 3 жыл бұрын
This is stochastic transparency, if I understand correctly. It's used in offline renderers and I know there have been examples of this method used in real time. I don't think it's used in UE though, except maybe hair
@priareos3878
@priareos3878 6 жыл бұрын
Hey man, great video! I'm curious about what you said concerning UVs and the Cache (min 11:20). Do you mean UV manipulations like Flowmaps/UV Distortion, UV Tiling changes etc. in the material should be avoided? I do this a lot in my particles and decals, so maybe you could give me some more details on how it will affect performance?
@TechArtAid
@TechArtAid 6 жыл бұрын
+Priareos Tiling is of course a normal thing, used everywhere. (It can be only a matter of discussion if it's more efficient to do it with a VertexInterpolator node or even Customized UVs). Cache coherence is preserved, because neighbouring pixels read from a similar place on the texture. So the situation is also fine when the flow maps are smooth. The problem of low coherence arises when we use a strong, noise-like distortion. It makes the material require to read from random places on the entire texture - neighbouring pixels miss the predicted position (loaded into the cache), so a new piece of texture has to be read from VRAM. I've never seen a clear example of this being a problem. It would be interesting to measure it (a material with and without noisy distortion). edit: I mean spatial coherence of texture fetches. More here: www.gamedev.net/forums/topic/399901-texture-cache--pixel-shader/?tab=comments#comment-3659628
@priareos3878
@priareos3878 6 жыл бұрын
Tech Art Aid Thank you!
@easternwarlord
@easternwarlord 3 жыл бұрын
Thanks for the video. Lot of useful information. Changing the LOD bias level on the landscape didn't work for me though... do I miss something?
@TechArtAid
@TechArtAid 3 жыл бұрын
Thanks! Hmm it should. Landscape->Select Tool->Select Section->LODBias, then set it to a positive number. Does anything change in the wireframe view mode?
@easternwarlord
@easternwarlord 3 жыл бұрын
@@TechArtAid Nope. Can't get this working.
@charliebrownau
@charliebrownau 6 жыл бұрын
Gday Do you have any advice or tutorials to support OpenGL 4.5 + OpenAL + SDL2 in UE4 instead of DirectX11
@TechArtAid
@TechArtAid 6 жыл бұрын
Sorry, no idea how to do that
@Shanataru
@Shanataru 6 жыл бұрын
Great tutorial, can I ask you what is the difference between Mesh draw calls and Draw primitive calls? I found Draw primitive calls on "stat rhi" and it seems few times bigger. What does it even mean?
@TechArtAid
@TechArtAid 6 жыл бұрын
Interesting. If I were to guess, I'd say primitives include helper meshes, while mesh draw calls are only actual models. Can you try adding particle systems or more lamps (with shadows disabled) and see what happens?
@Shanataru
@Shanataru 6 жыл бұрын
So I have added some point lights with no shadows and it seems to be steadily increasing (primitive calls from 286 to something like 366, mesh calls from 26 to something like 79). I have no idea what it means, but there you go
@TechArtAid
@TechArtAid 6 жыл бұрын
Okay. Still no idea then. A great question anyway... I'll keep that in mind for the ebook
@Shanataru
@Shanataru 6 жыл бұрын
Alright, thank you anyway :)
@MichalMilkowski
@MichalMilkowski 7 жыл бұрын
Hey, do you plan to make closed captions?
@TechArtAid
@TechArtAid 7 жыл бұрын
+Michał Miłkowski Yes. As usual, though with some delay :)
@MichalMilkowski
@MichalMilkowski 7 жыл бұрын
Great :)
@sergelyukshin8302
@sergelyukshin8302 7 жыл бұрын
Yeah man. That's it.
@lakaiart
@lakaiart 2 жыл бұрын
why is the quad overdraw in the "quad ovderdraw viewmode" just showing for translucent objects? I thought quad overdraw occurs for small and elongated triangles. So for example a sphere should have some quad overdraw on the poles because there are mostly long triangles in that place.
@TechArtAid
@TechArtAid 2 жыл бұрын
That's correct. Doesn't it? There should be at least a bit of overdraw. Though for translucent it's a bigger value, as you can have many e.g. particles affecting a single pixel
@lakaiart
@lakaiart 2 жыл бұрын
I don't understand why quad overdraw is a problem when using translucent objects. I thought translucency only matters in terms of overdraw not quad overdraw (quad overshading). As I understand it these are two different problems. Quad overdraw occurs cause 4 pixel blocks get calculated when rendering a triangle and if they don't fit in the triangle they are wasted. Overdraw on the other hand occurs because of wrong render order so that the triangle has to be shaded again if it were rendered before the object in front of it.
@TechArtAid
@TechArtAid 2 жыл бұрын
Ah, I see. You're right, absolutely. So maybe they just combined these 2 problems into a single view mode?
@lakaiart
@lakaiart 2 жыл бұрын
@@TechArtAid yes I think they've combined these two issues. I've tested quite a bit. It seems that no matter how dense my mesh is or how far away it never shows more than a green color. If I use transparency it gets worse as you said. Orange is max though if I use a dense transparent Object. If mulitple of them overlap it goes all to white. Pretty confusing to a get a grip on what effect is from overdraw and what from quad overdraw. But thanks for you help :). Is there maybe a way to measure just the effekt of quad overdraw in ms or something similar?
@mhnoni
@mhnoni 7 жыл бұрын
Can you make a small tutorial on what is Object pooling - Object caching and can it be done only in BP without C++ or plugin?
@TechArtAid
@TechArtAid 7 жыл бұрын
I'd rather cover art/graphics ideas here, but it surely is a very useful pattern :) It goes like that: let's say you're making a weapon blueprint. In a naive way, you'll create new bullet every time a button is pressed, then destroy it when it collides. The problem is that creating objects is costly and destroying them doesn't free memory instantly. A garbage collector (memory manager) will have to take care of destroyed objects, sometimes causing a moment of slowdown. So a better approach is to make an array of (let's say) 1000 bullets at the start of the game (or creation of weapon). Instead of creating new bullets, you take one of the inactive ones. When it collides, you don't destroy it - just mark it inactive and invisible. So you just need an Array and simple functions to "initialize" and "destroy" a bullet (just marking them active/inactive, setting location and velocity). Anyway, I should rather link to this site, which is pure gold: gameprogrammingpatterns.com/object-pool.html
@mhnoni
@mhnoni 7 жыл бұрын
That what i was trying to understand :) no need tutorial as you explained the reason when to use the pooling and how to use it and the article is very useful it is pure gold , thanks again mate :)
@QuiteDan
@QuiteDan 12 күн бұрын
Quad overdraw absolutely killed my steamdeck performance. It was faster in most cases to have a transparent material vs masked material with using Dither TAA node.
@TechArtAid
@TechArtAid 12 күн бұрын
😱 Unusual! Thanks for sharing. I haven't dealt with that platform so far
@QuiteDan
@QuiteDan 12 күн бұрын
@@TechArtAid No prob! To clarify, I am still using masked materials for grass and stuff on steamdeck. It just tanks the frame rate really bad when I try to use Dither TAA to in place of a 50% opaque object, for instance.
@lesha1955
@lesha1955 6 жыл бұрын
Can you please tell me, texture streaming pool locate on RAM or VRAM?
@TechArtAid
@TechArtAid 6 жыл бұрын
+lesha1955 Great question. I suspect it's VRAM - see Logan Bailey's (staff) answer: answers.unrealengine.com/questions/359407/warning-texture-streaming-pool-over-650mb.html Is it the same amount of RAM? I don't know. I'm not sure if the engine has to keep the textures sent to the GPU in the system RAM.
@lesha1955
@lesha1955 6 жыл бұрын
Thanks for the answer. Maybe you also know why all my textures (even those that do not placed on any levels) loaded in texture streaming pool? Can I change it somewhere? I trying to fix texture memory usage with level streaming, but I can't see changes in memory stat when I load and unload levels during play in editor.I was looking for an answer everywhere, but not found it:( /*Sorry for my english*/
@TechArtAid
@TechArtAid 6 жыл бұрын
+lesha1955 Have you tried the texture usage view in the Statistics window? (20:26) And are you sure they're all loaded? Try on an empty level with several assets too. (your English is good, don't worry, I'm not a native speaker either)
@lesha1955
@lesha1955 6 жыл бұрын
You right, when I check it using statistics, I don't see them, but when I play in editor and logout my texture streaming pool, I see them there, here screenshots: answers.unrealengine.com/questions/757119/texture-streaming-2.html It's very strange... Should I worry about this or not? Becouse I want to optimize my game for 1Gb VRAM players, and have a lot of different textures, but if I can't unload them with level streaming, and all of textures will loaded in VRAM this will be very hard
@justplaying4292
@justplaying4292 Жыл бұрын
5:55 Isn't the engine using the forward rendering technique for translucency objects?
@TechArtAid
@TechArtAid Жыл бұрын
Exactly, that's why it's so heavy. Deferred by definition allows only for 1 value (of base color, roughness) per pixel. But it means that the lighting is calculated only once too. For transparents, it has to be repeated for all "layers" in a pixel. There are some optimization techniques employed but still more expensive that deferred
@justplaying4292
@justplaying4292 Жыл бұрын
@@TechArtAid ​ Interesting, thanks for the clarification; also, I saw some blog and slide shows about Doom Eternal 2020 (Siggraph 2020) that is completely done in forward rendering, which makes me doubt myself if I truly understand the forward rendering.
@TechArtAid
@TechArtAid Жыл бұрын
Because it can be fast :) but it requires a total buy-in from your content teams. VR games are forward-rendered too. They just don't have more than 2 lights at once in most situations :D Many VR games just baked all their stuff. Doom divides the screen into smaller tiles. It's called clustered forward, or forward+. It helps a bit. But as I said, it requires absolute discipline in keeping the content lean & well optimized
@justplaying4292
@justplaying4292 Жыл бұрын
@@TechArtAid Clustered forward, learn something new today.
@-CornDawg
@-CornDawg 5 жыл бұрын
Didn't get
UE4 Graphics Profiling: GPU Visualizer
8:51
Tech Art Aid
Рет қаралды 37 М.
The Strange Graphics Of LETHAL COMPANY
15:59
Acerola
Рет қаралды 683 М.
Miracle Doctor Saves Blind Girl ❤️
00:59
Alan Chikin Chow
Рет қаралды 60 МЛН
狼来了的故事你们听过吗?#天使 #小丑 #超人不会飞
00:42
超人不会飞
Рет қаралды 65 МЛН
ПАРАЗИТОВ МНОГО, НО ОН ОДИН!❤❤❤
01:00
Chapitosiki
Рет қаралды 2,8 МЛН
Optimization Made EASY || UE5 ||  Increase FPS and Reduze Filesize
9:54
UE4 Graphics Profiling: All Categories Guide (Rendering Passes)
39:52
Alfa Romeo "Feel For Yourself" | Unreal Engine 5 Cinematic
0:57
Miles Cable
Рет қаралды 965 М.
How Real Time Computer Graphics and Rasterization work
10:51
FloatyMonkey
Рет қаралды 82 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН
How graphics works? Render pipeline explained. Example OpenGL + Defold
14:00
UE4 Graphics Profiling: Measuring Performance
14:25
Tech Art Aid
Рет қаралды 91 М.
Unreal Engine работа с нодой Custom
58:23
DneproMAN
Рет қаралды 4,7 М.
I Made a Graphics Engine
6:42
Zyger
Рет қаралды 240 М.
Miracle Doctor Saves Blind Girl ❤️
00:59
Alan Chikin Chow
Рет қаралды 60 МЛН