GVIEW


November 30, 2018

1 What is it?

A GDML viewer for Geant4, with additional visualization tools. It, like EGSnrc’s geometry viewer, is explicitly based on the simulation tracking primitives. The default interactive Geant4 viewer uses OpenGL to show triangulated primitives, which is slightly unrealistic and obscures geometry errors.

2 Installation and Invocation

The Git repository is at https://github.com/mstoeckl/gview.

The build is performed with CMake. (i.e, use mkdir build; pushd build && cmake .. && make -j 4 install && popd).

2.1 Requirements

The library geant_common provides classes that record particle traces and total energy flow between volume; the resulting data can be viewed with gview

2.2 Usage

gview file.gdml [trace.dat.gz]

3 Features

Can color code volumes based on queries over an energy flow map. Supports clipping planes.

3.1 Interactive raster

Volumes may be partially transparent.

Interactivity is produced by progressive color pixel size reduction; i.e., during navigation, a fast render might use one ray per 8×8 pixel square; and this can be progressively refined to 4×4, then 2×2, then 1×1 pixel squares.

In high detail mode, uses cone tracing to generate feature lines, with details similar to [CP09].

Includes particle track rendering, and (preliminary) particle track density rendering. Is multi-threaded, and supports a rendering graph for partial scene modifications.

3.2 Vector

Begins with a grid render, but uses marching squares to identify boundaries between volumes, and further refines boundary, crease, and color gradient parameters. See1.


diagram

Figure 1: SVG render example. The image is large and may take time to render.

The initial grid resolution is typically 1000×1000, and may require 4GB of peak memory for dense and complicated scenes.

This mode is useful when creating figures, as e.g. highlighting or zooming in on a particular region is straightforward.

References

[CP09]

A. N. M. Imroz Choudhury and Steven G. Parker. Ray tracing npr-style feature lines. In Proceedings of the 7th International Symposium on Non-Photorealistic Animation and Rendering, NPAR ’09, pages 5–14, New Orleans, Louisiana. ACM, 2009. isbn: 978-1-60558-604-5. doi: 10.1145/1572614.1572616. url: https://doi.acm.org/10.1145/1572614.1572616.

1When multiprocessing is enabled, Geant4 uses thread-local storage; this make using it as a library trickier, but not in this specific case.


Return to main page | as PDF