How to change transparency in ROOT's GL viewer

Dear experts

How can I change the transparency automatically for all volumes in the TGeoManager since they have different materials and densities, both using command line and GUI clicking?
I didn’t find such a Botton on ROOT’s GL viewer. I’m using

TGeoManager* geo = (TGeoManager*)gDirectory->Get("someGeo");
geo->GetTopVolume()->Draw("ogl");

Hi,

Let me add in the loop @linev @couet @agheata

Cheers,
D

Hi,

If you are using latest ROOT versions,
then by default you will get web-based geometry viewer.
And in settings widget in “Appearance” tab you can find “Transparency” slider. See screenshot:

In plain GL viewer I am not sure if such feature exists.

Regards,
Sergey

By default you mean geo->GetTopVolume()->Draw()?

Yes, with GetTopVolume()->Draw() starts web-based viewer now.

For some previous ROOT versions like 6.30 and 6.28 you could explicitly enable such geometry viewer with:

root --web=chrome tutorials/geom/rootgeom.C

when starting ROOT.

I’m using the latest stable version v6.32.08, but when I draw it, it just give me a default TCanvas instead of viewer…

Try to provide --web=chrome argument

Yes, that works, but not without that argument…