At the beginning of Raer’s Web3D Practice secrets, Classification, Composition and Workflow of Web3D Scene Outlines the importance of 3D main vision in b-side business scene large-screen visualization, classification and composition of Web3D scene, among which 3D model is an indispensable key resource in 3D scene. This paper will compare the common mainstream 3d model standards and their advantages and disadvantages, glTF standard, PBR material and other aspects are introduced.

Common 3D model standards and their advantages and disadvantages

Used for creating and editing tools, software and application of three dimensional model is very, very much, they often use different 3 d model of standard/format data storage and transmission, wikipedia cited a total of 80 + 3 d model formats, including fang binxing, OBJ, COLLADA, glTF is the most common and mainstream modeling tools support the 3 d model of standard.

FBX

The FBX file format, which originated with Kaydara’s FilmBox (later changed to MotionBuilder) to animate 3D characters, was acquired by 3D software giant Autodesk in 2006. Today, the FBX format is supported by many 3D software and game engines, such as 3DS Max, Maya, MotionBuilder, Mudbox, Blender, Unity, etc., so the FBX model is a great solution for interoperability. The use of the model is no longer limited by the software and the transformation between different 3D software. FBX supports the storage and transmission of information including animations, material features, maps, bone animations, lights, cameras, and more. The FBX model format usually exists in binary or ASCII text format. Although Autodesk officially provides a free FBX SDK for reading and writing and converting FBX files, the FBX data format specification is not publicly available. As a result, the FBX format is still a completely “closed” data format.

OBJ and MTL

OBJ by Alias | Wavefront company for 3 d modeling and animation software Advanced Visualizer to develop a standard, suitable for use in a mutual conversion between 3 d model, now almost all known 3 d software supports OBJ file to read and write. The OBJ format is very general because it describes the geometric data features of the 3D model, such as points, lines, textured vertices, surfaces, curves, surfaces, etc. The Material color, texture information and so on in OBJ format need to be described by the associated MTL(Material Template Library) standard, which uses Phong reflection model to describe the light reflection characteristics of the object surface. Although the MTL material standard has also been supported by many 3D software vendors, the MTL format seems a bit outdated as it does not support the latest material models such as specular highlight. In addition, the OBJ standard does not support the description of scene elements such as lighting and animation.

COLLADA

COLLADA is a set of XML-based open source protocol specifications with file extensions typically in the.dae format. COLLADA originated at Sony and is now maintained by the Khronos Group, a non-profit organization. COLLADA supports descriptions of geometry, shaders, effects, physical systems, animations, resources, and more, so COLLADA can be used to describe complex scenes. Many 3D modeling software and game engines support the.dae file format, as well as readable XML that allows users to directly edit model files as text files according to specifications.

glTF

GITF, or GL Transmission Format, is a specification for the efficient Transmission and loading of 3D scenes, jointly developed and maintained by the Khronos Group, an industry organization. It aims to unify the specification of 3d model asset data description in all GL-related applications including WebGL, OpenGL ES, OpenGL, etc. Khronos organized the sponsoring companies including AMD, Apple, ARM, EPIC, Goggle, Intel, IVIDIA, Samsung, Sony and many other industry giants, many of these companies’ products, software and tools also support glTF standard import and export. The glTF 2.0 standard was updated in June 2017 to support a complete description of the elements required for A 3D scene, such as nodes, materials, cameras, grids, animation, lighting, and other structures.

At present, glTF has become the Web3D asset standard, which can be described as the JPEG of 3D field. Major Web3D engines such as THREEJS, Babylon, PlayCanvas, and Cocos3D all support glTF model standard. At the same time, thanks to many advantages of glTF standard, such as small file, fast loading, independent of runtime engine environment, complete and comprehensive description of 3D scene, flexible and extensible, and writable collaboration, Rell finally chose to use glTF model standard workflow in Web3D practice.

GlTF standard introduction

GlTF model file composition

