Тёмный

Don't use Alpha Channels in Unreal Engine 5 

Z-Axis Up
Подписаться 1,4 тыс.
Просмотров 17 тыс.
50% 1

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

Опубликовано:

 

2 сен 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@tylergorzney8499
@tylergorzney8499 Год назад
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 Год назад
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.
@polygonforge3633
@polygonforge3633 Месяц назад
@@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.
@coffeediction
@coffeediction Год назад
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 Год назад
Glad you found it helpful!
@polygonforge3633
@polygonforge3633 Месяц назад
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 Месяц назад
@@polygonforge3633 Thanks for bringing it to attention!
@ShrikeGFX
@ShrikeGFX Год назад
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
@shannenmr
@shannenmr Год назад
Trading extra texture lookup which is one of the slowest operations for memory usage
@zaxisup
@zaxisup Год назад
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.
@ali3ser
@ali3ser Год назад
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 Год назад
Definitely a good point. I often do that for grunge masks in my materials, as well as height brushes for sculpting landscapes.
@coffeediction
@coffeediction Год назад
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 4 месяца назад
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.
@lubruz7164
@lubruz7164 Год назад
Very helpful video! Thanks for sharing.
@RealDaveTheFreak
@RealDaveTheFreak Год назад
Super helpful. Do you have any insights on when to use 16 bit Textures? (RG)
@marko8095
@marko8095 Год назад
Nice, thanks, I'm about to watch every video you made :D
@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.
@DawnBriarDev
@DawnBriarDev 10 месяцев назад
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.
@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
@arielshpitzer
@arielshpitzer Год назад
excellent video
@carlosrivadulla8903
@carlosrivadulla8903 Год назад
can recommend a texture size for detail normals?
@zaxisup
@zaxisup Год назад
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.
@miloszgierczak4806
@miloszgierczak4806 11 месяцев назад
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.
@arturperzyna1997
@arturperzyna1997 Год назад
Cickbait title. :/
@polygonforge3633
@polygonforge3633 Месяц назад
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 Месяц назад
You saved me
Далее
Drastically Reduce Texture Memory in Unreal Engine 5!
11:45
Your bathroom needs this
00:58
Просмотров 16 млн
I solved Unreal Engine's Package Size Problem...
14:35
How Games Have Worked for 30 Years to Do Less Work
23:40
UE5 Arrays in Materials
30:10
Просмотров 945
Vertex Painting in UE4/5
17:47
Просмотров 52 тыс.