thanks for this fantastic library, it really saved me a lot of work.
I'm trying to figure out how to handle correctly units and coordinates systems in my pipeline. While playing around with SketchUp, I noticed that the unit conversion specified in the collada file is ignored and coordinates are imported in what I guess are inches. I see the collada loader is parsing the conversion factor but it never really uses it.
I thought about trying to get that value from the loader manually, but I see the loader interface is not exported as part of the standard includes, so I guess my only chance would be to modify the source code?
So what can I do about that? Should I use a different modeling tool or file format?
You're right: the Collada loader does not use the unit size anywhere. I think it once used to scale the whole scene by it, thus always creating a scene in meters, but I haven't found the scaling code anywhere.
What do you think about how to handle such "unit of measurement" data? To my knowledge Collada is the only format that contains it, and I usually don't like adding something to the Assimp scene format just for the purpose of a single source file format. Scaling the whole scene to the unit would yield a reliable meter-sized scene in any case and not require enhancing the in-memory format, so I'd prefer this solution.
I could scale the whole scene, of course, but I'd prefer to have consistent units while modelling and rendering.
I just started using assimp, so I don't know what could be the best way to handle this information. Perhaps adding a AI_SCENE_FLAGS_XXX could let the client know that a unit conversion might be needed.
At the moment I'm just using a hard-coded scale factor, which is not really nice, but I could alway parse myself the first few lines of the collada file to determine what units it's using. So it's not a huge issue.
Thanks for your answer, though.
Sorry for bumping an old topic, but I'm very interested in a solution to this problem as well. The solution you proposed (uniformly scaling/rotating data to a known configuration) would work fine.
I'm looking to use assimp in conjuction with OpenSceneGraph and osgEarth, so knowing the rotation/scale is critical.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.