When applying normal maps, whether via a shader or via setNormalMap(), you always need to have a model with tangents and binormals defined (in addition to UV’s). The tangents and binormals are necessary to define the coordinate space of the normals.
The CardMaker doesn’t create a card with tangents and binormals. Try this egg file instead:
That egg file is actually somewhat pleasing; just it detracts from the “one-liner” advantages of a single-file program. Not that I’ve gotten the vertex data and tried to learn to create those extra arrays procedurally.
I attempted the strategy from the driving scene with an AlphaTestAttrib to give the texture some transparent regions. Failure!
Hmm, I don’t think the TextureStages created by NodePath::set_normal_map() make any particular effort to preserve the alpha channel. (Not that it’s obvious which alpha channel you’d want to preserve, either–the one in the normal map? Or the original vertices, or some other texture?)
You might have to lay down your own TextureStages that do exactly what you want to do with the rgb and alpha channels. You can follow the example of NodePath::set_normal_map() (but you’ll have to read the C++ code in the source).