UV texture mapping issue in .X file using assimp

26 views Asked by At

Describe the bug UV texture mapping issue in .X file, sometimes it loads perfectly but in some rare cases it happens.

To Reproduce Steps to reproduce the behavior:

Try loading Land_Objects_WareHouse.zip .x FIle.

Expected behavior It should load perfectly in all cases.

Screenshots If applicable, add screenshots to help explain your problem. warehouse texture issue

Platform (please complete the following information):

OS: WIndows Version 5.0.1 enter image description here

It should load perfectly in all cases , what is the possible solution to apply

Assimp::Importer imp;
fiuint loadHierarchy = 0;
if (false == _bLoadHierarchy)
{
loadHierarchy |= (aiProcess_PreTransformVertices | aiProcess_OptimizeGraph);
}
//else
// loadHierarchy |= aiProcess_GenSmoothNormals; //for quality /not performance
imp.SetPropertyInteger("AI_CONFIG_PP_RVC_FLAGS", aiComponent_CAMERAS | aiComponent_COLORS | aiComponent_LIGHTS);
//imp.SetPropertyBool(AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS, false);

    const aiScene* pScene = imp.ReadFile(newfile.c_str(),
        aiProcess_ConvertToLeftHanded
        | aiProcess_RemoveComponent
        | aiProcess_LimitBoneWeights
        | aiProcess_Triangulate
        | aiProcess_JoinIdenticalVertices
        | aiProcess_ValidateDataStructure
        | aiProcess_ImproveCacheLocality
        | aiProcess_RemoveRedundantMaterials
        | aiProcess_FindInvalidData
        | aiProcess_GenUVCoords
        //| aiProcess_GenNormals
        
        //| aiProcess_TransformUVCoords
        | aiProcess_FindInstances
        | aiProcess_OptimizeMeshes
        | aiProcess_SortByPType
        | aiProcess_CalcTangentSpace
        | aiProcess_SplitLargeMeshes
        | loadHierarchy
        /*  aiProcessPreset_TargetRealtime_Quality*/
        );
1

There are 1 answers

0
KimKulling On

It would be great if you could try to update the Asset-Importer-Lib to the latest version (version 5.3.1).

The version you are using is outdated and will not get any updates from our side. You can build it from scratch or check the prebuild binaries provided by several package managers.