Menu

obj loading on Assimp3.0

Help
2012-10-23
2013-06-03
  • Duarte Peixinho

    Duarte Peixinho - 2012-10-23

    Hi there,

    I've ported my code base to work with assimp 3.0 and everything was working flawlessly, but then I picked an old example with a obj file. Now assimp gives me 143 meshes on that obj, on the previous version there were only 16, so it is very strange. If I open that obj in  lender, it shows 16 meshes too. Am I doing something wrong?

    Thanks in advance
    Duarte Peixinho

     
  • Duarte Peixinho

    Duarte Peixinho - 2012-10-26

    Anyone? I would like to stay with 3.0, otherwise I will have to port it back to 2.0 :(

     
  • Thomas Ziegenhagen

    I was hoping for the author of the OBJ loader answering these questions. But well… I can't say what you're doing wrong because you didn't say anything about what you're doing. It might be that there has been a bug reintroduced, but to my knowledge the loader is quite stable now. Maybe you're using one of the predefined post processing setups and its contents have changed in version 3.0? For example, aiProcess_PreTransformVertices and aiProcess_OptimizeMeshes do perform such an optimisation. Does the obj file in question actually contain that many meshes?

     
  • Kim Kulling

    Kim Kulling - 2012-10-27

    Sorry, I just returned from vacation yesterday evening. This seems to be caused by a change that we are creating the node a little bit differently. Do you have an example for me that I can start my investigations?

    Kimmi

     
  • Duarte Peixinho

    Duarte Peixinho - 2012-10-27

    Thanks for your replies.

    @ulfjorensen you're right, I didn't give enough information, I was hopping that this could be an already known problem. I will try to give more information.
    I've only changed the headers and .lib to use the 3.0 version, so all the code that uses assimp is the same that I used with 2.0x.
    I did try many post processing options, but in the first time I used the same options that I had: aiProcessPreset_TargetRealtime_Fast | aiProcess_OptimizeMeshes | aiProcess_JoinIdenticalVertices | aiProcess_LimitBoneWeights | aiProcess_FlipUVs. -> this gave me 143 meshes
    Then I tried aiProcessPreset_TargetRealtime_MaxQuality and the meshes number  -> this gave me 156 meshes
    In version 2.0 assimp would give only 16 meshes in the same model. To be sure that the model was the same, I opened in blender, and the meshes count was 16. I did try to use as many post processing options as possible, but never achieved less than 143 meshes.
    I have another example with a MD5 model, with animation that is working exactly the same way that it was in the previous version.

    @kimmi yeap, I can post one example online, but even a cube from blender, exported to obj give me many different meshes. Again, I might be doing something wrong, because I haven't change a line in the code besides the headers.

     
  • Duarte Peixinho

    Duarte Peixinho - 2012-10-30

    I have an update, I exported the same object from blender do obj setting the "keep the vertex order" and the meshes count are now 16. In the previous version I never use this option.

    Thanks in advance,
    Duarte Peixinho

     
  • Duarte Peixinho

    Duarte Peixinho - 2012-10-30

    After all the option is "Objects as OBJ Groups". It was an exporter issue, but as I said, the older version didn't have this issue.

     
  • Kim Kulling

    Kim Kulling - 2012-10-31

    As I mentioned before this different behaviour was a request we introduced into Assimp for a couple of users. They wanted to find their defined groups in the scene hierarchy.

    Kimmi

     
  • Duarte Peixinho

    Duarte Peixinho - 2012-11-02

    Alright Kimmi, thanks for your help :)

     
  • Kim Kulling

    Kim Kulling - 2012-12-08

    Hi,

    try the last version to see if any leaks are still open.

    Kimmi

     

Log in to post a comment.