Hi dear geant4 users i after installation on my windows machine and building of example B1. when try running it i am getting this visualization setting message. i need help in resolving this please

The message is arising from the /vis/open OGL command. This build/install of Geant4 doesn’t have the OpenGL driver built, as shown by the lines:

parameter value (OGL) is not listed in the candidate List.
Candidates are: ATree DAWNFIL HepRepFile HEpRepXML RayTracer VRML1FILE VRML2FILE gMocrenFile

The OpenGL driver needs to be enabled when building Geant4 itself (rather than the example). That can be done by configuring using:

$ cmake -DDEANT4_USE_OPENGL_WIN32=ON <otherargs>

Hi bmorgan,
thank you for the help, i was able to resolve the issues i can now view example B1 on OpenGl viewer o. please i want to my default viewer to VRML2FILE or gMocrenifile. how can do it sir?

Different drivers can be selected when running the /vis/open command in a script of from the UI prompt. In example B1, this script is vis.mac, where there are the lines:

# Use these open statements to open selected visualization
# Use this open statement to create an OpenGL view:
/vis/open OGL 600x600-0+0

So to use VRML2FILE change this to:

# Open a VRML2FILE view
/vis/open VRML2FILE

or for gMocrenFile

# Open a VRML2FILE view
/vis/open gMocrenFile

Other options for driver selection and use are covered in the Visualization Chapter of the Application Developer Guide.

Hi Bmorgan, once again i am much grateful for your time and support. i run the command "/vis/open/VRML2FILE " I was ask to set environmental variable "G4VRMLFILE_VIEWER " to view the generated VRMLFILE automatically. thus;

You don’t have to set G4VRMLFILE_VIEWER. You have created `g4_01.wrl’. Just browse it with a browser.

Hi Allison.
Thank you very much. i just browse it and viewed it.

Hi Allison,
Thank you very much for the support. i have installed QT 5.12.11 on my windows machine, after using Qt command prompt to build example B1 the UI sessions available to visualize it didni`t include QT. how do i enable Qt to able to view using QT graphic interface. thank you for your time.

Hi Alfred

You have build with Qt - see Building and Installing from Source — Geant4 Installation Guide 10.7 documentation . You have to set a CMake option, something like -DGEANT4_USE_QT=ON.

I’m not familiar with Windows, so it might be different, but you might also have to help CMake find Qt using -DCMAKE_PREFIX_PATH.

Hi Allison and Bmorgan.
Thank you for the support thus far, i am happy i have made much progress. i want to start simulation. how can i open the geant4 graphic interface to input code to visualize. thank you for your time.

If you’ve built Geant4 with Qt enabled as noted by @Allison, then starting the application and using /vis/open OGL in the vis.mac script as we discussed above should open the Qt-based GUI interface. That should show the detector geometry, and there’ll be a text entry box at the bottom where UI commands can be entered.

Hi Bmorgan,
Please don`t be tired with me. i have started another installation with Qt enabled as shown attached. just want want to know if am doing the right thing. thank you for your time.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.