Ara3D.Serialization.G3D 1.4.5

dotnet add package Ara3D.Serialization.G3D --version 1.4.5                
NuGet\Install-Package Ara3D.Serialization.G3D -Version 1.4.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ara3D.Serialization.G3D" Version="1.4.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ara3D.Serialization.G3D --version 1.4.5                
#r "nuget: Ara3D.Serialization.G3D, 1.4.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ara3D.Serialization.G3D as a Cake Addin
#addin nuget:?package=Ara3D.Serialization.G3D&version=1.4.5

// Install Ara3D.Serialization.G3D as a Cake Tool
#tool nuget:?package=Ara3D.Serialization.G3D&version=1.4.5                

G3D

<img src="https://img.shields.io/nuget/v/Vim.G3d.svg">

G3D is a simple, efficient, generic binary format for storing and transmitting geometry. The G3D format is designed to be used either as a serialization format or as an in-memory data structure.

G3D can represent triangular meshes, quadrilateral meshes, polygonal meshes, point clouds, and line segments.
It can be easily and efficiently deserialized and rendered in different languages and on different platforms.

The G3D format can contain a superset of geometry attributes found in most common geometry formats, including formats such as FBX, glTF, OBJ, PLY, and in memory data structures used in popular 3D APIs, like Unity, Three.JS, Assimp, and 3dsMax.

BFAST is maintained by VIMaec LLC and is licensed under the terms of the MIT License.

Format

BFAST Container

The underlying binary layout of a G3D file conforms to the BFAST serialization format, which is a simple and efficient binary format for serializing collections of byte arrays. BFAST provides an interface that allows named arrays of binary data to be serialized and deserialized quickly and easily.

The first named buffer in the BFAST container is reserved for meta-information about the file encoded in JSON format. It has the name "meta". Each subsequent buffer uses the attribute descriptor string as a name.

Meta-Information

The first buffer of a G3D file is named "meta" and is represented by the G3D

Attributes

G3D is organized as a collection of attribute buffers. Each attributes describe what part of the incoming geometry they are associated with:

  • point // vertex data
  • corner // face-vertex data
  • face // per polygon data
  • edge // per half-edge data
  • group // face group. Face groups are identified by a face data buffer
  • SubGeometry // a contiguous section of the vertex-buffer, and index-buffer
  • material // data associated with a material, materials are usually associated with groups, a
  • instance // instance data, usually an instance has an index to a SubGeometry
  • all // whole object data - for example face-size of 4 with whole object indicates a quad mesh
  • none // no association

Attributes also have a "semantic" which is used to identify what role the attribute has when parsing. These map roughly to FBX layer elements, or Three.JS buffer attributes. There are a number of predefined semantic values with reserved names, but applications are free to define custom semantic values. The only required semantic in a G3D file is "position". Here is a list of some of the predefined semantics:

  • unknown, // no known attribute type
  • position, // vertex buffer
  • index, // index buffer
  • indexoffset, // an offset into the index buffer (used with Subgeometries)
  • vertexoffset, // the offset into the vertex buffer (used only with Subgeometries)
  • normal, // computed normal information (per face, group, corner, or vertex)
  • binormal, // computed binormal information
  • tangent, // computed tangent information
  • material, // material index
  • visibility, // visibility data (e.g.
  • size, // number of indices per face or group
  • uv, // UV (sometimes more than 1, e.g. Unity supports up to 8)
  • color, // usually vertex color, but could be edge color as well
  • smoothing, // identifies smoothing groups (e.g. ala 3ds Max and OBJ files)
  • weight, // in 3ds Max this is called selection
  • mapchannel, // 3ds Max map channel (assoc of none ⇒ map verts, assoc of corner ⇒ map faces)
  • id, // used to identify what object each face part came from
  • joint, // used to identify what a joint a skin is associated with
  • boxes, // used to identify bounding boxes
  • spheres, // used to identify bounding spheres
  • user, // identifies user specific data (in 3ds Max this could be "per-vertex-data")

Attributes are stored in 512-byte aligned data-buffers arranged as arrays of scalars or fixed width vectors. The individual data values can be integers, or floating point values of various widths from 1 to 8 bytes. The data-types are:

  • int8
  • int16
  • int32
  • int64
  • float32
  • float64

The number of primitives per data element is called the "arity" and can be any integer value greater than zero. For example UV might have an arity of 2, while position data frequently has an arity of 3.

Encoding Strings

While there is no explicit string type, one could encode string data by using a data-type uint8 with an arity of a fixed value (say 255) to store short strings.

Attribute Descriptor String

Every attribute descriptor has a one to one mapping to a string representation similar to a URN:

`g3d:<association>:<semantic>:<data_type>:<data_arity>`

This attribute descriptor string is the name of the buffer.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ara3D.Serialization.G3D:

Package Downloads
Ara3D.Serialization.VIM

A library for reading and writing architectural BIM models in the VIM format.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.5 116 10/9/2024
1.4.4 172 8/25/2024
1.4.3 188 3/19/2024
1.4.1 196 3/12/2024