Hello, are texture atlas’ still being used for levels? Or, are there UE4 tools that take all the textures in the level and make their own texture atlas for a level?
I too would really like to hear an official or well-informed answer to this question.
Are texture atlases still a worthwhile optimization?
Texture Atlas are still useful. Tools like HLOD will bake them for you :https://docs.unrealengine.com/en-US/Engine/HLOD/Overview/index.html
I read somewhere that Unreal Engine puts the textures into a texture atlas. It has a limit to the amount of textures that go in one atlas though, and I don’t remember the exact figure.
Thank you for the replies. If anyone can provide a source that discusses this automatic texture atlassing, that would be even better.
The new Virtual textures and Virtual light maps tools in UE4 might make using texture atlasing obsolete.
I would also be interested in more information about this. In our case we have lots of textures for rendering our user interface (VR) and I’m looking into reducing performance cost by using texture atlas.
Used UMG image size = 30x30
Nvidia GTX 2080
Trying without C++, the only option I see is using a Material that subsamples the given atlas to retrieve the individual textures.
200 UMG images, all using the same texture = 650 fps
200 UMG images, all using individual textures = 605 fps
200 UMG images using DynamicMaterialInstance, all instances using the same texture (atlas) 565 fps
-> No benefit in using a material to do it.
When I was looking into the ShooterGame example from Epic (2 years ago), they also used an Atlas for rendering UI elements, but as far as I remember in C++ (downloading it atm)
And there is this free to use Marketplace item:
This one imports the atlas and automatically creates MaterialInstance assets that are configured to only show the individual textures (which seems worse then the individual textures) (test pending).
Edit: Just tested the Plugin and it works. It does not create Material Instances anymore (as shown in the docs), it now creates a custom asset that inherits from ISlateTextureAtlasInterface.
200 UMG images, all using individual TextureAtlas Assets of the Plugin = 640 fps
Thanks for the test, Rumbleball! It’s a good example why it’s a good idea to use atlases wrapped with SlateTexture.
Btw, currently Paper2D has better version atlases managment - that’s the reason why VaTexAtlas is in “support only” state
What do you mean Paper2D has better management? In terms of runtime performance your solution seems totally fine.
In was about creating a runtime version to allow individual artists to work on textures and to eliminate the need of external texture recreate and reimport.
Atlases created with Paper2D are easier to manage and use with UMG It also supports sprites rotation, etc.
The performance is the same, yes.
Hey Rumblefall, thanks for the test! I have some questions, if you don’t mind
- The 200 UMG images, are being rendered at same time?
- How many TextureAtlas assets are containing the 200 UMG images?
- What’s the resolution of the TextureAtlas assets?
-sure, would be **** if not
-din’t check, but was not power of 2
Haha thanks for your answers!
If the project is not based in 2D, it’s just a 3D project with some UI elements, do you think it’s worth to use these atlas systems (Paper2d/Vatexatlas)?
depends on your project. Wenn need every frame we can get.
Edit: But I got that a bit wrong. I messured frames. In frames the benefit seems a lot. But you actually need to look at it in terms of milliseconds. 1/605-1/640 = 0.09ms difference. That is realy not much, probably not worth the effort. Might need to extent the test a bit to see other results: Different texture sizes, bigger textures.
For VR the benefit should double, as you need to render twice.
That’s good to know. Thanks, @Rumbleball!