A glTF model asset usually contains JSON files, binaries, and image files:

  • GLTF model file, a text file in JSON format, is used to describe the node hierarchy, grid description information, materials, cameras and so on in the scene. It can be edited freely using a text editor, usually referencing external files, such as texture map, binary grid data, etc.
  • .bin binaries that describe 3D geometry data, animations, and other buffer-based data..bin files can be loaded directly into the GPU buffer without additional parsing, so they can be transferred efficiently and loaded quickly.
  • Map file, an image file used as a map or normal map, usually in.jpg,.png format.

GlTF model asset file composition

GlTF model components

As mentioned above, glTF standard describes all contents of a 3D model scene, including a complete description of scene structure and scene composition elements. As shown in the figure below, it is an overview of the top-level element composition and relationship of glTF model standard.

An overview of glTF standard components and relationships

GlTF Extensions extension

In addition to the glTF support described above, the glTF standard allows for the addition of extensions to include information not considered in the core format. This article lists existing glTF extensions that extend the grids, lights, materials, texture maps, etc., defined in the core standard. The extensions beginning with the KHR prefix are officially approved and approved by Khronos, and the extensions beginning with EXT prefix are proposed and initiated by vendors. Here are the official extensions that have been approved so far:

  • KHR_draco_mesh_compression

  • KHR_lights_punctual

  • KHR_materials_clearcoat

  • KHR_materials_ior

  • KHR_materials_pbrSpecularGlossiness

  • KHR_materials_sheen

  • KHR_materials_specular

  • KHR_materials_transmission

  • KHR_materials_unlit

  • KHR_materials_variants

  • KHR_materials_volume

  • KHR_mesh_quantization

  • KHR_texture_basisu

  • KHR_texture_transform

  • KHR_xmp

GlTF and PBR material

Physically Based Rendering (PBR) is a technique that attempts to render photorealistic images using simulated lighting. PBR uses real-world physics to simulate light interacting with different material surfaces, so materials can be written according to physical parameters rather than adjusting light effects. The material will always look right regardless of the lighting. PBR has been around for years, but was not suitable for real-time applications because of the initial computing costs. However, as computing power continues to improve, it is increasingly becoming the industry standard for real-time rendering. In fact, many of the real-time software we see today, such as Unreal Engine 4, Unity 5, Frostbite, etc., use PBR rendering to give users the ability to create highly realistic 3D scenes.

With the increasing demand for PBR materials for real-time rendering, the lack of consistency in the parameters of these materials described by different software is becoming more and more obvious. For example, the physics-based material parameters used in Unreal Engine 4 are Base color, Roughness, metallic, specular, Marmoset uses Albedo, Microsurface, and Reflectivity to describe the physical material. This makes it difficult for modelers and developers to perform consistent transformations and imports and exports between these different modeling programs.

With this in mind, the goal of glTF is to describe PBR materials in a unified and easy to implement manner, which is called Metallic and Roughness model. GlTF 2.0 PBR material allows users to use the parameters baseColor, Metalness, Roughness, Emission, Normal Map, Ambient Occlusion to adjust the material effect.

PBR materials and parameters based on metallicity – roughness model

Rael Web3D Modeling/R model asset workflow

As mentioned above, the Rael Web3D team chose to use the glTF 2.0 standard as the model asset format for both the modeling side and the R&D side. The complete workflow of model assets is shown in the figure below. Firstly, Blender is used as the modeling tool on the modeling side, and the model is exported as a glTF format file after being made, and the preview tools such as glTF Viewer are used to verify whether the scene content is accurately exported. The R&D side uses the engine based on THREEJS to load the model, and then analyzes the node, transformation, lighting, material, animation and other information in the 3D scene to render the scene.

Rael Web3D Model asset workflow

You will be interested in how to use modeling tools to create materials and shapes, dynamic modeling techniques such as data atmosphere, and the problems and solutions of developing 3D scenes. We will share all of these in the next series of Web3D secrets.

Review past

Rael Web3D Practice Tips here

Web3D Scene Classification, Composition and Workflow