Unity資源提取+KTX貼圖轉PNG,unity+ktx貼圖png
1、Unity資源提取工具:Disunity
:https://github.com/ata4/disunity
使用方法:java -jar disunity.jar extract /..../*.assets
2、對於格式為KTX的貼圖,我們可以將其轉為png格式
工具:PowerVR Tools and SDK components
:http://community.imgtec.com/developers/powervr/installers/
其中的PVRTexToolGUI可以直接開啟KTX的貼圖,並儲存為PNG格式,我們也可以使用CLI目錄下的命令列工具PVRTexToolCLI來進行批量轉換
附自己寫的一個批量轉換的shell指令碼
#!/bin/bashfunction convert(){ for file in $(find . -name '*.ktx') do /Applications/Imagination/PowerVR/GraphicsSDK/PVRTexTool/CLI/OSX_x86/PVRTexToolCLI -i $file -d -f r8g8b8a8 done}convert 註:
1、網上通常的做法是使用PVRTexToolCLI將ktx轉換成pvr,然後再使用TexturePacker將pvr轉成png,其實不需要這麼麻煩,這裡我們直接使用PVRTexToolCLI將ktx轉化成png
2、如果是再windows上操作,可以使用
for %f in (*.ktx) do PVRTexToolCLI.exe -i "%f" -d -f r8g8b8a8
unity怎把project中的兩張png圖片資源放入情境中(圖中左上方)?
再添加一個相機,改為深度相機,depth大於情境相機,建個plane,把圖片拖上,把plane放在建立相機前就ok了
unity怎把project中的指南針的png圖片資源放入情境中?
在project中隨便位置右鍵建立material,在情境中建立個空物體(ctrl+shift+n),在空物體中添加mesh filter組件並選定模型,再添加mesh renderer並在materials中拖入建立的material,再拖片