Graphics Reference
In-Depth Information
The channel's target object contains the ID of a node in the glTF node hi-
erarchy. The property to be animated is represented via a path ,astringthat
contains a value such as translation , rotation ,or scale . It is up to the runtime
engine to map these standardized names to its own properties. For example, the
Three.js viewer maps translation to position , the internal name for translation
of a 3D object in the Three.js scene graph.
The sampler's input and output data are supplied by referencing parameters .
Parameters are named objects defined in the animation's parameters property.
The scope for parameter names is local to the containing animation. Each pa-
rameter references a named bufferView from the bufferView s section of the glTF
file, specifying an offset, data type, and size.
Listing 2.1 shows the JSON for animating the translation of node node-cam01
-box using key frames. The animation defines one channel that connects the sam-
pler animation_0_translation_sampler to the translation property of the node.
The sampler uses the parameter TIME as its input to linearly interpolate one of the
properties. Note that the TIME parameter can be shared among other samplers,
such as for animation rotation and scale; this is a typical usage scenario that
keeps all properties synchronized and represents the data compactly.
Channels are also used to drive skinned animations. With skinning, channels
define animations of nodes representing joints in a skeleton. Skins, joints, and
vertex weights are defined to be friendly for hardware-accelerated skinning. For
example, glTF defines a WEIGHT semantic type for use with hardware techniques:
”weight” : {
”semantic” : ”WEIGHT” ,
”type” : ”FLOAT VEC4”
}
2.9 Content Pipeline
The content pipeline, as shown in Figure 2.6, is the process by which the content
is optimized and formatted for a specific runtime. Typically, processing involves
creating objects that are directly consumable by the runtime engine, such as
creating triangles out of surfaces and other primitives, and then splitting and
formatting in bundles that are ecient for loading and parsing.
Content
Pipeline
Runtime
Format
Runtime
Engine
Modeling Tool
Max, Maya, etc.
Figure 2.6. A typical content pipeline.
Search WWH ::




Custom Search