Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support assimp 3.1.1 #119

Closed
esper opened this issue May 16, 2015 · 6 comments
Closed

Support assimp 3.1.1 #119

esper opened this issue May 16, 2015 · 6 comments

Comments

@esper
Copy link
Collaborator

esper commented May 16, 2015

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)

@TheJosh
Copy link
Owner

TheJosh commented May 16, 2015

We're probably using a post processing flag which has been removed, or which isn't valid in some cases.

@TheJosh
Copy link
Owner

TheJosh commented May 17, 2015

Might be this
assimp/assimp@e6c5095

We'll have to check that all of our postprocess flags are valid

@esper
Copy link
Collaborator Author

esper commented May 17, 2015

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;
}

esper added a commit that referenced this issue May 17, 2015
…ces flag.

'aiProcess_OptimizeGraph' and 'aiProcess_PreTransformVertices' cannot be used at the
same time.

This might not be the best solution, but fixes the assimp 3.1.1 assertion
for custom map meshes.

TODO: Zombies are not visible when using assimp 3.1.1.
@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

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.

@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

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.

@TheJosh
Copy link
Owner

TheJosh commented May 18, 2015

I might be this assimp/assimp@d411cbfbf4a5f0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants