I have coded a basic collada viewer for OpenGL and I am having transformation issues with documents that have multiple visual_scene nodes.
Right now it simply supports vertex triangles, normals, single scene, and baked matrix transformations- no cameras, no animations, no materials, as of yet.
With regards to the above, I am confident I am reading the document adequately: vertex and normal data is correct, matrix data is being stored in column-major format, asset up_axis is being handled, and indirection is properly implemented such that the correct matrix is being applied to the correct geometry at drawing time. I am able to render single visual_scene node documents.
What I am having issues with is multiple node transformations, there are no nested nodes, but the document I am having issue with does have 5 nodes all whose parent is visual scene.
When I render, the meshes are all in tact, but with the exception of the first node rendered, scale, rotation, and translation are not correct.
As I said, the first node rendered does seem to be correct in all accounts, so I am left with the assumption that I am not rendering the nodes in the correct order, or that the matrix transformations are not being concatenated properly.
Right now, I am simply passing in each node’s baked matrix to glMultMatrixf() prior to drawing the associated geometry for each of the nodes as they appear in the document.
Also, I am reasonably confident that the document is valid since two other viewers can draw it properly, but I attached it in case somebody wants to see it.
Any suggestions as to what I could be doing wrong are appreciated.
What would be most helpful is pseudo code for opengl transformation prior to drawing for collada docs that have multiple visual_scene nodes, but do not have any nested node hierarchies.
Thanks in advance,
-c