Image compression issues


(Glenatron) #1

Hi Sketchfab!

I've run into a big problem that's stopping me from posting what I've been working on recently.

So from what I gather, the mesh editor uses the core texture files that are uploaded, then when you publish, it takes those files and compresses them into .jpegs? I was worried about compression artefacts and colour stripping, so I tried to get around this by saving my textures as .jpegs before uploading, which works fine on most textures, but not my lightmap. The lightmap is a 2048x2048 texture, and spans the entire environment.

The screenshot on the left is from the editor, which looks fine, and the shot on the right is from the actual model viewer, which looks pretty horrendous. This happens regardless of whether the lightmap is uploaded as a .png, .tga, or.jpeg.

Is there any way to control the amount the textures are compressed? Or is there a way around this problem? I realise this is done to load meshes faster on lower end devices, but the lightmap itself is not exactly large (about 2mb), and I'd rather people see a loading screen for a few more seconds, than a broken lightmap.


Textures look bad
Strange texture renders
Alpha textures seem to be broken all of a sudden
Shiny Materials Gold
Difference in edit view and page view

Fix is live:

Let us know if you run into any more issues.

(Glenatron) #3

Hi James!

It's fixed the first time you view it after it has been published, but if you refresh the page, or come back to the model in another internet session, then it's broken again.



Hmm, yep, sorry about that.

@stephomi - can you take a look?

(Stephomi) #5

Argh.. sorry for the inconvenience.

May I ask what tool did you use to make the jpg (or more specifically if you tweeked manually the compression ratio to get an acceptable size)?

Regardless of the format we still recompress the textures in jpg (a jpg can be as big as any png, tga, etc...).

It seems there's an issue when we compress the png lightmap into jpg (your screen attached), but it works "as expected" with the model that already contains the jpg textures though, and we end up with :

It's a bit better but still shows ugly artefacts...

[technical warning below \o/]
Since everything is very tightly packed in the 2k textures, it doesn't play well with compression (and I guess the lightmap and the uv for it are generated automatically) when applied back in 3D.

Anyway it still is an issue on our end, and we'll try to look into it, but I can't promise anything for now since it's a complex problem to solve in a generic way.
We'd need to inspect how the UV are used for a particular map, but also the size of the triangles where the map is applied in comparison to the main scene size (visibility).

Right now, you don't have any control about the compression ratio we apply to the maps.
And we tend to avoid letting the artists the control on these things as we fear they tend to always select the maximum quality over size or performance...
@mauricesvay @cedric (^ it's probably going to happen again, maybe we should think about it, like providing a kind-of-hidden ui button with red warning wink )

Unfortunately, development on textures compression might be a bit slow because of summer holidays.

(Gamatech) #6

Hi everyone! I am a student who has just set up my account, and I'm already having an issue.

I have just uploaded a model 24 hand grenade. I find that in edit view my model looks just fine, but on the actual page the diffuse just breaks (particularly on the head). The gradual changes in the shade of green are replaced with sharp, clear splodges. Has anyone else had this problem before?

I have made sure that I have saved my changes in the edit view. Every once in a while the model will load correctly on my page, but the for the majority times it doesn't. I've tried waiting a couple minutes for it to load the textures, but it doesn't change.

Thanks a lot in advance to anyone who has ideas on how to fix this.


@gamatech - I've merged this into the existing thread. I'd like to keep all texture compression issues in one place.

We'll have a fix for this as soon as possible.

For now, a workaround is to upload a JPG instead of a PNG.

(Shaderbytes) #8

Hey there

I just uploaded a model , its the second version of it and when viewing on another machine it displayed as black and shocking green ( black where alpha is , green where color ). I first thought its just a error on that machine being older and all .. but then after doing a few other changes in the editor upon exit I was greeted with the same issue on my own machine.

What is bizarre is that if I go back into edit mode it displays as it should , but on exit the problem remains now.
I tried reimporting the texture .. it did not help.

Something has gone wonky somewhere .. I know its not the texture because I used the same texture in my first edition of the model and have viewed it many times over the last week and there was no problem like this.

I cant share the link since the model is still private , sorry. I'm sure you can dig into my library from your end and just view my latest upload

chat soon



We introduced a bug in our last release. We'll get it fixed as soon as possible, and I'll post here with any updates.

(Tonyind) #10

I must be having the same problem with alpha blend. It seems to work perfectly when editing the materials. When I save and exit, the alpha blend transparency is lost.

(Trung23) #11

I had the same issue yesterday after uploading. Ground alpha seems fine in editor, but returns to opaque material after exiting.

I solved it by uploading opacity map as a jpg (no alpha channel), with black transparent and white opaque. Try this method, it may solve yours.

Engineer by Trung Cao on Sketchfab

(Polish Farmer) #12

I ve got the same issue:) Hope You resolve it soon. Cheers!

(Polish Farmer) #13

Thx! It fixed it. Thanks a lot.

(Stephomi) #14

@shaderbytes We compressed images now (jpg). We obviously broke a thing or two in the process..
If you are in the editor we'll not load the compressed images, that's the reason why.

It should be fixed this week, same for the transparency alpha bug (@trung23).

Sorry for the inconvenience.

Strange texture renders
(Lambtoncountymuseums) #17

I've tried uploading this model several times and the sign "Petrolia" displays red instead of white (see screencap). Nothing I try in settings fixes it. But, while there, it displays the proper white, but it and all other textures look very blurry. Earlier versions of this model displayed fine. Oh, also, if I try to just upload the sign itself, the photo texture is just black; again, several upload attempts with same black texture...

Tried multiple browsers, same issue...

(Mark A) #18

Yeah having the same problem with my Adam Jensen model. The pistol is red and the specular on his shoulders is reflecting red instead of yellow.

I asked a friend, he's seeing the same thing so it's not me.

It happened after I updated the thumbnail, that's all.

(Stephomi) #19

It's a known problem, it will be fixed soon

(the reason why it's blurry in the editor is another problem though but will be fixed too)

Textures look bad
(Joel3d) #20

I have been having lot of issues with this model, getting really frustrated! It takes too long to tweak the textures, finally get it looking okay and then...

The pic on the right is the final result after saving in the material editor, the pic on the left is how I wanted it to look (sort of)

(Stephomi) #21

It will be fixed soon.

Part of the issue is the fact that you used a non power of 2 texture (3000x3000). But we'll fixed the problem nevertheless sorry for the inconvenience.

(Joel3d) #22

You mean we should save textures @ 2048 or 4096?

That's very interesting, I leaned something new - Well Thank you!