3D model file loading seems to be the worst part of making an engine, from my experience and what im reading about it. Specifications are rarely met, every vendor does things his own way, there are a million things that can go wrong. Still, it can’t be this hard to get a .dae file working in my engine.
I’ve got a parser set up, and it works with some files, and with some it doesn’t, then some models are extremely distorted (Adobe Mixamo exports for example), while others work perfectly fine. Isn’t there a simple, it-just-works-tier library i can add to my project and be done with it?
I realize that when some people say “Collada loader”, what they really mean is the full infrastructure required for animating, rendering and so on, but i really mean just that, parsing a file, having its information there to be dealt with by the engine.
I’ve also read that the professional way of “asset pipelining” is to never actually load filetypes like Collada, FBX, MD5 and so on, and instead creating a custom file format for the engine, and then converting those filetypes into the proprietary custom format with some external application. Is that a good way to go about it? And what would be the best application for those conversions?
If anyone is interested in at least a sometimes-working collada parser, i can upload the code, it’s not very large. The data structure i use looks like this:
Models:
# Model
- MeshData
- JointsData
# MeshData
- float[] vertices
- float[] textureCoords
- float[] normals
- int[] indices
- int[] jointIds
- float[] vertexWeights
- float furthestPoint
# JointsData
- int jointCount
- JointData headJoint
# JointData
- int index
- String name
- Matrix4f bindLocalTransform
- List<JointData> children
Animations:
# AnimationData
- float lengthSeconds
- KeyFrameData[] keyFrames
# KeyFrameData
- float time
- List<JointTransformData> jointTransformData
# JointTransformData
- String jointNameId
- Matrix4f jointLocalTransform