From Farshid Lashkari, "The logic for handling opacity maps in the 3ds reader seems to be incorrect. It checks whether the diffuse texture contains transparency, instead of the opacity texture. If the diffuse does not contain an alpha channel it outputs the warning:

The plugin does not support images without alpha channel for opacity

This seems to indicate that the check for alpha should be against the opacity map. I've attached the updated file.

"
This commit is contained in:
Robert Osfield 2013-05-28 15:43:12 +00:00
parent 4b223c770b
commit 3722f46aff

View File

@ -1264,10 +1264,10 @@ ReaderWriter3DS::StateSetInfo ReaderWriter3DS::ReaderObject::createStateSet(Lib3
}
// opacity
osg::Texture* opacity_map = createTexture(&(mat->opacity_map),"opacity_map", textureTransparency);
if (opacity_map && texture1_map)
osg::Texture2D* opacity_map = createTexture(&(mat->opacity_map),"opacity_map", textureTransparency);
if (opacity_map)
{
if(texture1_map->getImage()->isImageTranslucent())
if(opacity_map->getImage()->isImageTranslucent())
{
transparency = true;