it is late 2024, I am 3 years in to my UE programming career and this is still exceptionally helpful material for my ongoing self teaching journey. thank you man
Thank you very much for sharing this! I always miss stuff like this from Epic themselves. Digging up all this information can be really painfull, so thank you again for doing it!
@@TechArtAid Oh yes, I saw this one already. I'm also quiet focused on the tech art side of things but Unreal is getting more and more complex with every added feature. In my opinion they should release optimisation trainings at least twice a year. There are so many poorly optimized games out there, even AAA ones, especially when it comes to Unreal Engine. And I can understand, it's a complex topic, even more when there are new features to tweak on a monthly basis..
Nice video! Worth mentioning that (at least in the scenes I've tested) baked lights (static) are grouped under NonShadowedLighting even if they cast shadows during the bake.
@@TechArtAid Hmm, I'm not so sure now actually. I checked again and disabled every light and rebaked but NonShadowedLighting is still high. I assumed it was the baked lighting before, but it must be something else (I'm specifically looking at StandardDeferredSimpleLights).
This is great! But it might be also quite outdated because of all the new technology we have today, like Lumen, Nanite, Virtual Shadow Maps, etc. It would be great to have an updated version of this video that covers those topics :D Cheers!
Thanks :) All those systems that you mentioned, they require (and sometimes provide) custom debugging tools. Virtualization means dynamic allocation, doing stuff in compute, non-trivial dependencies
Thank you for the tutorial. Do you know of any way to export these passes from the sequencer (as EXR's)? By default, Unreal's 'Custom Passes' are woefully lacking for a VFX workflow.
Wanted to ask what the cost for Visibility Command pass is, it is currently the highest pass in most of the levels I'm working with. Would be great if anyone could share this knowledge. Thanks
Do you have a lot of separate objects in the map? Like thousands or dozens of thousands? Try hiding them (enable Hidden in Game) temporarily, leaving only the biggest ones and see if it changes anything. If yes, it may be worth merging some of them into bigger meshes
@@TechArtAid Thanks for the hints. There are indeed a lot of small, tiny actors in the level. Merging them would solve this issue. I thought you went retired for awhile, since there hasn't been updates on the channel lately.
Is "shadow projection" named "shadow projection on opaque" in the GPU visualizer? It's what's using more GPU time in my project (between 4 and 6 ms), more than shadow depths, but I have only one light in the scene, a movable directionnal light and the game resolution is 1080p. How can I optimize this please?
Projection draws the shadow, already calculated by Depths, on objects in the scene. Do you have a lot of polygons (in millions)? I'd suggest hiding most objects, then unhiding them gradually, to check which ones contribute the most to this cost. More optimal LODs can help. You can also disable Receive Shadows on far/unimportant objects.
@@TechArtAid It was not polycount but you pushed me in the good direction, it was actualy coming from huge background mesh casting an unecessary shadow. Turning it off gives me now 1ms
Great Series - Thank You Just wanted to add a link or topic for a further video , something like an "Optimization Overview" When I saw these docs , I immediately thought of you, and in the same spirit you express, wanted to share them. software.intel.com/en-us/articles/unreal-engine-4-optimization-tutorial-part-1 2 & 3 Really appreciate your efforts! LOL my bad - I had watched these a while back and discovered the intel stuff recently before I saw you made the new one on Intel - Looks like you are a few steps ahead of me.
+KRN1VOR Thanks for the link. The article is really good. I think I put it in the description of one of the videos. But anyway others will surely appreciate it :)
Question: how do you allow the player to customize stuff like shadow resolution in their settings? For example, a graphics quality slider for stuff like textures, shadow res, etc.
Hey man, great video! Also I have a question, can you please tell us what is "FRAME Leaf Event"? It jumps sometimes a lot in my scenes and it just get so hard to work because the "ms" sky rocket..
Does it also happen in a build? I mean, if not played through the editor? And is the framerate really lower because of that (`stat unit`)? Sometimes such values are just what was left to "fill" a v-sync framerate, for example 60 FPS (16.7 ms).
Well for example, in this scene right now I don;t have other lights, only sky light (set to movable) turned on. I didn't test if it happens also when I bake lights. I also think it is connected to "FRAME Leaf Event" because when the fps drops below 10 and at the same time I check gpu visualizer the "leaf event" is filling almost the whole frame rate and slateUI-s have high ms. But when the fps returns to higher numbers, the "FRAME Leaf Event" then lowers down.. So I was wondering what is that "FRAME Leaf Event" ? Edit: The fps drops on random situations when I work on the scene , so I can't really figure it out why is it happening.
Thanks a bunch! :) A buffer is a full-screen texture containing some data. For example, the final image (game), or just the normals, lighting. See my Perf Optimization #2 video
Thanks! I can't wait to get back to recording too. I had a backlog already, but now I've learned a lot in new areas working on CP2077. The release date is September, so still a while. If you want to discuss some stuff, tag me or DM on Twitter anytime :)
Great tutorials! QUESTION: if I input a console command like sg.ShadowQuality and set it to a specific value, is it just an editor command or does it actually apply the setting globally and to the finished, compiled game? Thanks
Thank you. Only during the current run (or editor session). You can make it permanent with INI files. See docs -> Programming Guide -> Configuration Files. There's also a GUI for setting variables but I can't remember where. Maybe in Device Profiles?
@@TechArtAid Since I started using UE5 the most performance issues I had was Shadow Depth mainly. I mean with a distance thats the one thing that keeps our scene performance low xD (other than actor count, ticking stuff ...)
Ok :) a common issue. What's your combination of Nanite and VSM? Do you use both? Also are you using WPO? How many shadowed lights per pixels on average?
So while watching this video I stumbled upon a few things that I could not find/get to work as you've demonstrated. 1. Light complexity optimization view shows screen completely black as opposed to blue/red as yours does, I have multiple stationary lights in my scene and even if I throw in a moveable light the result is similar. 2. 1. there is no Light pass section in ProfileGPU at all. Does this make sense to you? Have you encountered this before? Quick background: developing for VR, UE 4.17.1, using the Forward shader.
+Jacob Ben-David Ah yes. That's a great feedback by the way. I should add a passage about it. Thanks and don't hesitate to ask about anything. Forward renderer does all its lighting in the Base pass. I wasn't aware it's ommited by Light complexity, but that makes sense. By the way, a chapter from the book I mentioned in a comment - early alpha stage: unrealartoptimization.github.io//book/profiling/passes/
Thanks! The book is looking very professional. Do you intend to sell it at some point? So based on your answer, is there any way of accessing and profiling the lights' information? (maybe even using 3rd party tool? (Note: I have not watched your video on Intel's tool yet). Another, slightly more worrying question: From what I understand from your explanation on ShadowDepths pass, I would expect to see very low numbers in my scene. However, I'm getting very high numbers ranging between 3-6 ms (!) which doesn't make any sense since I hardly have any movable actors in my scene. To make things even more confusing, all the milliseconds seem to always be concentrated on some random light shadowing another random object in the scene. The "shadowing" light and "shadowed" object are not even consistent between GPUProfile snapshots (sometimes 0ms other times 3ms). Example: ShadowDepths > Atlas0 1024x1024 > UEDPIE_0_... > PerObject BP_MyObject : 3.72ms. Does this make any sense? Could it be that this metric is unreliable in the editor as you have mentioned about other metrics before?
Yes, I want to sell it together with an e-book version, but I also plan to share a big part of it as an open-access online page. Something like Game Programming Patterns did :) As for your issue: Try disabling this light ("Actor Hidden in Game") and see what happens? Did the cost moved to another lamp or disappeared? If it just moved, then maybe it's an accidental manifestation of something else - worth checking it in a packaged game then.
The cost moves to another light. Same in packaged game. Weird. However, regarding the original question, is there any way of accessing and profiling the lights' information? (maybe even using 3rd party tool? (Note: I have not watched your video on Intel's tool yet)
+Jacob Ben-David Yes, Intel GPA shows lamps separately - but in the deferred mode. As far as I understand, forward performs lighting in object's shaders, so unfortunately there is no separate information about lighting. Interesting topic - how to profile lighting in forward.
it is late 2024, I am 3 years in to my UE programming career and this is still exceptionally helpful material for my ongoing self teaching journey. thank you man
This video is a must to watch for every indie devs, especially solo devs! Thank you!!!!
Great, whenever I see a crispy looking air conditioner with crispy reflection, I will always think about this tutorial now :D
Incredibly helpfull thank you so much.
I'm happy to hear that. If you need more info from a similar topic, let me know, because we're coming to the end of this Profiling series
Agreed, thanks for this (after a few years this series was still useful)
Best videos I've seen on this tool, thanks.
Learned a lot with this series thank you
Thank you so so increadibly much for how much detailed effort you put into this.
+Hammer-On Productions I'm glad to hear it's insightful!
Your video has been a lifesaver for us.
Really? Nice to know :) What were the main improvements you implemented?
Pretty much everything as we are developing for PS4.
Bible of performance. This channel is amazing.
Thank you very much for sharing this! I always miss stuff like this from Epic themselves. Digging up all this information can be really painfull, so thank you again for doing it!
Thank you for letting know. Glad to hear you found this knowledge here
btw. from Epic this one is worth watching - ua-cam.com/video/hcxetY8g_fs/v-deo.html
@@TechArtAid Oh yes, I saw this one already. I'm also quiet focused on the tech art side of things but Unreal is getting more and more complex with every added feature. In my opinion they should release optimisation trainings at least twice a year. There are so many poorly optimized games out there, even AAA ones, especially when it comes to Unreal Engine. And I can understand, it's a complex topic, even more when there are new features to tweak on a monthly basis..
Btw, do you know what the Distortion render pass does? Seems to be quiet heavy sometimes.
NVM, just realised that it is Screen Spaced Refraction.
Nice video! Worth mentioning that (at least in the scenes I've tested) baked lights (static) are grouped under NonShadowedLighting even if they cast shadows during the bake.
Oh, really? Thanks for letting me know. I'll include that info when doing an update of Unreal Art Optimization online book
@@TechArtAid Hmm, I'm not so sure now actually. I checked again and disabled every light and rebaked but NonShadowedLighting is still high. I assumed it was the baked lighting before, but it must be something else (I'm specifically looking at StandardDeferredSimpleLights).
Mm, okay!
This is great! But it might be also quite outdated because of all the new technology we have today, like Lumen, Nanite, Virtual Shadow Maps, etc. It would be great to have an updated version of this video that covers those topics :D
Cheers!
Thanks :) All those systems that you mentioned, they require (and sometimes provide) custom debugging tools. Virtualization means dynamic allocation, doing stuff in compute, non-trivial dependencies
Thanks so much. Before I found this video my post process was waking 104 MS to render
+Sam Carey 10.4? That's a lot. And what steps did you take to optimize?
lens blur
+Sam Carey Ah yeah, DoF is heavy. Though filmic-quality DoF made Call of Duty AW's cutscenes stand out for me, truly next-gen
Awesome, thanks for this
It's great to hear you enjoyed it! Here's a text follow-up to this vid, more up to date: unrealartoptimization.github.io/book/profiling/passes/
You're my hero
No, you're breathtaking! Thanks for watching
Thank you man, great stuff!
I'm glad it was useful to you!
Dzięki, przydatny poradnik
Fajnie słyszeć!
Great tutorial!Very very helpful!Thank you!
Thanks! Part 4 about Intel profiling app coming this week.
Amazing !
Thank you very much, I've learned alot.
+Alex Shpiner Thanks, it's nice to hear that :)
thank you very much for your work!
Thank you so much
Thank you for such a great tutorial :)
+Wojciech Smętek My pleasure :)
Great job mate.
+Barakooda Thanks :)
Thanks.
What else Can I say? Enlightining…
Thanks again
Nice to hear that it's helpful!
Thank you for the tutorial. Do you know of any way to export these passes from the sequencer (as EXR's)? By default, Unreal's 'Custom Passes' are woefully lacking for a VFX workflow.
Oh, I don't know, sorry. Haven't played with the compositing workflow in UE
@@TechArtAid Okay! Thanks for your response.
Thank you!!!
Wanted to ask what the cost for Visibility Command pass is, it is currently the highest pass in most of the levels I'm working with. Would be great if anyone could share this knowledge. Thanks
Do you have a lot of separate objects in the map? Like thousands or dozens of thousands? Try hiding them (enable Hidden in Game) temporarily, leaving only the biggest ones and see if it changes anything. If yes, it may be worth merging some of them into bigger meshes
@@TechArtAid Thanks for the hints. There are indeed a lot of small, tiny actors in the level. Merging them would solve this issue. I thought you went retired for awhile, since there hasn't been updates on the channel lately.
Thanks for waiting. I have so many video ideas. But I'm not sure if I'll have the energy to focus on them until CP 2077 is finished
Haha true. You're my main source of inspiration when it comes to this TA field. Keep up the good work 💪
Hey, which console command did you use to visualize passes time at 34:25?
+Adam Andrzejczak It was 'stat gpu'
Dzięki ;)
What is the fake subsurface scattering method?
yo tengo
y las shadow depths es porque mi juego si o si tiene que tener luz direccional movible, no puedo usar la estacionaria o la estatica
Is "shadow projection" named "shadow projection on opaque" in the GPU visualizer?
It's what's using more GPU time in my project (between 4 and 6 ms), more than shadow depths, but I have only one light in the scene, a movable directionnal light and the game resolution is 1080p. How can I optimize this please?
Projection draws the shadow, already calculated by Depths, on objects in the scene. Do you have a lot of polygons (in millions)? I'd suggest hiding most objects, then unhiding them gradually, to check which ones contribute the most to this cost.
More optimal LODs can help. You can also disable Receive Shadows on far/unimportant objects.
@@TechArtAid It was not polycount but you pushed me in the good direction, it was actualy coming from huge background mesh casting an unecessary shadow. Turning it off gives me now 1ms
Awesome!
Great Series - Thank You
Just wanted to add a link or topic for a further video , something like an "Optimization Overview"
When I saw these docs , I immediately thought of you, and in the same spirit you express, wanted to share them.
software.intel.com/en-us/articles/unreal-engine-4-optimization-tutorial-part-1 2 & 3
Really appreciate your efforts!
LOL my bad - I had watched these a while back and discovered the intel stuff recently before I saw you made the new one on Intel - Looks like you are a few steps ahead of me.
+KRN1VOR Thanks for the link. The article is really good. I think I put it in the description of one of the videos. But anyway others will surely appreciate it :)
Question: how do you allow the player to customize stuff like shadow resolution in their settings? For example, a graphics quality slider for stuff like textures, shadow res, etc.
See this tutorial ua-cam.com/video/uLCNedDnWTY/v-deo.html
Hey man, great video! Also I have a question, can you please tell us what is "FRAME Leaf Event"? It jumps sometimes a lot in my scenes and it just get so hard to work because the "ms" sky rocket..
Does it also happen in a build? I mean, if not played through the editor? And is the framerate really lower because of that (`stat unit`)? Sometimes such values are just what was left to "fill" a v-sync framerate, for example 60 FPS (16.7 ms).
Well for example, in this scene right now I don;t have other lights, only sky light (set to movable) turned on.
I didn't test if it happens also when I bake lights.
I also think it is connected to "FRAME Leaf Event" because when the fps drops below 10 and at the same time I check gpu visualizer the "leaf event" is filling almost the whole frame rate and slateUI-s have high ms. But when the fps returns to higher numbers, the "FRAME Leaf Event" then lowers down..
So I was wondering what is that "FRAME Leaf Event" ?
Edit: The fps drops on random situations when I work on the scene , so I can't really figure it out why is it happening.
Hi! Is there any video where you explain what is a buffer in unreal engine? Btw I like your channel a lot :D
Thanks a bunch! :) A buffer is a full-screen texture containing some data. For example, the final image (game), or just the normals, lighting. See my Perf Optimization #2 video
@@TechArtAid Wow! Thanks for the quick answer, i will go and watch the video 🙌
we miss you:'(
Thanks! I can't wait to get back to recording too. I had a backlog already, but now I've learned a lot in new areas working on CP2077. The release date is September, so still a while. If you want to discuss some stuff, tag me or DM on Twitter anytime :)
@@TechArtAid You are legend
Great tutorials! QUESTION: if I input a console command like sg.ShadowQuality and set it to a specific value, is it just an editor command or does it actually apply the setting globally and to the finished, compiled game? Thanks
Thank you. Only during the current run (or editor session). You can make it permanent with INI files. See docs -> Programming Guide -> Configuration Files. There's also a GUI for setting variables but I can't remember where. Maybe in Device Profiles?
Tech Art Aid Thanks. Appreciate it
Do you think you could do an update for this for UE5?
Hi! What new things would you like to see covered?
@@TechArtAid Since I started using UE5 the most performance issues I had was Shadow Depth mainly. I mean with a distance thats the one thing that keeps our scene performance low xD (other than actor count, ticking stuff ...)
Ok :) a common issue. What's your combination of Nanite and VSM? Do you use both? Also are you using WPO? How many shadowed lights per pixels on average?
@@TechArtAid How do I find out shadowed lights per pixel xD
🤷♂️ I meant just a rough guess :D
Also, iirc, this and the previous vid had some explanation of which factors influence the shadow cost
So while watching this video I stumbled upon a few things that I could not find/get to work as you've demonstrated.
1. Light complexity optimization view shows screen completely black as opposed to blue/red as yours does, I have multiple stationary lights in my scene and even if I throw in a moveable light the result is similar.
2. 1. there is no Light pass section in ProfileGPU at all.
Does this make sense to you? Have you encountered this before?
Quick background: developing for VR, UE 4.17.1, using the Forward shader.
+Jacob Ben-David Ah yes. That's a great feedback by the way. I should add a passage about it. Thanks and don't hesitate to ask about anything. Forward renderer does all its lighting in the Base pass. I wasn't aware it's ommited by Light complexity, but that makes sense.
By the way, a chapter from the book I mentioned in a comment - early alpha stage:
unrealartoptimization.github.io//book/profiling/passes/
Thanks! The book is looking very professional. Do you intend to sell it at some point?
So based on your answer, is there any way of accessing and profiling the lights' information? (maybe even using 3rd party tool? (Note: I have not watched your video on Intel's tool yet).
Another, slightly more worrying question: From what I understand from your explanation on ShadowDepths pass, I would expect to see very low numbers in my scene. However, I'm getting very high numbers ranging between 3-6 ms (!) which doesn't make any sense since I hardly have any movable actors in my scene. To make things even more confusing, all the milliseconds seem to always be concentrated on some random light shadowing another random object in the scene. The "shadowing" light and "shadowed" object are not even consistent between GPUProfile snapshots (sometimes 0ms other times 3ms).
Example: ShadowDepths > Atlas0 1024x1024 > UEDPIE_0_... > PerObject BP_MyObject : 3.72ms.
Does this make any sense?
Could it be that this metric is unreliable in the editor as you have mentioned about other metrics before?
Yes, I want to sell it together with an e-book version, but I also plan to share a big part of it as an open-access online page. Something like Game Programming Patterns did :)
As for your issue: Try disabling this light ("Actor Hidden in Game") and see what happens? Did the cost moved to another lamp or disappeared? If it just moved, then maybe it's an accidental manifestation of something else - worth checking it in a packaged game then.
The cost moves to another light. Same in packaged game. Weird.
However, regarding the original question, is there any way of accessing and profiling the lights' information? (maybe even using 3rd party tool? (Note: I have not watched your video on Intel's tool yet)
+Jacob Ben-David Yes, Intel GPA shows lamps separately - but in the deferred mode. As far as I understand, forward performs lighting in object's shaders, so unfortunately there is no separate information about lighting. Interesting topic - how to profile lighting in forward.
Thank you, It's so helpful to me :)
Could you please add english subtitle?
+Jiah Jung Yes. I will add them soon (probably on Monday)
Thank you for your kindness. !!
Subtitles for parts 1, 2 and 3.1 added :) Now only part 3.2 remains.
Just uploaded the subtitles to Part 3.2. Sorry for the delay... It took me 3 hours to write them 😅
It's OK. Thanks for the subtitle 😆 !!!! Your tutorials are awesome
we need this update for UE5 with Lumen and Nanite please!!!
Incredibly usefull, thanks a lo. Great video!