libgdx - 如何将搅拌机 2.8 制作的 FBX 转换为 `g3db/g3dj` 文件?
问题描述
我尝试使用 libGDX FBX-Converter转换一个简单的多维数据集,但该多维数据集未显示在我的游戏应用程序中。
FBX 文件是使用 blender 2.8 创建的
另一方面,如果我使用 blender 2.76 制作一个 FBX 文件,然后将其转换为 g3dj 文件,它会成功显示。
工作的与不工作的唯一区别是属性TEXCOORD0
这是2个g3dj
文件,一个用blender 2.76制作的,一个用blender 2.8制作的
这是可行的,FBX 使用搅拌机 2.76 创建,然后转换为g3dj
{
"version": [ 0, 1],
"id": "",
"meshes": [
{
"attributes": ["POSITION", "NORMAL"],
"vertices": [
-1.000000, 1.000000, 1.000000, -1.000000, 0.000000, 0.000000,
-1.000000, 1.000000, -1.000000, -1.000000, 0.000000, 0.000000,
-1.000000, -1.000000, 1.000000, -1.000000, 0.000000, 0.000000,
-1.000000, -1.000000, -1.000000, -1.000000, 0.000000, 0.000000,
1.000000, 1.000000, 1.000000, 0.000000, 1.000000, 0.000000,
1.000000, 1.000000, -1.000000, 0.000000, 1.000000, 0.000000,
-1.000000, 1.000000, 1.000000, 0.000000, 1.000000, 0.000000,
-1.000000, 1.000000, -1.000000, 0.000000, 1.000000, 0.000000,
1.000000, -1.000000, 1.000000, 1.000000, 0.000000, 0.000000,
1.000000, -1.000000, -1.000000, 1.000000, 0.000000, 0.000000,
1.000000, 1.000000, 1.000000, 1.000000, 0.000000, 0.000000,
1.000000, 1.000000, -1.000000, 1.000000, 0.000000, 0.000000,
-1.000000, -1.000000, 1.000000, 0.000000, -1.000000, 0.000000,
-1.000000, -1.000000, -1.000000, 0.000000, -1.000000, 0.000000,
1.000000, -1.000000, 1.000000, 0.000000, -1.000000, 0.000000,
1.000000, -1.000000, -1.000000, 0.000000, -1.000000, 0.000000,
1.000000, -1.000000, -1.000000, 0.000000, 0.000000, -1.000000,
-1.000000, -1.000000, -1.000000, 0.000000, 0.000000, -1.000000,
1.000000, 1.000000, -1.000000, 0.000000, 0.000000, -1.000000,
-1.000000, 1.000000, -1.000000, 0.000000, 0.000000, -1.000000,
-1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000,
1.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000,
1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000,
-1.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000
],
"parts": [
{
"id": "Cube.002_part1",
"type": "TRIANGLES",
"indices": [
0, 1, 2, 2, 1, 3, 4, 5, 6, 6, 5, 7,
8, 9, 10, 10, 9, 11, 12, 13, 14, 14, 13, 15,
16, 17, 18, 17, 19, 18, 20, 21, 22, 21, 20, 23
]
}
]
}
],
"materials": [
{
"id": "Material.005",
"ambient": [ 0.000000, 0.000000, 0.000000],
"diffuse": [ 0.800000, 0.800000, 0.800000],
"emissive": [ 0.800000, 0.800000, 0.800000],
"opacity": 1.000000,
"specular": [ 1.000000, 1.000000, 1.000000],
"shininess": 9.607843
}
],
"nodes": [
{
"id": "Cube",
"rotation": [-0.707107, -0.000000, 0.000000, 0.707107],
"scale": [ 1.000000, 1.000000, 0.158538],
"parts": [
{
"meshpartid": "Cube.002_part1",
"materialid": "Material.005"
}
]
}
],
"animations": []
}
这是一个不起作用的,FBX 用搅拌机 2.8 创建然后转换为g3dj
{
"version": [ 0, 1],
"id": "",
"meshes": [
{
"attributes": ["POSITION", "NORMAL", "TEXCOORD0"],
"vertices": [
-1.000000, 1.000000, 1.000000, -1.000000, 0.000000, 0.000000, 0.625000, 0.750000,
-1.000000, -1.000000, -1.000000, -1.000000, 0.000000, 0.000000, 0.375000, 1.000000,
-1.000000, -1.000000, 1.000000, -1.000000, 0.000000, 0.000000, 0.625000, 1.000000,
-1.000000, 1.000000, -1.000000, -1.000000, 0.000000, 0.000000, 0.375000, 0.750000,
1.000000, 1.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.625000, 0.500000,
-1.000000, 1.000000, -1.000000, 0.000000, 1.000000, 0.000000, 0.375000, 0.750000,
-1.000000, 1.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.625000, 0.750000,
1.000000, 1.000000, -1.000000, 0.000000, 1.000000, 0.000000, 0.375000, 0.500000,
1.000000, -1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 0.625000, 0.250000,
1.000000, 1.000000, -1.000000, 1.000000, 0.000000, 0.000000, 0.375000, 0.500000,
1.000000, 1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 0.625000, 0.500000,
1.000000, -1.000000, -1.000000, 1.000000, 0.000000, 0.000000, 0.375000, 0.250000,
-1.000000, -1.000000, 1.000000, 0.000000, -1.000000, 0.000000, 0.625000, 0.000000,
1.000000, -1.000000, -1.000000, 0.000000, -1.000000, 0.000000, 0.375000, 0.250000,
1.000000, -1.000000, 1.000000, 0.000000, -1.000000, 0.000000, 0.625000, 0.250000,
-1.000000, -1.000000, -1.000000, 0.000000, -1.000000, 0.000000, 0.375000, 0.000000,
1.000000, -1.000000, -1.000000, 0.000000, 0.000000, -1.000000, 0.375000, 0.250000,
-1.000000, -1.000000, -1.000000, 0.000000, 0.000000, -1.000000, 0.125000, 0.250000,
-1.000000, 1.000000, -1.000000, 0.000000, 0.000000, -1.000000, 0.125000, 0.500000,
1.000000, 1.000000, -1.000000, 0.000000, 0.000000, -1.000000, 0.375000, 0.500000,
-1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.875000, 0.500000,
-1.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.875000, 0.250000,
1.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.625000, 0.500000,
1.000000, -1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.625000, 0.250000
],
"parts": [
{
"id": "Cube.001_part1",
"type": "TRIANGLES",
"indices": [
0, 1, 2, 1, 0, 3, 4, 5, 6, 5, 4, 7,
8, 9, 10, 9, 8, 11, 12, 13, 14, 13, 12, 15,
16, 17, 18, 16, 18, 19, 20, 21, 22, 22, 21, 23
]
}
]
}
],
"materials": [
{
"id": "Material.002",
"ambient": [ 0.050876, 0.050876, 0.050876],
"diffuse": [ 0.800000, 0.800000, 0.800000],
"emissive": [ 0.800000, 0.800000, 0.800000],
"opacity": 0.000000,
"specular": [ 0.800000, 0.800000, 0.800000],
"shininess": 25.000000
}
],
"nodes": [
{
"id": "Cube",
"rotation": [-0.707107, -0.000000, 0.000000, 0.707107],
"scale": [ 1.000000, 1.000000, 0.081716],
"parts": [
{
"meshpartid": "Cube.001_part1",
"materialid": "Material.002",
"uvMapping": [[]]
}
]
}
],
"animations": []
}
那么有没有办法在blender 2.8中省略这个属性?或者甚至更好地让 libgdx 考虑到这个属性?
我在搅拌机 2.8 中使用漫反射 BSDF 材料
解决方案
推荐阅读
- bash - mvn 命令返回:[错误] 你指定的目标需要一个项目来执行,但是这个目录下没有 POM
- r - 使用胶水构造查询,但使其不是字符串
- python - Pygame:当我按住鼠标时屏幕闪烁,但只有一个特定的按钮
- c++ - 用于文本文件的 C++ getline
- python - 如何过滤所有带有 something1 后跟 xyz 的行并将它们存储在单独的 pandas 数据框中
- asp.net-web-api - 如何仅限制 WebApi 授权路由的子集?
- python - 如何在 TF2.0 中将 gradient_override_map 与 tf.GradientTape 一起使用
- c - 使用指针查找文件中的标签
- sql-server - 即使在设置了默认架构和默认数据库之后,也没有应用默认架构
- python-3.x - 如何使输出 ipywidget 仅捕获标准输出?