Updates on Visualization - CERN Indico

Page created by Steven Barnes
 
CONTINUE READING
Updates on Visualization - CERN Indico
Updates on Visualizatio

                                                                        Laurent Garnier. IRIS
                                                                        Guy Barrand       IJCLa
                                                                        John Allison     G4A
                                                                        Frederick Jones  TRIUM
                                                                        Stewart Boogert. Royal Hollowa
                                                                        Laurie Nevay.    Royal Hollowa

Laurent Garnier - CNRS
Geant4 Virtual Meeting - 24 Septembre 202                                        1
                                A

                                     I

                                      1

                                           b

                                                F

                                                     y

                                                          y

                                                               n
Updates on Visualization - CERN Indico
1
                                             11.0 Release status
     ● All drivers:
         ● New commands
             ● /vis/viewer/set/specialMeshRendering
                 ● This should come before /vis/drawVolume
             ● /vis/viewer/set/specialMeshVolume
                 ● To select meshes if necessary.
         ● Small change of behaviour if a user opens a second viewer. It now picks up the
           view paramaters of the most recent previous viewer.
         ● New example/extended/visualization/movies.
         ● Removal of obsolete drivers (thanks to Ben)
         ● New ToolsSG drivers.

     ● VTK driver updates
     ● OpenInventor updates
     ● TOOLSG updates

Laurent Garnier - CNRS
Geant4 Virtual Meeting - 23 Septembre 2021
Updates on Visualization - CERN Indico
VTK visualisation driver (2)                                        Stewart Boogert
                                                                    Laurie Nevay
                                                                    @Royal Holloway

• Example in action                           • Stretch example (CMS)
  (extended/medical/DICOM                       • Large GDML file (from JA)
  example)                                      • Slow to interactively view in
                                                  GL and Open Inventor
                                                • Usable performance on
                                                  laptop
                                                • Performance scales with GPU

 Need to implement “special” mesh rendering
 for nested PVs
Updates on Visualization - CERN Indico
VTK visualisation driver (3)                                                                         Stewart Boogert
                                                                                                     Laurie Nevay
                                                                                                     @Royal Holloway

• Interactive 3D in PowerPoint! Vtk → OBJ/GLTF → Powerpoint

 This is not a movie but the actual 3D model. Download the PowerPoint and manipulate (rotate, zoom etc.)
Updates on Visualization - CERN Indico
CGAL Boolean engine                                                                Stewart Boogert
                                                                                   Laurie Nevay
                                                                                   @Royal Holloway
https://www.cgal.org

• Processing using                            • Benefits of CGAL
  Computational Geometry                         • Very robust algorithms
  Algorithms Library (CGAL)                      • Manipulate tessellated data
    • Open source and header only                  within G4
      library (+ boost headers)                        • tetrahedralization
          • So can be packaged with G4 if              • detect non-manifoldness,
            required                                     uniform remeshing, Delaunay
    • Replace algorithms in
          • G4Polyhedron &
            G4PolyhedronArbitary
          • G4(Union,Subtraction,Intersecti
            on)Solid
          • G4MultiUnion
    • Question about thread safety
          • Use G4RecursiveAutoLock

                                                Union of 250 random (size and orientation) cubes
Updates on Visualization - CERN Indico
Open Inventor Qt Viewer                                               Frederick Jones, TRIUMF

The new Qt-based viewer (OIQt) is complete with all the required feature
         •        Meets or exceeds the functionality of the older OIX and OIXE viewer
         •        Removes the dependency on obsolescent Xt and Xm (Motif) librarie
         •        Requirements are: Qt5, OpenGL, and Coin3d libraries. On MacOS the native OpenGL
                  can be used and no X11 or Mesa libraries (XQuartz) are required
         •        Available to try in 11.0 Beta; some minor additions are being done for Release 11
         •        The Coin3d libraries (Coin 4.0.0 and SoQt 1.6.0) can be installed system-wide via a
                  package manager (Linux) or brew (MacOS). They can also be built from source by
                  cloning repositories from https://coin3d.github.io/ and following the build instructions.

