Looking for a way to process a 24bit texture such that the red and green channels will be normalized within a -1 to 1 range, and not include the blue channel.
What does the Normal Normalize node do? I guess it’s only normalizing 0-1 ?
This is intended for an anisotropy texture. But I guess the same process would be needed for flow maps too.
The blue channel is not used for the vectors, it’s a mask for strength of the effect, so I wouldn’t want that factored into the normalization.
Replies
So, first it normalizes to -1,1 then it converts that into 0,1. I guess I just need to make my own custom pixel processor, and simply omit that last part?
Make sure your pixel processor is set to absolute color depth of 16f or 32f or it will clamp all the values In the function between 0 and 1.
just divide the resultant [-1:1] vector by 2 and add 0.5
bc6h can support signed values - its not small though (i think 4x the size of dxt1 but possibly 8x)
TLDR : just don't
this should really be treated the same way as a normal map, store the values in 0:1 range, expand it in the shader.
I want to normalize a 2D vector. The vector is stored in the Red and Green channels of a 24bit PNG. I want to pass through Blue and Alpha unchanged. I want to publish the SBSAR on GitHub for others to use in whatever app they use which supports SBSARs.
Any improvements I could make here?
Although when I attempt to Bake Outputs via a Substance2 node in 3ds Max, it ignores the alpha channel.
Going to test with Substance Player.
Is there a way for the SBSAR to auto-detect the resolution of the incoming bitmap and set that as the default resolution for the output? Same for bit depth?
there's not really anything useful you can do to simplify the pixel processor
you only need the pixel processor though, the rgba split/merge stuff is redundant cos the pixel processor is passing B(z) and A(w) out unchanged
Only the pixel processor itself needs to be 16f/32f in this case - what goes in and out can be handled as normal 8/16bit data because it's in the 0:1 range.
You could (in theory) safely leave the graph as relative to parent - I've had bugs in the past with this stuff failing and had to force 16bit on .sbsar but it's been a few years since it last came up.
fwiw - i haven't used 8 bit textures for years, the DXT compressed version of a 16bit image is no bigger than an 8bit one and you dont have to fight banding
https://github.com/KhronosGroup/glTF-Sample-Assets/blob/1d4b083ca989bbf594309cb2ea66b4dc89a84783/Models/AnisotropyBarnLamp/README.md#normalizing-anisotropy