Scene formats

Ocean XML

Ocean scene files are stored using a human readable, XML based format, with the .ocxml file extension. A compressed .ocxmlz format also exists.

For instance, a camera will be described like this:

<instrument type="idealrectcam" name="outside-view">
     <prm pos="0.278 0.273 -0.800"/>
     <prm up="0.0 1.0 0.0"/>
     <prm forwards="0.0 0.0 1.0"/>
     <prm fnumber="5.6"/>
     <prm shutter="0.8"/>
     <prm focusdistance="2.0"/>
     <prm sensor_ar="1"/>
     <prm sensor_width="0.025"/>
     <prm focallength="0.035"/>
     <prm xresolution="512"/>
     <prm yresolution="512"/>
     <prm pixelfilter="bilinear"/>
</instrument>

We can see here that for instance:

  • The camera position is : X=0.278, Y=0.273 and Z=-0.800
  • The focal length is 35mm (0.035 meters)
  • The aperture is f/1:5.6
  • The focusing distance is 2 meters

This format is documented in the manual pages, and maps in text format the graphical object tree structures.

Ocean Binary

This format is not human readable, but takes significantly less disk space than Ocean XML. It is also faster to read and write. It is mostly used for large data sets, such as mesh geometries. It stores the exact same information than Ocean XML.

Ocean binary files have the .ocbin file extension. A compressed .ocbinz format also exists.

The Ocean binary format is not documented in these pages, but the specification is available on demand.

SketchUp

Ocean 2014 natively reads .skp files from SketchUp 2015 and earlier. It imports the surface geometries, materials with basic color properties, and instruments from the defined scene tabs. As advanced Ocean data cannot be defined in .skp files, saving to this format is not possible. Any changes made should be saved to Ocean XML or Ocean Binary files.

CAD software plugins

Ocean supports exporting data from various modeling software through plug-ins. Currently, Ocean is shipped with plugins for 3ds Max 2015 and Rhinoceros 5. Other plug-ins can be developped on demand.