Hello All, I am working on the osgDB_lwo plugin. I am trying to get it to use transparency maps. In OSG, I know I can use the alpha channel of the color map to provide a transparency map. In LightWave, there is a seperate grey-scale image that is used as the transparency map. In the current implementation of the plug-in by Marco Jez, that block is ignored.
I have it to the point in the code where I know about both blocks (alreadt read in with osgDB from a file). I have two conditions: 1. There is a color map. In this case, I need to grab the transparency map and place its grey value in the alpha channel of the existing color map. 2. There is not a color map, but only a base color. Here I create the color map by placing the grey value of the transparency map in the alpha channel and I set the RGB values to the base color. I have a pretty good idea how to do this if the images were already 32 bit BGRA or whatever. I am not as secure working with the other image types, like if there is not already an alpha channel, or if the thing is using grey-scale or an indexed color. Should I create a new image and fill it or can I use the rescale function to change it? I am not sure how to create an image from scratch without reading it from a file. I am not sure about how to read and write values to and from the images (except for the 32 bit case, I got that). Any help would be appreciated. Any reference materials I could read? Gatchas I should watch out for? Thanks in advance for any help, -- Rick
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
