Archived discussion

Transparency for unlit textured AIS_Shape

VisualizationMon, 03/11/2024 - 23:000 replies

Browse this forum
QuestionAuthor

Hello everyone!

I have a transparent AIS_Shape, which I create like this:

auto ais_shape = tira::xocc::makeHandle<AIS_Shape>(TopoDS_Shape{});

ais_shape->Attributes()->SetShadingModel(Graphic3d_TOSM_UNLIT);
ais_shape->Attributes()->ShadingAspect()->Aspect()->SetAlphaMode(Graphic3d_AlphaMode_Blend, 0.5);
ais_shape->Attributes()->ShadingAspect()->SetTransparency(0.3);

When I tried to add texture, transparency stopped working.

ais_shape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap(textureMap);
ais_shape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn();

Any ideas?

Thanks

Discussion

No archived replies

Posts are displayed in their archived order.