블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2794)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (11)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday

WWW로 Texture를 다운받을 때, DDS, BMP,TGA는 다운이 안되길래 검색해보니..

WWW로는 PNG, JPG만 된다고 한다..

다른 포멧도 지원해주는 플러그인이 있길래 링크해놓는다.


Task #5: Loading DDS, BMP, TGA and other textures via WWW class in Unity3d

  
  This article describes the task: Load images via WWW class. Current version of Unity3d allows you to download images via WWW class only in PNG or JPG format (read more here:http://docs.unity3d.com/Documentation/ScriptReference/WWW-texture.html). But we should implement image loading in such formats as DDS, BMP, GIF, PSD, TGA etc. 


  Demo of application is shown on fig. 1.
Figure 1. – Demo of application
  
  All these image formats are supported by DevIL library (read more here:http://openil.sourceforge.net/features.php).
  There is no need for full application description, because DevIL library is well documented and has a lot of examples. I will show only the short description of implementation:
  • Load texture using WWW class;
  • Get bytes data using «bytes» field of WWW class;
  • Create DevIL texture from this data;
  • Get Color32[] array from DevIL texture;
  • Create Texture2D object based on this color array;

  To illustrate implementation I created a demo application. I want to notice that this application loads also MipMaps data from the texture, and creates proper Texture2D. 
  If you need more detailed description, or implement image loading not supported by unity3d, please write it in comments.


  Application demo you can download here:
  Source code you can download from here:



출처 : http://denis-potapenko.blogspot.kr/2013/04/task-5-loading-dds-bmp-tga-and-other.html

반응형

'Unity3D > Plugins' 카테고리의 다른 글

Unity3D WebView  (0) 2015.01.21
유니티 3D상에서 WebView 띄우기  (0) 2015.01.20
Log Viewer  (0) 2014.01.09
Mobile Movie Texture  (0) 2013.12.03
원격 로그 플러그인  (0) 2013.11.20
Posted by blueasa
, |