Good image quality inside editor and bad image compression inside viewer


(Bartosh44) #1

As you can see normal map imported to sketchfab as PNG 16 bit 4K (from substance painter)

Uploaded model you can see here. Please help me improve that quality to same level as it is inside editor.


#2

Hi,

We're actively working to improve our normal map compression, but it's a tricky subject.

However, we only output 8-bit images, so maybe that is adding to the issue?


(Bartosh44) #3

Thanks for answer.

Here is my texture: link to texture. It`s downgraded by Sketchfab engine to 2K 8bit jpeg from 4K 16bit png. Ok, I can handle 8bit in normal map but I would like to have 4K and PNG as I uploaded. Is it possible to have 8bit png 4K normal map in viewer (or always it will be downgraded to 2K and jpeg)?


#4

We support up to 8k, so your 4k texture should be used correctly. However, we always convert to 8bit and do other compression and optimization. More details:

https://help.sketchfab.com/hc/en-us/articles/202600873-Materials-and-Textures#textures-processing


(Bartosh44) #5

Thanks.
8bit png 4K solved my problem.

I hope that you will make support fo 16bit normal map.


(Bartosh44) #6

I don't understand. Yesterday was fine. Today it's blotchy jpeg again. I havent changed anything sińce yesterday. Why it shows 2k 8bit jpeg again instead od my 8bit 4k png? I've fixed it.


(Bartosh44) #7

I uploaded it again and it`s ok. I hope that will stay for longer unchanged.


(Bartosh44) #8

I checked it a moment ago and its changed again. I've uploaded one more time and I`ve done printscreens to illustrate unwanted changes (both in viewer).

This is same model and same texture. I upload 8bit 4K png and after while I`ll get 8bit 2k jpeg instead of mine PNG. 8bit PNG should be unchanged (according to documentation). Why this happens?



(Bartosh44) #9

I went to 8K 8bit jpeg almost without compression instead of 4K png becouse engine has been constantly changing my files PNG->JPG. It's ok now but it`s not so good as PNG.


(Mrchlblng) #10

@bartosh44 textures are optimized asynchronously; we wait 5min before actually processing your textures (to avoid unnecessary optimizations).This should explain why the rendering 'surprisingly' change.

Regarding 16bits images, as long as you do not suffer from banding, you may use them. We will probably support 16bits images in the viewer but for the moment it's just too heavy to download so we only use 8bits images.

As @james said, We are also actively working on improving 8bits nmap optimization by using compressed formats that provide a better quality for similar filesizes when compared to jpeg; we're currently looking at using astc compression but this is very cpu intensive so we're still working on making it available to everyone.


(Bartosh44) #11

Is it possible to not change 8bit PNG to JPEG as it is described in your docs (docs):

Textures are compressed to minimize model download times. We convert any image that is not .JPG or .PNG to .PNG. Then, we generate compressed versions of every texture.


(Mrchlblng) #12

What the doc says is that when we first process user textures, we transcode anything that is not jpeg or png to png. This will give us the "base" image that we use to generate subsequent optimized images. This base image is also what we use in our editor.

Optimized images are generated in both jpeg and png but we only keep the smallest files (which is usually jpeg for normal maps). At the moment, we unfortunately do not have any good error metric that could prevent us from destroying too much signal.
There is unfortunately no way to bypass those artefacts at the moment but we really hope to enable astc for all normal maps soon and have a much better final quality in the viewer.
.


(Bartosh44) #13

Thanks for clarification. I will wait for future changes.