Official Open Asset Import Library Repository. Loads 40+ 3D file formats into one unified and clean data structure.
dependabot[bot] on github_actions
Bump actions/upload-artifact fr… (compare)
kimkulling on github_actions
Bump actions/cache from 2 to 3 … Merge branch 'master' into depe… Merge pull request #4612 from a… and 1 more (compare)
kimkulling on master
Bump actions/cache from 2 to 3 … Merge branch 'master' into depe… Merge pull request #4612 from a… (compare)
kimkulling on github_actions
dependabot[bot] on github_actions
Bump actions/checkout from 2 to… (compare)
@kimkulling Thanks for your reply, in my case, I only use the embed textures(most time only diffuse texture), I get the texture through Scene::mTexture, my problem was i don't know how to get the index from materials, then get the texture from scene::Textures.
After i made some test, i guess i need to use:
aiString texture_file;
mScenePtr->mMaterials[materialIndex]->Get(AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE, 0), texture_file);
then the "texture_file.data" starting "*" will be the texture index inside scene::Texture.
map_Kd -s 4.000000 4.000000 1.000000 baseColor.png
aiUVTransform uvTransform;
unsigned int max = sizeof(aiUVTransform) / sizeof(ai_real);
if (AI_SUCCESS != aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE, 0),
(float*)&uvTransform, &max))
{
std::cout << "Failed to retrieve UV information from material in texture \"" << path
<< "\". Result:" << aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE, 0),
(float*)&uvTransform, &max) << '\n';
}
std::cout << "S=" << uvTransform.mScaling.x << ", " << uvTransform.mScaling.y
<< " T=" << uvTransform.mTranslation.x << ", " << uvTransform.mTranslation.y
<< " R=" << uvTransform.mRotation << '\n';
S=30, 30 T=0, 29 R=0
. The scaling is correct, except it isn't supposed to have any translation, idk where the "29" comes from:"extensions": {
"KHR_texture_transform": {
"offset": [
0,
0
],
"scale": [
30,
30
],
"texCoord": 0
}
}
aiMesh
has mAnimMeshes
which I believe is just an array of the translated mesh, but docs say its not in use?
contrib/zlib/CMakeFiles/zlibstatic.dir/compiler_depend.make:4: *** multiple target patterns. Stop.
when I try to compile ASSIMP. However, if I manually go into the zlib directory and run cmake then make it works fine and compiles without multiple target patterns. Anyone here know how to fix this multiple target patterns issue?