Expand description
COLLADA (.dae), versions 1.4.1 and 1.5: XML read with roxmltree.
Read: the meshes of library_geometries (triangles, polylist,
polygons, tristrips and trifans, polygons fan-triangulated, holes
of ph ignored), their sources through accessors with offset, stride
and named params, positions, normals and vertex colours; the node tree
of the visual scene with matrix, translate, rotate, scale and
lookat composed into world transforms, instance_geometry,
instance_node and instance_controller (the skin’s or morph’s base
mesh in its bind pose, after the skin’s bind shape matrix); the
up_axis and unit of the root asset, turned into falcon’s Y-up
metres the way three.js’s loader (used by Eagle’s viewer) does;
material base colours from the library_effects diffuse (emission for
constant), or, when the diffuse is a texture whose image sits next to
the file (or is embedded as hex), that image’s average colour. The
texture is also kept for drawing: the image through the profile’s
sampler and surface (1.4.1) or instance_image (1.5) (the sampler’s
wrap_s and wrap_t are ignored, textures always repeat), and the TEXCOORD set the
texture’s texcoord is bound to by the instance’s bind_vertex_input
(else the first set), with v flipped to falcon’s picture space.
A bump texture (the shader’s own child, or in an extra technique of
the shader’s technique, the profile or the effect, the latter winning) is
drawn as a normal map, as Eagle’s viewer does: its picture goes through
the same sampler route and takes the mesh’s one set of coordinates.
Transparency follows transparent (its opaque mode, colour) and
transparency: the opacity of the material, and, with a texture in
transparent, blending by the diffuse picture’s alpha alone.
Not read: animation, skinning weights and joints, morph targets,
cameras, lights, skew, lines, texture transforms (extra techniques)
and emission (colour or texture, apart from constant shaders using it
as the base colour): Eagle’s viewer shows none, so emissive stays
black. A missing normal
input leaves normals empty; the viewer then shades flat or generates
smooth normals as for any other format.