1. 程式人生 > >網頁模型檢視——obj模型轉成js檔案分享

網頁模型檢視——obj模型轉成js檔案分享

檔案準備: obj、mtl Three.js 針對Python2 使用檔案 convert_obj_three.py 針對Python2 使用檔案 convert_obj_three_for_python3.py

要求: 1.電腦安裝Python2.7或者Python3更高版本 2.obj(有的模型有mtl和貼圖檔案)和convert_obj_three.py(或者convert_obj_three_for_python3.py)放在同一資料夾。

步驟: 1)    開啟cmd。 2)    cmd到指定的檔案目錄下。 3)    輸入python convert_obj_three_for_python3.py -i 模型名稱.obj -i新的檔名稱.js  (如果電腦安裝的是python2.7版本,輸入convert_obj_three.py -i 模型名稱.obj -i新的檔名稱.js) 4)回車,等待結果。