Index of /~tanaka/GEANT4/VRML2_FIG

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]exampleN02-beamOn1.wrl 1998-11-26 11:06 217K 
[   ]exampleN02-beamOn10.wrl1998-11-26 11:06 2.3M 
[   ]exampleN03-beamOn1.wrl 1998-11-10 11:32 45K 
[   ]exampleN03-hits.wrl 1998-11-10 16:40 29K 
[   ]exampleN05-geom.wrl 1998-11-06 23:08 1.4M 
[   ]vis_test19.wrl 1998-11-06 23:48 5.8K 

===== Geant4 VRML 2.0 visualization driver =====

Geant4 VRML 2.0 visualization driver is ready for your use.

===== ABSTRACT =====

Geant4 VRML 2.0 visualization driver makes Geant4 output 
VRML 2.0-format files, which describe visualizable 3D scenes of 
Geant4 simulation, i.e., geometry, trajectory, hits etc.
Interactive visualization of physical-volume names and hit positions 
are also supported.

The old VRML 1.0 visualization driver still works, too.

Sample outputs are placed at the following place:

http://geant4.kek.jp/~tanaka/GEANT4/VRML2_FIG/

You can obtain free VRML 2.0 browsers (viewers) from Web pages linked
from Geant4 Japan Group home page: 

http://geant4.kek.jp/GEANT4/index.html


===== NEW FEATURES: Interactive visualization of information strings etc =====

New features in VRML 2.0 driver are as follows.

(1) Interactive visualization of physical-volume names and copy numbers.

    In order to make this function active, set an environmental variable 
    as follows before executing your Geant4 executable.

     % setenv G4VRML_PV_PICKABLE  1

    The function is as follows:
    When the mouse pointer is focused on a visualized physical-volume, 
    its name and copy number are displayed in the status bar of your 
    VRML browser.  The format is: 

          PVName.CopyNo

    This string is the one generated by the method, 
    G4PhysicalVolumeModel::GetCurrentTag().

(2) Interactive visualization of 3D hit positions

    When the mouse pointer is focused on a hit, i.e., on a visualized  
    G4Circle or G4Square object, its 3D position is displayed 
    in the status bar of your VRML browser.  The format is: 

          (x  y  z) 

    This string is generated inside the VRML 2.0 driver.

(3) The displayed string in (2) is customizable by setting your favorite 
    information string to the G4Circle or G4Square object used to 
    express the hits.  Use the following base class method for it: 

         void G4VMarker::SetInfo( const G4String& info ) ;

(4) By default, no VRML browser is invoked.    Only files "g4.wrl",
    "g4_2.wrl", "g4_3.wrl", ... are generated in the current directory.
    You can copy these files to your favorite machine and visualize the files
    with your VRML browser. 

    You can also make Geant4 invoke VRML browser automatically.
    To do it, set an environmental variable as follows:

         % setenv G4VRMLFILE_VIEWER  browser_name

    If you do not have a proper VRML 2.0 browser in your Unix platform,
    generates VRML2.0 files at the Unix machine, and 
    copy them to a Windows NT/98 machine.
    You can use, e.g. Windows NT/98 version of "CosmoPlayer" (SGI)  
    (a free software).

http://www.sgi.com/global/ch/f/produits/vrml.html 

(5) Readable comment lines are generated in the generated VRML 2.0 files 
    for users' convenience.

(6) Detector geometry can be culled by setting an environmental variable 
    as follows:

    % setenv G4VRML_TRANSPARENCY 1.0 

    This setting is useful in picking hits to display their position etc.
    The default value of transparency is 0.7.  This value is used in the 
    wireframe mode of Geant4 visualization (see (7) below).

(7) If the value of G4VRML_TRANSPARENCY is less than 0.99, 
    detector geometry is visualized as follows:

    (a) In wireframe mode set by Geant4 command, 
        the detector geometry is visualized with the half transparent surfaces.

    (b) In other modes, e.g. surface mode, 
        detector geometry is visualized with opaque surfaces.

===== Compilation (in case of Unix + GNUmakefile) =====

    ### Building libraries 
    % setenv G4VIS_BUILD_VRMLFILE_DRIVER  1  # VRML file driver 
    % setenv G4VIS_BUILD_VRML_DRIVER      1  # VRML network driver 
                                             # (not supported in Windows yet)

    ### Incorporation into your Geant4 executable
    %  setenv G4VIS_USE_VRMLFILE          1  # VRML file driver      
    %  setenv G4VIS_USE_VRML              1  # VRML network driver      
                                             # (not supported in Windows yet)

===== USAGES =====

(1) Set VRML browser name (optional)

    % setenv G4VRML_VIEWER browser_name

(2) Execute Geant4 and invoke commands for visualization:

    For example, 

    % my_geant4
    % /run/initialize
    % /vis~/create_view/new_graphics_system VRML2FILE
    % /run/beamOn 1

    Then a VRML 2.0 file g4.wrl (or g4_n.wrl, n=2,3,...) is generagted.
    If the environmental variable is set in (1) above, the viewer is 
    invoked to visualize the file.

===== SAMPLE OUTPUTS =====

Please try interactive visualization of physical-volume names 
and 3D positions of hits, using the sample output files:

http://geant4.kek.jp/~tanaka/GEANT4/VRML2_FIG/

============================

Enjoy!