Card with rounded corners

I would like to make a textured card (square) appear to have rounded corners by specifying a texture, and making the border color transparent. I’m sure this is fairly easy, but I can’t seem to find a way to make a certain color transparent. Thanks for your help.

making a “certain” color transparent is a quite outdated way of handling transparency.
these days you would just add an transparency-channel to your image, or load a seperate image as such a channel.
there are many tutorials how to paint transparent images with pretty much every drawing-application out there.

if you dont have the possibility to directly create an image with RGBA channels. you can use this function to load a grayscale image as alpha-channel https://www.panda3d.org/apiref.php?page=Texture#setAlphaFilename
you should enable transparency on your node or it might show no effect.

If you want a deck of cards (square edges); I have one such deck completely modeled in maya; as well as the egg. All you would need to do is alter the textures and add rounded edges+alpha (textures are already in png format) or apply a grayscale alpha map to all of them procedurally.

PM me if you want the egg or the .mb (was done in maya 2008), as well as the textures.

R

ThomasEgi, thanks for pointing me in the right direction. I was pretty easily able to get a png image working with transparency.

rwhughst, thanks for offer, but I was referring to cards as just a 2d rectangle generated by the CardMaker class in Panda. I think you meant cards as in playing cards.

Again, thanks for the quick responses!