A licensee is seeing performance drops while using the editor due to a custom thumbnail renderer taking a while to generate thumbnails while Real-Time Thumbnail rendering is enabled, and has requested that UThumbnailRenderer have some additional logic to gate potentially expensive thumbnail rendering operations from being performed in real-time, even with real-time thumbnails enabled.
The following options were suggested:
In UThumbnailRenderer, add an IsSlowToGenerate() method:
virtual bool IsSlowToGenerate const { return false; }
And use it within FAssetThumbnailPool::Tick() to gate any expensive thumbnails from being added to the RealTimeThumbnails list:
if (!RenderInfo->Renderer->IsSlowToGenerate())
{
RealTimeThumbnails.AddUnique(InfoRef);
}
Alternatively, in UThumbnailRenderer, add a GenerateForContentBrowser() method:
virtual bool GenerateForContentBrowser() const { return true; }
And check if a thumbnail should be generated when checking if the renderer is valid for an asset within AssetThumbnail.cpp:
if (RenderInfo != NULL && RenderInfo->Renderer != NULL && RenderInfo->Renderer->GenerateThumbnailForContentBrowser)) { /*...*/ }
See UDN link. Issue has the possibility to affect custom thumbnail renderers
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-36300 in the post.
0 |
Component | UE - Editor - Content Pipeline - Content Browser |
---|---|
Affects Versions | 4.11, 4.12, 4.13 |
Created | Sep 22, 2016 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |