Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
deftypes [2019/03/12 14:51] – [G3D File Format] admindeftypes [2020/01/09 14:21] – [Notice] admin
Line 147: Line 147:
 | FastestCompression | If the Zipped-Option is set, this option will choose the fastest algorithm for packing the data stream. | | FastestCompression | If the Zipped-Option is set, this option will choose the fastest algorithm for packing the data stream. |
 | MaxCompression | If the Zipped-Option is set, this option will chose the maximum compression algorithm for packing the data stream. | | MaxCompression | If the Zipped-Option is set, this option will chose the maximum compression algorithm for packing the data stream. |
 +
 +Depending on your model data you can configure those options to optimize filesize.
 +In most cases a zipped JSON format with MaxCompression provides the best results.
 +
 +<code>
 +G3D_TEST : TGorillaG3DOptions = [TGorillaG3DOption.Zipped, TGorillaG3DOption.MaxCompression];
 +</code>
 +
 +===== Notice =====
 +
 +Every G3D file starts with some header information, where is defined which format and options are used.
 +The header format is described below:
 +
 +<file pascal>
 +  TGorillaG3DFormat = (BSONFormat, JSONFormat);
 +  
 +  TGorillaG3DOption  = (
 +    None,
 +    Zipped,
 +    Beautified,
 +    FastestCompression,
 +    MaxCompression);
 +
 +  TGorillaG3DOptions = Set Of TGorillaG3DOption;
 +
 +  TGorillaG3DHeader = record
 +    /// DEFAULT-VALUE = "Gorilla3D "
 +    /// 10 characters identify the exporter tool
 +    Exporter : Array[0..9] of Byte;
 +    Version : Cardinal;
 +    /// Datetime when the file was generated. (8 byte float value)
 +    Timestamp : TDateTime;
 +    /// The data format the was stored (bson or json).
 +    Format  : TGorillaG3DFormat;
 +    /// enum with values above
 +    Options : TGorillaG3DOptions;
 +  end;
 +</file>
 +
 +Next step: [[transparency|Transparency]]