Raytracing with GraXML

It is possible to produce photo-realistic pictures from the GraXML using following procedure:
  1. Write VRML files with GraXMLConverter.sh:
    
    Config.setQuality(9); // or higher
    c.convert("MyFile.xml", "MyFile.wrl");
    
  2. Convert written VRML file into POVRay file using VRML2POV converter: vrml2pov MyFile.wrl MyFile.pov
  3. Customise created POVRay file so that it ends with something like this (remove unions on the end too):
    
    camera {
           location <-0.5,-0.7,-1.3>
           look_at <0,0,0>
           direction <0,0,1>
           sky <0,1,0>
           up <0,1,0>
           right <1,0,0>
           angle 45
           }
    
    light_source { <10,10,-10> rgb 4*<1,1,1> }
    light_source { <10,-10,10> rgb 2*<1,1,1> }
    light_source { <-10,10,10> rgb 1*<1,1,1> }
    light_source { <10,10,10> rgb 0.2*<1,1,1> }
    light_source { <-10,-10,-10> rgb 0.2*<1,1,1> }
    light_source { <10,-10,-10> rgb 0.2*<1,1,1> }
    light_source { <-10,10,-10> rgb 0.2*<1,1,1> }
    light_source { <-10,-10,10> rgb 0.2*<1,1,1> }
    
  4. Use POVRay to create a photo-realistic picture: povray MyFile.pv. You can customise your povray.ini file so that it looks like this:
    
    Width = 900
    Height = 900
    Bounding_Threshold = 2
    Display=On
    Verbose=On
    Library_Path=/usr/local/share/povray-3.5
    Library_Path=/usr/local/share/povray-3.5/include
    Output_to_File=true
    Output_File_Type=N8
    Quality=9
    Antialias=1
    
The result will look like this:
J.Hrivnac, Apr'04