Links

Content Skeleton

This Page

Previous topic

VRML97 (2.0) Specification

Next topic

Basic VRML2 Samples

VRML

Versions

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
/data/env/local/dyb/trunk/external/build/LCG/geant4.9.2.p01/source/visualization/VRML/src

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
/vis/drawVolume
/vis/viewer/flush

VRML Viewers

InstantReality

simon:geant4 blyth$ cd ~/Desktop
simon:Desktop blyth$ curl -L -O http://doc.instantreality.org/media/uploads/downloads/2.3.0/InstantPlayer-MacOS-10.4-universal-2.3.0.25322.dmg
  % 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.