How do I bake a normal map with ONLY the red green channels?

I’m learning how eye textures work with Valve games, and one part of the materials to use is a normal map for the iris. It only needs the RG channels and not the blue channel. How do I bake a normal map with just the RG channels?

You bake it as regular then use an image editor (Photoshop/Gimp) to replace the blue channel with whatever grayscale texture you need to store in it. If you don’t want to replace the blue channel, there’s no point in just removing it.

Oh… I didn’t think it would be that easy.

But yes, apparently for the normal maps to work in this engine for the eyes, it’s cornea normals only need the RG Channels. That’s what someone more experienced with making source models told me.

As far as I know any image file has 1, 3 or 4 channels, so it’s literally impossible to have an image file with only two channels. The fact that the engine doesn’t need the blue channel only means that you can replace it with something, if you want to but there’s no point in doing so, if you’re not storing anything useful in it.

Normals are by nature 3 dimensional vectors, by reducing the number of rgb channels you will be arbitrarily messing up with the supposed directions that are required for the light calculations.

You need to figure out what they meant by 2 channel images.

To be honest, eyes in games look terrible whether they use 2 dimentional or infinitesimal or infinite dimensional maps. They just cant do it well.

2 channel normalmap means that the third channel is calculated on the fly. This is useful to store a grayscale image in the blue channel that otherwise would be a separate image. This saves memory and performance when done with many textures.

Sure I am not concerned about it myself, OP needs to figure out what that experienced person truly meant so it can be duplicated in Blender.

@kkar @helluvamesh Turns out I was wrong, I never remembered what one of the textures looked like.

It had a blue channel and it looked something like this ↑

I misinterpreted what he said. When the normal map for the eyeball was baked, it had similar greyscale patterns for the RG parts of the color channels but the blue channel looked like this. So I replicated it in photoshop and it came out perfectly in Source Filmmaker. So I own up to my mistake and showed my work. Thanks for everyone’s time.