Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/drbiz/public/2013.realism.com/includes/common.inc).

glTF/X3D Comparison

Tags: 

WIth 3D/VR becomming practical in the web browser there are a lot of questions concerning the right format to use for various situations. This post looks at two model formats - X3D and glTF. Both formats support full geometric surface modeling, but there are differences between these formats for some specific areas.

X3D has a number of profiles. Most of the profiles include extensive run-time requirements. As this comparison is just for model formats, only the V3.3 Interchange ProfileA of X3D is considered. V2.0 of the glTF binary specificationB with no extensions was used. This comparison is not representing the full capabilities of X3D nor glTF, neither is it a comparison of various viewers for those formats.

In the Visual Effects (VFX) community, standard practice is to produce a model (surface) with animation (if required). Mostly texturing of the surface is applied later during scene integration; however, a textured animated model is frequently desired. The modeling process does not include lights, environmental effects (fog, background, etc.) or other objects. This comparison is just about the capabilities provided by these specifications for an animated, textured model.

The following table lists a number of features that are needed or desirable for the display of 3D models in either a flat-screen or VR/xR approach. This table is derrived from the sources listed below. Many of the comparison marks and examples have footnotes described beneath the table. These provide important qualifications or conditions on the listed item.

Sources

  1. X3D V3.3 Specification (ISO/IEC 19775-1)
  2. glTF V2.0 Specification
  3. A-Frame V0.6.0 documentation
  4. Babylon.js documentation
  5. THREE.js documentation
  6. glTF Converters and Exporters

 

Comparison between X3D and glTF Model Formats
Feature X3D1 Example2.3 glTF4 Example5
Triangulated surface model Format has this feature   Format has this feature Collada Duck
Quad surface model Format does not have this feature6 example Format does not have this feature7  
Custom unit definitions Format has this feature   Format does not have this feature  
Basic geometric solids Format has this feature example Format does not have this feature  
Uniform surface color Format has this feature example Format has this feature Basic cube mesh
Vertex coloring Format has this feature   Format has this feature  
Surface texture Format has this feature example Format has this feature Cube mesh with single texture
Texture UV mapping Format has this feature example Format has this feature Collada Duck
Advanced apperance
(bump, occulusion, etc. maps)
Format does not have this feature   Format has this feature Water bottle - also includes PBR8
Morph targets9 Format has a poor substitute for this feature10 example Format has this feature Animated morph sphere
Mesh skin11 Format does not have this feature   Format has this feature Simple mesh skin
Custom Shaders Format does not have this feature   Format does not have this feature  
Physically based rendering (PBR) Format does not have this feature   Format has this feature PBR avocado
GPU pre-formatted12 Format does not have this feature13   Format has this feature  
Export by Maya Format does not have this feature14   Need to carfullt examine format for feature conditions15  
Export by Blender Format has this feature16   Format has this feature  
Single file Need to carfullt examine format for feature conditions17   Need to carfullt examine format for feature conditions16  
RIgid body animation Format has this feature example Format has this feature  
Surface morphing Format has a poor substitute for this feature19 example Format has this feature Animated morph sphere
Joint animation Format does not have this feature20   Format has this feature Walking lady
Loads in THREE.js Format has a poor substitute for this feature21   Format has this feature  
Loads in Babylon.js Format does not have this feature   Format has this feature  
Loads in A-Frame Format does not have this feature   Format has this feature  
Sketchup Import Format does not have this feature   Format has this feature documentation
Unity Exporter Format does not have this feature   Format has this feature code
Sketchup Exporter Format does not have this feature   Format has this feature documentation

 

Notes

  1. Uses X3D V3.3A Interchange Profile except where noted
  2. X3D examples may use capabilities beyond that available in Interchange profile. Unless otherwise noted, the illustrated capability is available in the Interchange profile.
  3. Thumnails of X3D examples are generally not available. The link is a descriptve page and includes source, and an online 3D display.
  4. Uses glTF Binary V2.0B except where noted
  5. glTF Examples link to a Github page with a link to the model. Models can be viewed online using the glTF Viewer
  6. Quad surfaces are available in the CAD Component. This componet is only included in the Full Profile, though it may be made available by browsers.
  7. glTF allows any GPU primitives. At this time all GPUs allow triangles, but not necessarily quads or higher vertex polygons.
  8. This particular model also includes PBR.
  9. A "Morph Target" is a morphable mesh (geometric surface) that is a linear combination of other meshes. This is commonly used for facial animation.
  10. X3D has the basic capability to do morphing of surfaces (meshes); however, all of the setting up needs to be done manually. There is no requirement for use of a GPU for this calculation.
  11. Mesh skin is a mapping from each vertex of a mesh to the joints (aka bones) that contribute to the deformation of that mesh vertex by a linear combination of those joint movements. Each mesh vertex requires a weight and a joint reference. Common practice limits the joints to a maximum of four.
  12. This feature is the ability of the format to directly provide (without additional processing or interpertation) data to the GPU.
  13. X3DOM has an implementation of SRC and glTF importer which does pass data directly to the GPU; however, these features are not part of the X3D specification
  14. Autodesk removed VRML exporting from Maya in the 2016 edition. There is no replacement.
  15. A glTF exporter for Maya is currently being developed.
  16. The X3D blender exporter produces valid X3D that captures the static scene information. It does not support animations.
  17. X3D can hold all of the image texture data in a single file with the mesh, though it is common practice to not do so.
  18. glTF can hold all of the image texture data in a single file with the mesh. Common practice has not yet been established.
  19. As with note (9), the capability to do so; however, the all of the setup must be programmed into the interpolator weights. There is no requirement for use of a GPU for this calculation.
  20. The H-Anim componet provides this capability. It is only included in the Full Profile, though it may be made available by browsers. There is no requirement for use of a GPU for this calculation.
  21. THREE.js has a very limited X3D loader. Among other missing features, the THREE loader does not include X3D animations.

 

 

Icons from Icons Land licensed as "Free for commercial use".