I have an .obj containing UVW mapping and my assimp fail to load it

Help
wei2lee86
2014-04-27
2014-04-28
  • wei2lee86
    wei2lee86
    2014-04-27

    ============================================================
    I can't find "w" of uvw mapping in imported data
    ============================================================
    I am using assimp for ios from https://github.com/cfr/assimp-ios

    these file are exported from 3d max:
    .max https://drive.google.com/file/d/0B_Nuhl0WqfMjaC01bklrclcyTzg/edit?usp=sharing
    .obj https://drive.google.com/file/d/0B_Nuhl0WqfMjMUF5cks2YmR2Rlk/edit?usp=sharing
    .mlt https://drive.google.com/file/d/0B_Nuhl0WqfMjMmtSSVZyYV85b3c/edit?usp=sharing

    I import the file with this statement:
    NSString* path = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/unicity04_low_full2.obj"];
    aiScene = aiImportFile([path cStringUsingEncoding:NSASCIIStringEncoding] ,aiProcessPreset_TargetRealtime_MaxQuality);
    with no error report from aiGetErrorString()

    then i check imported data by logging value in
    aiScene->mMeshes[n]->mNumUVComponents[0]
    aiScene->mMeshes[n]->mTextureCoords[0][k].x
    aiScene->mMeshes[n]->mTextureCoords[0][k].y
    aiScene->mMeshes[n]->mTextureCoords[0][k].z
    (where n and k is index of particular mesh and vertex)

    The result is
    mNumUVComponents[0] is 2 for all value of n
    mTextureCoords[0][k].z is 0 for all value of n and k
    However
    mTextureCoords[0][k].x, mTextureCoords[0][k].y is correct according to .obj

    for example, 1st texture coordinate for 1st object in .obj is
    vt -248.0264 1000.0000 50.0000

    the respective logging show that:
    mNumUVComponents[0] is 2
    mTextureCoords[0][0].x is -248.0264
    mTextureCoords[0][0].y is 1000.0000
    mTextureCoords[0][0].z is 0

    ============================================================
    Please help me get the "w" component
    ============================================================

     
  • Kim Kulling
    Kim Kulling
    2014-04-28

    Should be fixed now in the latest version.

    Kimmi