We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to use this GLTF file, and I get the following result.
When I debug the code, I realize that the same index buffer may be shared by different skinned meshes. Scene::CreateMeshBuffers
// ... for (const auto& skinnedInstance : m_SceneGraph->GetSkinnedMeshInstances()) { const auto& skinnedMesh = skinnedInstance->GetMesh(); if (!skinnedMesh->buffers) { skinnedMesh->buffers = std::make_shared<BufferGroup>(); uint32_t totalVertices = skinnedMesh->totalVertices; skinnedMesh->buffers->indexBuffer = skinnedInstance->GetPrototypeMesh()->buffers->indexBuffer; skinnedMesh->buffers->indexBufferDescriptor = skinnedInstance->GetPrototypeMesh()->buffers->indexBufferDescriptor; // ...
This means that the index offset should NOT be omitted when we create the skinned mesh. SkinnedMeshInstance::SkinnedMeshInstance
// ... SkinnedMeshInstance::SkinnedMeshInstance(std::shared_ptr<SceneTypeFactory> sceneTypeFactory, std::shared_ptr<MeshInfo> prototypeMesh) : MeshInstance(nullptr) , m_SceneTypeFactory(sceneTypeFactory) { m_PrototypeMesh = std::move(prototypeMesh); auto skinnedMesh = m_SceneTypeFactory->CreateMesh(); skinnedMesh->skinPrototype = m_PrototypeMesh; skinnedMesh->name = m_PrototypeMesh->name; skinnedMesh->objectSpaceBounds = m_PrototypeMesh->objectSpaceBounds; // ** This line is what I add! skinnedMesh->indexOffset = m_PrototypeMesh->indexOffset; // ** skinnedMesh->totalVertices = m_PrototypeMesh->totalVertices; skinnedMesh->totalIndices = m_PrototypeMesh->totalIndices; skinnedMesh->geometries.reserve(m_PrototypeMesh->geometries.size()); // ...
The text was updated successfully, but these errors were encountered:
@apanteleev One Pull Request has been created!
Sorry, something went wrong.
No branches or pull requests
I try to use this GLTF file, and I get the following result.
When I debug the code, I realize that the same index buffer may be shared by different skinned meshes.
Scene::CreateMeshBuffers
This means that the index offset should NOT be omitted when we create the skinned mesh.
SkinnedMeshInstance::SkinnedMeshInstance
The text was updated successfully, but these errors were encountered: