Closed S-Dafarra closed 3 months ago
- Improves the transparency visualization of the models
In order to do this, I had to play with the material flags. In particular, I had to use geomNode->setMaterialFlag(irr::video::EMF_COLOR_MATERIAL, false);
to specify irrlicht
to use the material color instead of the texture color (that we don't set) and geomNode->setMaterialFlag(irr::video::EMF_BLEND_OPERATION, true);
to trigger the blending operation, necessary when visualing transparencies. Finally I had to use the irr::video::EMT_TRANSPARENT_VERTEX_ALPHA;
material type. I noticed that this can make objects appear transparent even when they are not, so this is used only when the alpha component is different from 1.0. irrlicht
still seem to have some issue in computing the correct transparency in case of multiple objects are overlapping, but I think it is a good trade-off
This PR
idyntree-model-view
to visualize a set of framescc @dariosortino