User avatar
horeaper
Topic Author
Posts: 34
Joined: 22 Sep 2014, 12:50

Unity - Is there any way to change the default texture provider?

08 Dec 2017, 05:21

My group uses WebP for 2D UI resources (since on 90% quality it's a lot smaller than PNG and offers great image quality), so I want to bypass the buildin texture loader, and provide a custom one .
I've been digging the Noesis source in unity for a while, but still havn't get my head around it. Looks like a lot work are involved if I want to replace NoesisTextureProvider. :shock:
Last edited by horeaper on 12 Dec 2017, 08:28, edited 1 time in total.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity - Is there any way to change the default texture provider?

08 Dec 2017, 16:49

You probably don't want to follow that route. Our texture provider implementation in Unity just uses the textures generated by Unity. So, I would wait for Unity to support WebP although I am not sure it makes sense because Unity doesn't use native image formats in its projects. Depending on the platform, it uses internally DXT, crunch... what ever GPU friendly format. So, I don't see any real advantages in using WebP.
 
User avatar
horeaper
Topic Author
Posts: 34
Joined: 22 Sep 2014, 12:50

Re: Unity - Is there any way to change the default texture provider?

09 Dec 2017, 09:03

Our game (which is an UI heavy game) contains tens of thousands 2D image resources. Storing them in WebP could help reducing the generated package size by A LOT.
Currently out approach are "Load from Resource -> Decode using WebP library -> BitmapSource.Create() -> Set to Image.Source", all done by code. Which is extremely inconvenient. I can't help but wonder if there is another way around.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity - Is there any way to change the default texture provider?

11 Dec 2017, 12:29

Effectively that's inconvenient because you are creating uncompressed textures for the GPU. But I don't see a clear solution till Unity support this new format. Did you compare the storage versus the new crunch format in Unity? That format is extremely efficient for both storage and for GPU compression on the fly.
 
User avatar
horeaper
Topic Author
Posts: 34
Joined: 22 Sep 2014, 12:50

Re: Unity - Is there any way to change the default texture provider?

12 Dec 2017, 08:27

The crunch requires DXT/ETC which losts too much detail for 2D UI elements, and it's unacceptable for us. I think we have to keep doing our way until Unity supports some form of loseless, or near lossless RGBA compression (like the 90% quality WebP we are using). But according to one blog's comment, there are no ETA yet :(
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity - Is there any way to change the default texture provider?

13 Dec 2017, 01:24

I see, sorry for not providing a better solution... Thanks for your feedback!

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 39 guests