Don't use Alpha Channels in Unreal Engine 5

  Рет қаралды 19,507

Z-Axis Up

Z-Axis Up

Күн бұрын

Alpha channels are incredibly helpful when building materials in Unreal Engine 5. However, they do come with a hidden cost. Alpha channels result in larger texture sizes and limit your options when optimizing your game for release.
#unrealengine #unreal #unrealengine5 #textures #materials #gamedev #gamedevelopment

Пікірлер
@coffeediction
@coffeediction 2 жыл бұрын
in short: we dont need masks(A) the same resolution as the RGB texture, we cannot scale it down when its in alpha channel, because it scales RGB aswell, so we separate A from RGBA. Also not to forget, a separate texture is easier to reuse, so basicall you save a lot in the long run too. Thanks!
@zaxisup
@zaxisup 2 жыл бұрын
Glad you found it helpful!
@Balcaceres_Art
@Balcaceres_Art 6 ай бұрын
Incorrect - 25 year old professional here, dont do what this video says, its misinformation. Its 2024, if this was UE3 days - maybe. Pack the map, this is negligible cost in 2024 with a static mesh. If the author was right, Niagara then would have never been invented.
@coffeediction
@coffeediction 6 ай бұрын
@@Balcaceres_Art Thanks for bringing it to attention!
@tylergorzney8499
@tylergorzney8499 2 жыл бұрын
Texture samples are one of the most expensive things in a shader, that is why they pack them. Every situation is unique, so a dev needs to look at the given situation to determine best methods of optimization
@ericzimmer
@ericzimmer 2 жыл бұрын
In production, I have to worry more about draw calls, than disk space. just depends on the situation. He does a good explanation on saving on diskspace if you need.
@Balcaceres_Art
@Balcaceres_Art 6 ай бұрын
@@ericzimmer absolutely, imagine being a rookie and looking at this video - in TWO THOUSAND AND TWENTY FOUR For a static mesh nonetheless, imagine when you tell them about niagara alpha blend particles.
@ShrikeGFX
@ShrikeGFX 2 жыл бұрын
Its very old knowledge that the alpha channel doubles your memory cost, its not an Unreal thing, it the bit depth - however people often still take this over the extra sample cost However this is more important the more samples you have. If you have a very basic shader as this, the extra sample does not matter You should also pack your most detail requiring in the alpha and the green channel as they have the highest bit depth
@xaby996
@xaby996 2 ай бұрын
Heard about this tech from a UE talk on optimization. Needed a tut on how to implement it. Thank you so much!
@shannenmr
@shannenmr 2 жыл бұрын
Trading extra texture lookup which is one of the slowest operations for memory usage
@zaxisup
@zaxisup 2 жыл бұрын
Very true! I find it to be worth it though as I have more control over the texture if it is not baked into the alpha. For instance if I had a mip issue I could go into the texture settings and adjust the mips with a sharpen or blur without effecting the other texture maps. Also, your could bake more textures into the green and blue channels of the new texture allowing you to have more masks for the same cost in memory, but as you mentioned you will have the extra texture lookup. Thanks for pointing that out! I should have mentioned it in the video.
@camburxp
@camburxp Жыл бұрын
Just would like to add, If yoy have a black and white mask, you could also use the compression R8 to just use one channel (Red) to pack it. That will also save memory. Also if you use the reduction settings from texture preview (not the max size but the mip map bias) you can use different methods to sharpen or blur the result.
@adventuretv9111
@adventuretv9111 2 ай бұрын
i had a COMPLETELY different problem, but this tutorial still fixed it because i was able too look at the parameters on the left, so thanks
@ali3ser
@ali3ser 2 жыл бұрын
also, one can pack 3 different opacity maps that belong to 3 different assets into one RGB texture, to further optimize the texture memory cost. ideal way of doing that would be to choose 3 assets that are usually used together in the scenes and pack them tohetger, i assume.
@zaxisup
@zaxisup 2 жыл бұрын
Definitely a good point. I often do that for grunge masks in my materials, as well as height brushes for sculpting landscapes.
@coffeediction
@coffeediction 2 жыл бұрын
True, we create one extra texture sample, but reuse it like crazy, its nice for master material setups
@ivayloi736
@ivayloi736 Жыл бұрын
Alpha channels are actually great, you just need to put there things that need better accuracy, not simple things like masks... Also, don't look the unreal so called "shader complexity". It's a nonsense metric. Sadly it's hard to explain this to artists and designers. First - the instructions that UE show are not real hardware instructions, and second - different instructions have vastly different cost. Sampling from different textures is costly, this is why we pack textures for PBR for example. Instruction to copy one color to another color is extremely cheap. Of course, sometimes you are running out of memory, and must do tricks, like decreasing the resolution of the alpha channel. But this is optimization depending on the situation you have. I would say, it's much better optimization to not use 4K textures in the first place, since it's required in very specific cases. Definitely not the case you are showing... I'm not sure why artists dig into these complex optimization topics they do not have the know-how, but somehow they are missing the simple optimization to just use the correct texture size, and not have everything 4K...
@xdrino91
@xdrino91 9 ай бұрын
one more things to say about texture : LEARN TEXTURE DENSITY !!!!!!! FPS : 1024px/m TPS : 512px/m RTS : 256px/m !!!! Good save of texture memory and keep a clean aspect in the world
@Miki19910723
@Miki19910723 Жыл бұрын
1. Use BC7 compresion for 4channel data 2. Use texture without gradient with default compresion if you want binary mask then it compreses better with dtx becouse alpha is 1bit 3. please change the title to be less missleading you're miss informing people.
@radivarig
@radivarig 3 ай бұрын
1. How can some channels not be baked with the same bit size as the rest? And if they can have different sizes since you said at 4:00 that packing alpha into rgba will have the alpha size be the same as rgb, how can that not be the case the other way around when you say at 6:20 that reducing the alpha also sets the same size to rgb? 2. Why would you pack opacitymap into all three rgb channels? A single channel is sufficient but with that shouldn't the increase only be 33% if all channel bits are equal and then you wouldn't need the separate lower mipmap on the alpha?
@spellweavergeneziso
@spellweavergeneziso Ай бұрын
how many objects in a game, percentage-wise do actually utilize opacity mask.. I'd say it's below 1% total so in this specific example, the optimization would be completely insignificant
@carlosrivadulla8903
@carlosrivadulla8903 2 жыл бұрын
can recommend a texture size for detail normals?
@zaxisup
@zaxisup 2 жыл бұрын
For detail normals you can typically get away to 1k (1024x1024). However, I usually use 2k (2048x2048) because I find that on a large project you only need about 10 to 20 detail normal textures and you can lower the detail of the prop specific normals when using detail normals in your materials. For example, if you had 100 props in your project and each one had a unique normal map that was on average 2k or 4k you could lower those to 1k and 2k respectively and use detail normals to make up for the loss of detail while saving a lot of texture memory.
@VortexArtLab
@VortexArtLab Жыл бұрын
U miss compression setting. It determines the amount of memory after compression. All textures in the video uses dxt1 / 5 (default), but for different types of textures you need to use different compression options
@Balcaceres_Art
@Balcaceres_Art 6 ай бұрын
Its 2024, you don't need to do this, this is like - 6 years ago. Drawcalls are the most important thing in Games, also - pack the map. This video is misinformation at its highest - It's nearly 2025, electric cars, ai, nvidia chips - somehow people are still optimizing meshes in an era of Nanite and Lumen and adding separate lighting maps. If you are in a professional studio and I see you do this - you're getting "The Talk" that could potentially affect your employment, stay current - pack the map with the alpha, and move on.
@tester5601
@tester5601 5 ай бұрын
You saved me
@NeonFraction
@NeonFraction Жыл бұрын
This is also true in Unreal 4.26. For many situations, alpha masks are included for neatness sake and ease of use, not performance.
@RealDaveTheFreak
@RealDaveTheFreak Жыл бұрын
Super helpful. Do you have any insights on when to use 16 bit Textures? (RG)
@DawnBriarDev
@DawnBriarDev Жыл бұрын
Alpha channels are typically 3 channels. So it isn't "RGBA" it's "RRGGBB" or "RGBRGB". Just use a scalar (black and white) mask instead whenever possible.
@miloszgierczak4806
@miloszgierczak4806 Жыл бұрын
dont listen to this advice. Do a standard texture packing, RMA / ORM + alpha, even if you need to cut your texture mem size for lower specs, you wont notice huge difference cutting the roughness/ metallic and AO textures really. Most imortant is ALBEDO and normal map in PBR workflow for your overall juice. Texture samples are more expensive than you think. There is another reason why you shouldnt use Alpha channels when you dont need to, because of the texture compression settings / algorythm. Without alha channel your textures would be compressed much more.
@lubruz7164
@lubruz7164 2 жыл бұрын
Very helpful video! Thanks for sharing.
@marko8095
@marko8095 2 жыл бұрын
Nice, thanks, I'm about to watch every video you made :D
@arielshpitzer
@arielshpitzer Жыл бұрын
excellent video
@arturperzyna1997
@arturperzyna1997 Жыл бұрын
Cickbait title. :/
Drastically Reduce Texture Memory in Unreal Engine 5!
11:45
Z-Axis Up
Рет қаралды 16 М.
You Should be Using Developer Folders in Unreal Engine 5
6:11
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
The ONLY texture a game NEEDS [UE4, valid for UE5]
18:56
Visual Tech Art
Рет қаралды 73 М.
Maximizing Your Game's Performance in Unreal Engine | Unreal Fest 2022
41:53
I solved Unreal Engine's Package Size Problem...
14:35
Cobra Code
Рет қаралды 85 М.
Fixing the Ugly Shadow Issues in Unreal Engine 5
7:12
William Faucher
Рет қаралды 228 М.
You're Naming Booleans Wrong! Unreal Engine 5
10:23
Z-Axis Up
Рет қаралды 3,3 М.
BOOST Foliage Performance In Unreal Engine
5:09
Joshua M Kerr
Рет қаралды 126 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН