Qt GUI slider for volume transparency

Deal all,

In previous versions of Geant4 (10), in the bottom left of the Qt GUI there was a slider to change the transparency of the volumes based on their hierarchy.
I have found an image of it on the web (unfortunately I have installed only the most recent versions of G4).

In the most recent G4 versions (11+) this slider is no longer present.

Is there a way to access that functionality? For example by UI command?

Thank you
Andrea

Hi Andrea

From 11.2, we implemented a “generic” scene tree that works across all types of viewers. Previously the scene tree was only available in the OpenGL Qt viewer; moreover had performance penalties for complex geometries. The slider functionality proved difficult to emulate, but you can make volumes and whole branches visible and invisible by clicking in the tree, plus other nice features.

I attach a slide from a recent G4 Course (https://indico.cern.ch/event/1419928/contributions/5970006/attachments/2938723/5182761/VisUI-1A%20Introduction,%20Basics%20and%20GUI.pdf).

John

Thank you John for your very quick renspose!

Just to know, are the difficulties related just to the use of the slider itself or to the functionality that the slider controls (transparency based on hierachy)?

If I have understood correctly, the possibility to change the transparency of all volumes based on their hierarchy is no longer present and I would suggest to re-add it as UI command (of course only if the difficulties were related to the slider itself). It was quite useful!

Andrea

Hi Andrea

In this “generic” approach we are restricted by technical issues to do with dependency between Geant4 categories/libraries. Communication from the GUI to the viewer has to be via UI commands to avoid this dependency. I don’t rule out implementing a command - or finding another way - but not for the upcoming release, 11.3.

Meanwhile, there are several “features” you could use. The first I already mentioned: click on the tick box and a volume or tree can be made invisible. If you want the daughters to be visible, right click and set “daughters invisible” false.

On the command line (or in a macro) you can change the vis attributes of a volume with /vis/geometry commands.

There is no single command that makes all volumes of a certain depth invisible, which is what I think the old slider used to do. We can discuss, perhaps offline, what would make sense for you. If we can implement such a command, we can re-implement a slider.

John
John.Allison@cern.ch

Thank you again for your clear explanation.
I found the new commands in the sceene tree very useful.

I would be glad to discuss with you my idea.

Thanks again
Andrea