Closed esper closed 9 years ago
We're probably using a post processing flag which has been removed, or which isn't valid in some cases.
Might be this https://github.com/assimp/assimp/commit/e6c5095e5b3a93c4cda2d42ac5ed5cc6ddb11d52
We'll have to check that all of our postprocess flags are valid
The assertion is due to that we use both 'aiProcess_OptimizeGraph' and 'aiProcess_PreTransformVertices'. Also the zombies are not visible any more with assimp 3.1.1...
From Importer.cpp
// Validate post process step flags
bool _ValidateFlags(unsigned int pFlags)
{
if (pFlags & aiProcess_GenSmoothNormals && pFlags & aiProcess_GenNormals) {
DefaultLogger::get()->error("#aiProcess_GenSmoothNormals and #aiProcess_GenNormals are incompatible");
return false;
}
if (pFlags & aiProcess_OptimizeGraph && pFlags & aiProcess_PreTransformVertices) {
DefaultLogger::get()->error("#aiProcess_OptimizeGraph and #aiProcess_PreTransformVertices are incompatible");
return false;
}
return true;
}
Note that the issue with zombies not rendering appears to be only related to the Zombie model. Other models are rendering fine - even other models with animations.
When I run assimp info
on the zombie.dae model using version 3.0 I get lots of info including:
Minimum point (-1.761364 -0.027560 -3.411929)
Maximum point (1.181818 18.128241 3.269613)
Center point (-0.289773 9.050341 -0.071158)
assimp 3.1.1 gives this instead:
Minimum point (-0.001761 -0.000028 -0.003412)
Maximum point (0.001182 0.018128 0.003270)
Center point (-0.000290 0.009050 -0.000071)
It appears to think that the model is much smaller than it actually is. This might be a regression.
I might be this https://github.com/assimp/assimp/commit/d411cbfbf4a5f0
Not possible to run with assimp 3.1.1 instead of 3.0. Reported by issue #118
Source used (Pacman for Arch): http://sourceforge.net/projects/assimp/files/assimp-3.1/
Changes in 3.1.1: https://github.com/assimp/assimp/blob/master/CHANGES
Arch and Ubuntu 15.04:
chaoticrage:/assimp/assimp-3.1.1/code/Importer.cpp:738: const aiScene* Assimp::Importer::ApplyPostProcessing(unsigned int): Assertion `_ValidateFlags(pFlags)' failed.
Aborted (core dumped)