TEveBoxSet, color sometimes becomes black in projection

Hi ROOT team,

I see some funny behaviour in TEve. I draw a cluster in magenta:



and it’s displayed in magenta.

But when changing the projection to XY (orthographic) it changes its color to black:


This does not happen for all the clusters. Some of the others are still colored in the orthographic projection. Although it seems, that the color changes slightly (from magenta to a some lighter pastell tone)


(I don’t use transparency for the TEveBoxSet)

Is this a known feature or can I change this behaviour?

cheers,
Peter

Hi Peter,

Strange … I’ll investigate. You change the 3D-view to use one of the orthographic projections, right?

Cheers,
Matevz

Hi Matevz,

Yes. I found this feature when changing to the XY orthographic projection. Actually I think I see some slight color change in the other orthographic projections as well, but there the clusters are not completely black.

cheers,
Peter

Hi Peter,

About colors getting brighter – I think this is due to specular reflection as in orthographic projection you look at the box faces directly. Try switching it off in viewer “Style” tab.

Now, for the black ones, I can’t reproduce the problem with standard demos in tutorials/eve. How do you create the boxes? In 3D, they look ok from all angles, also in outline and wireframe mode (keys “s”, “r” and “t”)?
Can you post a simple script that reproduces the problem?

Cheers,
Matevz

Hi Peter,

I think I found the problem: for box-type kBT_FreeBox the normals were not computed for every face – fixed normals were used instead. Under some circumstances this could lead to the observed behaviour.

The fix is in the trunk, please give it a try.

Best,
Matevz