错误:: Assimp ::预期不同的索引计数在< p>元素

发布于 2025-02-03 09:50:55 字数 926 浏览 3 评论 0原文

我使用Visual Studio 17在Windows上开发了一个项目,对我来说很好。现在,我正在使用Linux Virtual Machine(在VirtualBox)上使用Cmake编译它,并且一切似乎都可以,但是当我运行程序时,Assimp不起作用。

当我创建一个进口商来加载动画时,它会打印出一个错误:

ERROR::ASSIMP:: Expected different index count in <p> element.

但是令我发疯的是,它不会导致程序中的崩溃,但是在打印此之后它会继续进行,它会像没有发生的情况一样,断言是通过了,但是当我采用动画时,我会得到一个细分错误。

这里的代码:

Assimp::Importer importer;
const aiScene* scene = importer.ReadFile(animationPath, aiProcess_Triangulate);
assert(scene && scene->mRootNode);
auto animation = scene->mAnimations[0];

如何解决这个问题?

复制它: 带有Ubuntu 22.04 Lts OS的VirtualBox。

可以从克隆起来

您需要安装Conan。 安装柯南(Conan 它只是安装了一些依赖项,例如xorg-dev,build-esental等,并使用Apt-get install和一些带有柯南的库,并用cmake配置makefile并构建它。然后,转到build dir并运行名为Reskinner的程序。

I developed a project on windows with visual studio 17 and it worked fine for me. Now I'm compiling it with cmake on a linux virtual machine (in virtualbox) and everything seems to be ok but when I run my program Assimp doesn't work.

When I create an importer to load an animation it prints an error:

ERROR::ASSIMP:: Expected different index count in <p> element.

but what drives me crazy is that it doesn't cause a crash in the program but it keeps going after printing this, it gets the scene like nothing happened, an assert is passed but when i take the animations i get a segmentation fault.

Here the code:

Assimp::Importer importer;
const aiScene* scene = importer.ReadFile(animationPath, aiProcess_Triangulate);
assert(scene && scene->mRootNode);
auto animation = scene->mAnimations[0];

Any ideas how to fix this?

To reproduce it:
Virtualbox with Ubuntu 22.04 LTS os.

the repo can be cloned from here

You need Conan installed.
When Conan is installed, just clone the repo and run the script called installer.sh
it just installs some dependencies like xorg-dev, build-essential etc with apt-get install and some libraries with conan and configures the makefile with cmake and build it. Then, go to the build dir and run the program called Reskinner.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你的他你的她 2025-02-10 09:50:55

这是Collada实施中的一个已知错误。索引的数量不适合原始索引。我不确定这是由于我们的Collada解析器或无效模型的错误期望而引起的。

您可以在此处找到问题报告:错误索引的问题

This is a known bug in the collada-implementation. The number of indices does not fit to the kind of primitive. I am not sure if this is caused by a wrong expectation from our collada parser or from an invalid model.

You can find the issue-report here: Problem with wrong indices

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文