Content Skeleton

This Page

Previous topic

VRML97 (2.0) Specification

Next topic

Basic VRML2 Samples



In 1997, a new version of the format was finalized, as VRML97 (also known as VRML2 or VRML 2.0), and became an ISO standard.

Export From Geant4

VRML is not too distant from Geant4 geometry representation as collection of C++ instances of solid representing classes. Thus Geant4 to VRML conversion should not be too difficult. At least the code looks straightforward:

[blyth@cms01 src]$ vi G4VRML2SceneHandlerFunc.icc
[blyth@cms01 src]$ pwd

Opening a driver eg OGL,DAWNFILE,HepRepFile,VRML2FILE. Extrapolating from DAWNFILE tutorial the macro commands to export detector geometry (not hits etc) are probably:

# Use this open statement to create a .wrl file suitable for viewing in a VRML viewer
/vis/open VRML2FILE

VRML Viewers


simon:geant4 blyth$ cd ~/Desktop
simon:Desktop blyth$ curl -L -O
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  148M  100  148M    0     0   167k      0  0:15:06  0:15:06 --:--:--  183k

Viewing the .wrl geometry is painfully slow, and brings molasses to entire machine UI. But something is visible.