Unity資源提取+KTX貼圖轉PNG,unity+ktx貼圖png

來源:互聯網
上載者:User

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,再拖片
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.