What is this viewer useful for
•       Bookmarking: similarly to a web browser, any 3d view can be
        “bookmarked” and revisited later with a single mouse-click.
          • Changing views consists of just changing the camera
            settings, so the viewer remains fully functional at all times
          • Bookmarks are shown in a clickable editable list and are
            stored in a file for use in later runs. When developing a
            geometry or debugging a simulation, it is easy to return to
            view specific parts of the detector and nearby particle
            trajectories
          • Cycling through the bookmarks results in a “slide show”
            where each slide is fully 3d-interactive – useful for
            presentations using screen sharing.

    6
                                                                     Geant4 Collaboration Meeting 20-24 September 2021
             .

                                      ?

                                                                .

                                                                        .

                                                                             s

                                                                                  s

                                                                                              .

                                                                                                   s
Open Inventor Qt Viewer                            Frederick Jones, TRIUMF

         What is this viewer useful for …(continued
              •   Fast and precise navigation: moving the camera along a “reference path”
                    • A reference path is defined as a selected particle trajectory or generally as a list of
                        3d coordinate triples, loadable from a file
                    • Geometry elements are ordered according to their perpendicular distance from the
                        path (most useful for extended structures such as beam lines) and are displayed in
                        a clickable list for quick navigation to any element
                    • Buttons for stepping through the elements and for 90-degree rotations around the
                        reference path. “Flyover” animation feature moves the camera smoothly along the
                        path, with speed and elevation controls
              •   Other: seek function to re-center the view on any geometry element; mouse-over
                  readout of volumes and trajectories; PS and PDF output (the latter with transparency).
                  The viewer can be hosted in the Qt UI panel (as with the OGL viewer), or detached as a
                  self-contained viewer in a resizable window (e.g. for full-screen use in a second monitor).
         Remarks and plans
              •   The transition to Qt allows reduced 3rd party library dependencies, especially on MacOS,
                  and should make it easier for users to access this viewer.
              •   A Qt-based viewer allows easy integration into the Qt UI, with unified event management
                  of mouse and keyboard input. The way is open for further development.
              •   Plans
                    • Application support for reference path definition and other navigation modes
                    • Investigate packaging of Coin3d libraries for ease of access by users
                    • Promote the use of different easily-switchable viewers in the G4 Examples.

7
                                                                  Geant4 Collaboration Meeting 20-24 September 2021
    :

                                          .

                                               .

                                                    )

                                                         .

                                                                          .

                                                                                    .
G4/vis/ToolsSG
• Have the G4/vis “ToolsSG” vis drivers based on the g4tools/
  sg “scene graph” logic (similar to the “So” one of Inventor).
• Rendering of a scene graph is abstracted. Have concrete
  renderer for OpenGL, but also for “offscreen” by using gl2ps.
• Good part of the code is already here in g4tools because of
  offscreen plotting.
• In G4-11, have code in g4tools to tie to “windowing systems”
  as straight X11, Windows but also for OpenMotif and Qt.
• Arrange to have in G4/vis/ToolsSG itself, only the code
  needed to tie to the G4/vis logic.
• Still push, as much as possible, an “academic way” in G4/vis.
                      G.Barrand, CNRS/IN2P3/IJCLAB
ToolsSG/Qt/OpenGL driver on B1

              G.Barrand, CNRS/IN2P3/IJCLAB
WebAssembly

An interesting technology to have on the web a C++
application, that does WebGL for its graphics, and this
without having to deploy a specific web server.

                  Guy Barrand, CNRS/IN2P3/IJCLab       2
Physics: Geant4, HEP
• I ported g4view, g4exa: and then have Geant4 (10.3) in .wasm!
• I can read .root files with geometries, histos and ntuples.
• pmx is ok: then an embryo of LHCb event display (to show, again and
  again, that we can do highly portable C++ HEP apps without having
  to embark… the rest of the world).
• EsbRootView: R&D display for ESSnuSB (ESS is an accelerator at
  Lund). Presented at vCHEP-2021 in May. There is now a paper.
• I have a terminal mode (done with xterm.js) to type “insh”
  commands, or… G4 commands, then from the web browser!
• All these are testable from gbarrand.github.io, under the sections
  « WebAssembly » of each apps.

                       Guy Barrand, CNRS/IN2P3/IJCLab          9
g4view

Guy Barrand, CNRS/IN2P3/IJCLab      11
Questions ?

Laurent Garnier - CNRS
Geant4 Virtual Meeting - 23 Septembre 2021
You can also read