Update to latest rendermesh-refactor branch commit

pull/5628/head
Steve M 2024-07-10 09:38:54 -07:00
parent 74eceb1990
commit 69d251fbca
2 changed files with 28 additions and 25 deletions

View File

@ -401,53 +401,53 @@ void USDImporterImplTinyusdz::materials(
ss.str("");
if (material.surfaceShader.diffuseColor.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.diffuseColor.textureId, aiTextureType_DIFFUSE);
ss << " material[" << pScene->mNumMaterials << "]: diff tex id " << material.surfaceShader.diffuseColor.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.diffuseColor.texture_id, aiTextureType_DIFFUSE);
ss << " material[" << pScene->mNumMaterials << "]: diff tex id " << material.surfaceShader.diffuseColor.texture_id << "\n";
}
if (material.surfaceShader.specularColor.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.specularColor.textureId, aiTextureType_SPECULAR);
ss << " material[" << pScene->mNumMaterials << "]: spec tex id " << material.surfaceShader.specularColor.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.specularColor.texture_id, aiTextureType_SPECULAR);
ss << " material[" << pScene->mNumMaterials << "]: spec tex id " << material.surfaceShader.specularColor.texture_id << "\n";
}
if (material.surfaceShader.normal.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.normal.textureId, aiTextureType_NORMALS);
ss << " material[" << pScene->mNumMaterials << "]: normal tex id " << material.surfaceShader.normal.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.normal.texture_id, aiTextureType_NORMALS);
ss << " material[" << pScene->mNumMaterials << "]: normal tex id " << material.surfaceShader.normal.texture_id << "\n";
}
if (material.surfaceShader.emissiveColor.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.emissiveColor.textureId, aiTextureType_EMISSIVE);
ss << " material[" << pScene->mNumMaterials << "]: emissive tex id " << material.surfaceShader.emissiveColor.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.emissiveColor.texture_id, aiTextureType_EMISSIVE);
ss << " material[" << pScene->mNumMaterials << "]: emissive tex id " << material.surfaceShader.emissiveColor.texture_id << "\n";
}
if (material.surfaceShader.occlusion.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.occlusion.textureId, aiTextureType_LIGHTMAP);
ss << " material[" << pScene->mNumMaterials << "]: lightmap (occlusion) tex id " << material.surfaceShader.occlusion.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.occlusion.texture_id, aiTextureType_LIGHTMAP);
ss << " material[" << pScene->mNumMaterials << "]: lightmap (occlusion) tex id " << material.surfaceShader.occlusion.texture_id << "\n";
}
if (material.surfaceShader.metallic.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.metallic.textureId, aiTextureType_METALNESS);
ss << " material[" << pScene->mNumMaterials << "]: metallic tex id " << material.surfaceShader.metallic.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.metallic.texture_id, aiTextureType_METALNESS);
ss << " material[" << pScene->mNumMaterials << "]: metallic tex id " << material.surfaceShader.metallic.texture_id << "\n";
}
if (material.surfaceShader.roughness.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.roughness.textureId, aiTextureType_DIFFUSE_ROUGHNESS);
ss << " material[" << pScene->mNumMaterials << "]: roughness tex id " << material.surfaceShader.roughness.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.roughness.texture_id, aiTextureType_DIFFUSE_ROUGHNESS);
ss << " material[" << pScene->mNumMaterials << "]: roughness tex id " << material.surfaceShader.roughness.texture_id << "\n";
}
if (material.surfaceShader.clearcoat.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.clearcoat.textureId, aiTextureType_CLEARCOAT);
ss << " material[" << pScene->mNumMaterials << "]: clearcoat tex id " << material.surfaceShader.clearcoat.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.clearcoat.texture_id, aiTextureType_CLEARCOAT);
ss << " material[" << pScene->mNumMaterials << "]: clearcoat tex id " << material.surfaceShader.clearcoat.texture_id << "\n";
}
if (material.surfaceShader.opacity.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.opacity.textureId, aiTextureType_OPACITY);
ss << " material[" << pScene->mNumMaterials << "]: opacity tex id " << material.surfaceShader.opacity.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.opacity.texture_id, aiTextureType_OPACITY);
ss << " material[" << pScene->mNumMaterials << "]: opacity tex id " << material.surfaceShader.opacity.texture_id << "\n";
}
if (material.surfaceShader.displacement.is_texture()) {
assignTexture(render_scene, material, mat, material.surfaceShader.displacement.textureId, aiTextureType_DISPLACEMENT);
ss << " material[" << pScene->mNumMaterials << "]: displacement tex id " << material.surfaceShader.displacement.textureId << "\n";
assignTexture(render_scene, material, mat, material.surfaceShader.displacement.texture_id, aiTextureType_DISPLACEMENT);
ss << " material[" << pScene->mNumMaterials << "]: displacement tex id " << material.surfaceShader.displacement.texture_id << "\n";
}
if (material.surfaceShader.clearcoatRoughness.is_texture()) {
ss << " material[" << pScene->mNumMaterials << "]: clearcoatRoughness tex id " << material.surfaceShader.clearcoatRoughness.textureId << "\n";
ss << " material[" << pScene->mNumMaterials << "]: clearcoatRoughness tex id " << material.surfaceShader.clearcoatRoughness.texture_id << "\n";
}
if (material.surfaceShader.opacityThreshold.is_texture()) {
ss << " material[" << pScene->mNumMaterials << "]: opacityThreshold tex id " << material.surfaceShader.opacityThreshold.textureId << "\n";
ss << " material[" << pScene->mNumMaterials << "]: opacityThreshold tex id " << material.surfaceShader.opacityThreshold.texture_id << "\n";
}
if (material.surfaceShader.ior.is_texture()) {
ss << " material[" << pScene->mNumMaterials << "]: ior tex id " << material.surfaceShader.ior.textureId << "\n";
ss << " material[" << pScene->mNumMaterials << "]: ior tex id " << material.surfaceShader.ior.texture_id << "\n";
}
if (!ss.str().empty()) {
TINYUSDZLOGD(TAG, "%s", ss.str().c_str());

View File

@ -943,8 +943,9 @@ IF (NOT ASSIMP_BUILD_NO_USD_IMPORTER)
# Note: ALWAYS specify a git commit hash (or tag) instead of a branch name; using a branch
# name can lead to non-deterministic (unpredictable) results since the code is potentially
# in flux
# "rendermesh-refactor" branch, 27 Apr 2024 03:10:57
set(TINYUSDZ_GIT_TAG "21401538740b1a698a7cd179ccc143f9c5e4459a")
# "rendermesh-refactor" branch, 10 May 2024 05:47:02
set(TINYUSDZ_GIT_TAG "b41e1ddb6837e53827d9c234c0ded59190fa6a0b")
message("****")
message("\n\n**** Cloning tinyusdz repo, git tag ${TINYUSDZ_GIT_TAG}\n\n")
# Patch required to build arm32 on android
@ -963,6 +964,8 @@ IF (NOT ASSIMP_BUILD_NO_USD_IMPORTER)
PATCH_COMMAND ${TINYUSDZ_PATCH_CMD}
)
FetchContent_MakeAvailable(tinyusdzExtProj)
message("**** Finished cloning tinyusdz repo")
message("****")
set(Tinyusdz_SRC_ABSPATH "${Tinyusdz_REPO_ABSPATH}/src")
set(Tinyusdz_SRCS