Prevent AIS_TextLabel from dropping shaddows on PBR environment

Hello everyone.

In my 3D viewer, I use a PBR environment for realistic rendering of materials.
I set the shading model to Graphic3d_TypeOfShadingModel_Pbr and Graphic3d_RenderingParams.IsShadowEnabled to true.

I also allow users to put some texts where they want using AIS_TextLabel shapes, for example to annotate a shape.

The problem a just discover is that these labels drop shaddows on shapes, but I don't want to, I want them to be really separated from the real CAD model.

Is it possible to exclude some AIS_Shapes to drop shaddows on other shapes ?

Thank you for your answer ;)

gkv311 n's picture

Take a look onto the answer from similar topic.

Guillaume CHAFFAROD's picture

Hello and thank you. I've already seen this thread, and by labels are on a dedicated layer, but it doesn't work, I still see shadows from shapes on this layer within shapes of other layers.

Is there an zlayer setting option I'm missing ? or maybe the z-layers order is important ?

Thank you.

gkv311 n's picture

In Draw Harness it looks like this:

pload MODELING VISUALIZATION
box b 100 200 300
box bb -500 -500 0 1000 1000 0 -preview
vclear
vinit View1
vrenderparams -shadingModel PHONG -shadowMapBias 0.01
#vrenderparams -shadingModel PBR -shadowMapBias 0.01
vdisplay -dispMode 1 b bb
vaspects bb -material STONE
vfit
vlight -change 0 -castShadows 1 -direction 1 1 -1 -head 0 -display

vpoint p1 100 0 300
vpoint p2   0 0 300
vdimension dim1 -length -plane xoy -shapes p1 p2
#vdisplay   dim1 -layer DEFAULT
vdisplay   dim1 -layer TOP

Dimension in Graphic3d_ZLayerId_Default:

image1

Dimension in Graphic3d_ZLayerId_Top:

image2