Hi
I’m developing a game that needs +200 icons for buttons. I wonder is there’s any way to pack all textures in photoshop and use it in unreal as a texture atlas.
if there is, what’s the workflow?
Thanks.
A sample for texture atlas:
Hi
I’m developing a game that needs +200 icons for buttons. I wonder is there’s any way to pack all textures in photoshop and use it in unreal as a texture atlas.
if there is, what’s the workflow?
Thanks.
A sample for texture atlas:
Anyone?
Hi!
You can use Paper 2D, is a default Plugin to UE4 that allows you to create Sprites from a one Texture and use them in UMG.
"To create a series of Sprites from a Sprite Sheet Texture:
Source: Paper 2D Sprites in Unreal Engine | Unreal Engine 5.1 Documentation
thanks. but is there any way that unreal engine use them as a single texture atlas? is this possible? or unreal make Atlas automatically on cooking contents.
If you set up your sprites to be grid based you can do it. Copy the functionality or directly use the flipbook node in material, but drive the time with a fixed scalar value so you can pick your sprite by hand. Then either make material instances for each element setting the atlas to use with that scalar parameter, or more automatic, create a dynamic material instance in UMG and set it programmatically.
I’d like to know this as well. I’m not sure what happens behind the scene, does going this route with sprites is more performance / memory easy or just adding separate image files is better.
Hello, This is late but for others seeking,
Come seek me out if you need help, I don’t mind helping. I think I made a video on this on my channel: youtube.com/NextWorldVR
Just make Paper2D Sprites from your texture atlas and then you can use them in UMG widget
Hi, I’m aware that this is an old thread, but it’s still the first thing that comes up when you’re searching for “ue umg texture atlas” so I figured I might share my solution.
In the screenshot below you’ll see everything needed for this setup, I’ll write it down in case the image gets taken down after a while.
Going from left to right:
Texture configuration
That’s 1024x1024 texture having 16x16 tiles.
Property | Value |
---|---|
Compression Settings | UserInterface2D (RGBA) |
Lossy Compression Amount | No lossy compression |
Mip Gen Settings | Sharpen0 |
Texture Group | UI |
Material configuration
Property | Value |
---|---|
Material Domain | User Interface |
Blend Mode | Translucent |
Nodes blueprintue.com link
Basically you just need to do some simple math on the UVs, the formula goes as follows
Params:
- ColumnsCount
- RowsCount
- ColumnIndex
- RowIndex
Pseudocode:
var ColumnSize = 1 / ColumnsCount
var RowSize = 1 / RowsCount
UVs = TextCoord[0] * MakeFloat2(ColumnSize, RowSize) + MakeFloat2(ColumnIndex * ColumnSize, RowIndex * RowSize)
Material instance
Single instance covers single tile, just specify column and row indexes and then use that instance inside UMG widget (you can use it in UImage instead of a texture asset). The preview will look blurry, but from what I’ve been testing so far, it looks good in-game.