jPCT-AE. I have a wavefront 3d model of the room consists of floor and walls. Walls texture contains transparent regions (windows). Textures are loaded ok (something like "textureManager.addTexture(fileName, new Texture(textureStream)") Model from obj+mtl are loaded ok using jpct obj loader, but I have a problem with transparency:
1. If mtl material specification contains transparency ("d" or "Tr" commands) wall becomes semi-transparent (wrong, only window should be transparent)
2. if mtl material specification contains no transparency command window becomes black
My question is: how to make window region transparent and wall not transparent using obj+mtl + texture ?
UPD: Resolved:
1. transparency command removed from .MTL
2. transparency is set by hand in code after loading object :
Object3D[] loadedObjects = Loader.loadOBJ(objStream, mtlStream, 1);
for (int i = 0; i < loadedObjects.length; i++) {
loadedObjects.setTransparency(255);
}
world.addObjects(loadedObjects);
1. If mtl material specification contains transparency ("d" or "Tr" commands) wall becomes semi-transparent (wrong, only window should be transparent)
2. if mtl material specification contains no transparency command window becomes black
My question is: how to make window region transparent and wall not transparent using obj+mtl + texture ?
UPD: Resolved:
1. transparency command removed from .MTL
2. transparency is set by hand in code after loading object :
Object3D[] loadedObjects = Loader.loadOBJ(objStream, mtlStream, 1);
for (int i = 0; i < loadedObjects.length; i++) {
loadedObjects.setTransparency(255);
}
world.addObjects(loadedObjects);