Graphics Reference
In-Depth Information
Content Pipeline
Modeling Tool
Max, Maya, etc.
COLLADA2GLTF
Modeling Tool
Max, Maya, etc.
COLLADA2GLTF
Modeling Tool
Max, Maya, etc.
Runtime Engine
Other format, e.g., FBX, to
glTF perhaps based on
COLLADA2GLTF source
Figure 2.7. glTF content pipeline examples.
avoids vertex data duplication. This step reorganizes the data and dupli-
cates vertices when necessary so that only one index per vertex is used.
Split: Without extensions, WebGL and OpenGL ES 2.0 have indices range
limitations, so meshes need to be split when they exceed the UNSIGNED_SHORT
type.
Skinning optimizations: In a modeler, skinned meshes may have any num-
ber of influences per bone. In GL, the limitation is given by the vertex
shader, where the number of influences has to be fixed to fit inside a vertex
attribute. Typically, this step creates four influences per bone, providing
good performance and matching what is usually found in interactive appli-
cations. In order to host all the referred “bone matrices,” the mesh may
also be split to comply with the maximum number of vector uniforms that
a destination GL API supports.
Shaders: Taking into account all parameters impacting rendering (e.g.,
lights, lighting model, skinning, etc.), this step generates shaders that match
the material description, which is typically the “common profile” for COL-
LADA. Along with shaders, this step also generates GL states. Shaders are
provided with no further formatting, they are saved as the ASCII .glsl file
that can be passed directly to the GLSL compiler.
JSON formatting: The data structure created by the converter is finally
serialized into a JSON file. The JSON file is relatively small as the bulk of
the content will be stored in the binary file.
Image conversion: As of now, the converter only performs alpha channel
checks to know whether blending should be enabled.
Search WWH ::




Custom Search