我有 350 個 gtlf 檔案。最初的檔案是 OBJ 格式(350 個檔案 音頻),我用 obj2gtlf 將它們轉換成單獨的 gtlf。
如何創建包含所有 350 個關鍵幀的影片 gtlf 檔案?或者如何使用這 350 個 obj/gltf 檔案在 Unity 中創建影片?
我想使用這些檔案在 Unity 中匯入/創建影片并運行 Hololens 應用程式。通過放置此影片,我希望看到在 Hololens 應用程式中播放的體積視頻。
但我無法使用 gtlf 變換制作序列,它似乎只需要一個 gtlf 檔案(而不是全部 350 個)并將紋理分離到單獨的 jpg 檔案中。我無法在 Unity 中使用 Timeline 創建影片。
誰能幫我?我是 Unity 新手,找不到解決方案
PS:骨骼影片不是解決方案。我的檔案代表使用體積視頻方法捕獲的真人。他留下來,說話,微笑并移動他的手。我需要將 3d 影片模型匯入 Unity 以使用它作為我的碩士論文。所以我沒有為那個模型設定影片,我有一個捕獲的視頻作為 350 個 obj 檔案 網格作為 jpg 和音頻。我可以將單個 3d 模型匯入為 obj 檔案,但我找不到匯入影片體積視頻的方法。
uj5u.com熱心網友回復:
您似乎有一個非常具體的用例,您確實需要將這些作為單獨的 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://www.uj5u.com/net/407335.html
標籤:
上一篇:根據用戶角色回傳JSON
下一篇:用貓鼬分類
