Download

Couple of quick n00b questions on flat-normal and channel fidelity

Hi,

Solo-dev-guy here and had a couple of hopefully easily-answerable Qs. Wondering if the community can help me out?

1 - In my travels, I’ve seen it stated in a few places that the alpha channel of a texture-sampler is slower or incurs significantly more overhead to sample it or RGBA vs just a RGB sample. Is this true?? I’d love to pack a couple textures into a free alpha channel and I can drop a whole texture-sampler altogether (2packed RGBA vs 3 RGB). Is this a worthwhile exhange?
→ Per darthviper alpha-channel is just another channel w/attendant overhead;nothing especially extra for using it and of itself.

2a - What IS the flat normal for Unreal. I believe it is .5,.5,1]??? Plz confirm.
2b - Given that assumption, I came up with this way to tweak a normal. I get I can futz with the RG channels OR B channel to get the same thing; there a no-no to this method?

Untitled.png

Thanks in advance for any insights.

EDIT - One more Q: is there a preferred channel/sampler-type to hold a displacement/heightmap? I’ve seen the file/compression formatting, but what would be the ideal slot to ensure maximum fidelity?

Alpha only counts more in that it’s an additional channel, you can use any channel for the purpose of an alpha and they all cost the same. You can definitely reduce the number of textures by combining things into different channels. So if you have an opacity map you can drop that into the alpha as grayscale, or you can even put in roughness/specular/metalness into the RGB channels individually

Great! Came back from coffee and got a reply on this :smiley:

I had read that the alpha channel alone used to (?) cost 3x more just in it’s own right, but at the very least your explanation is what I would expect; eg: it’s ‘just’ a channel. That seems to be spectacular news in that I can reduce the number of samplers I use… Muchly appreciated.

  1. Alpha channel takes the same memory as 3 color channels with default compression and that is the only takeaway.
    Decision on putting something in the alpha channel or not depends on the context. You will not always net an increase overall, if doing so.

2a) What you are referring to a flat tangent-space normal, corresponds to a value of (0,0,1)

2b) Multiply blue channel by a value, lower than 1, to increase intensity.

@Deathrey Thanks for the clarification. To confirm, I’m essentially trading memory overhead for sampling overhead? In my case, since I leverage just a few master materials with a relatively low instruction-set, I’m guessing I’ll get more out of dropping the one sampler. I tend to recycle noise textures and other basic stuff so I’m of the opinion memory overhead isn’t going to be too onerous; a souls-like isn’t going to have terribly many things on the screen at once…

W/regards to the normal question:
2a - IF IF IF I was for the sake of argument to use my LERP method, the correct tangent-space value to lerp to would be 0,0,1 (as I read your statement)?
2b - Disregarding the above, I can just make math against the B channel to get the same effect as what I had shown? There is no value in modding RG values if I just play w/B?