我有350个gtlf文件最初的文件是OBJ格式(350个文件+音频),我已经用obj2gtlf将它们转换成单独的gtlf。
如何用所有350个关键帧创建一个动画的gtlf文件?或者如何使用这350个obj/gltf文件在Unity创建动画?
我想导入/创建一个动画在团结使用这些文件和运行一个Hololens应用程序。通过放置这个动画,我想在我的Hololens应用程序中看到一个容量视频。
但是我不能使用gtlf转换来生成序列,它似乎只需要一个gtlf文件(而不是全部350),并将纹理分离到单独的jpg-文件中。我不能用时间线来制作动画。
有谁可以帮我?我是团结的新手,找不到解决的办法
PS:骨动画不是一个解决方案。我的文件代表了一个真实的人,是用容量视频方法捕捉的。他留下,说话,微笑,移动他的手。我需要导入一个3d动画模型到团结,以使用它我的硕士论文。所以我没有动画那个模型,我有一个捕获的视频作为350个obj文件+网格作为jpg和音频。我可以导入一个单一的3d模型作为obj文件,但我找不到一种方法来导入一个动画容量视频。
发布于 2022-01-05 14:36:16
您似乎有一个非常具体的用例,您确实需要这些作为独立的3D模型和纹理/材料。
如前所述,最简单但可能不是最有表现力的方式就是让所有这些3D物体出现在你的场景中,并且一次只设置其中一个。
类似的东西。
public class ModelFrames : MonoBehaviour
{
// You drag these all in once via the Inspector
public GameObject[] models;
private int currentIndex = -1;
private void Awake()
{
foreach(var model in models)
{
model.SetActive(false);
}
}
private void Update()
{
if(currentIndex >= 0)
{
models[currentIndex].SetActive(false);
}
currentIndex = (currentIndex + 1) % models.Length;
models[currentIndex].SetActive(true);
}
}如果您不想切换每个帧,也可以添加一些修饰符
public class ModelFrames : MonoBehaviour
{
// You drag these all in once via the Inspector
public GameObject[] models;
public int targetFramesPerSecond = 60;
private void Awake()
{
foreach(var model in models)
{
model.SetActive(false);
}
}
private IEnumerator Start()
{
var currentIndex = 0;
models[currentIndex].SetActive(true);
while(true)
{
yield return new WaitForSeconds(1f / targetFramesPerSecond);
models[currentIndex].SetActive(false);
currentIndex = (currentIndex + 1) % models.Length;
models[currentIndex].SetActive(true);
}
}
}

https://stackoverflow.com/questions/70593093
复制相似问题