• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: VWR-2404
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Qarl Linden
Reporter: SignpostMarv Martin
Votes: 175
Watchers: 60
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

lossless texture compression on small textures not lossless

Created: 10/Sep/07 03:57 PM   Updated: 24/Jul/08 02:32 PM
Component/s: Graphics
Affects Version/s: 1.18.3 Release Candidate, 1.18.3.5, 1.19.1 Release Candidate
Fix Version/s: 1.20 Release Candidate

File Attachments: 1. File 2404.tga (997 kB)
2. File BoxSculptieExact2.bmp (12 kB)
3. File buckle-004-003.bmp (12 kB)
4. File da2d7853-8fc7-4d80-e0dc-b791f28f85a8.j2c (3 kB)
5. File dodecsculpt2.tga (3 kB)
6. Text File lossless.patch (1 kB)
7. File newmesh.tga (3.00 MB)
8. File rings.bmp (48 kB)
9. File rings2.bmp (48 kB)
10. File sculpt-snapshot.bmp (2.87 MB)

Image Attachments:

1. 8x8 gradient borked_001.jpg
(67 kB)

2. 8x8 RGBYWGGK upload still borked.png
(332 kB)

3. Borked_jet_engine.jpg
(71 kB)

4. BoxSculptieExact2Picture.jpg
(21 kB)

5. BuckleView1.jpg
(39 kB)

6. BuckleView2.jpg
(39 kB)

7. goodstairsbadstairs.jpg
(288 kB)

8. hilbert_sculpty_bad_compare.jpg
(93 kB)

9. lossless-compression-bug-002.jpg
(81 kB)

10. lossless-compression-bug.jpg
(113 kB)

11. Lossless_Comparison_63RC.jpg
(231 kB)

12. lossless_issue.jpg
(161 kB)

13. newRC_1_18_4_still_problematic.jpg
(65 kB)

14. partially_fixed.jpg
(96 kB)

15. sculptiefailure_1.20.0.3-failed.png
(219 kB)

16. sculptiefailure_1.20.0.3-loaded.png
(222 kB)

17. sculptiefailure_1.20.0.3.jpeg
(56 kB)

18. sculpties_after_fix.jpg
(279 kB)

19. sculpties_before_fix.jpg
(303 kB)
Issue Links:
Duplicate
 
Relates

Linden Lab Issue ID: SL-54632
Linden Lab Internal Branch: 1.20.7.87883 RELEASECANDIDATE

Sub-Tasks  All   Open   
 Sub-Task Progress: 

 Description  « Hide
Despite claiming to be lossless, the "lossless compression" mode for small textures results in uploads appearing different than the source image.

Lossless compression either needs to be fixed, or it's claims of being lossless need to be adjusted to match the reality of output.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lex Neva added a comment - 11/Sep/07 08:46 AM
Okay... I think some interesting things are happening here with respect to the way the texture preview window works. It LOOKS like what we're seeing is wrapping around/fuzzing of the edges of the texture in the texture preview window after uploading. This is normal, because textures on objects in SL behave this way. The borders always wrap around and bleed a little (which can cause some other annoying problems with textures!) I think this is because of the way textures are handled in 3d graphics libraries/cards. Are you sure this wrapping around is actually causing errors in the mesh itself, or just in the visual comparison of the texture that you've shown us?

Qarl Linden added a comment - 11/Sep/07 12:46 PM
FYI - yes there is a bug here, we're looking into it. (oddly, it seems to be a download bug, not an upload bug. should be fixed soon.)

Lex Neva added a comment - 12/Sep/07 09:12 AM
I take it back!

DanielFox Abernathy added a comment - 16/Sep/07 07:07 AM
Example of bitmap which does not upload lossless properly in SL RC 1.18.3(4)

DanielFox Abernathy added a comment - 16/Sep/07 07:17 AM
Example of 128x128 which doesn't seem to upload losslessly

DanielFox Abernathy added a comment - 16/Sep/07 07:18 AM
Example of lossless upload issue; same texture uploaded with SLImageUpload vs "upload lossless" with RC 1.18.3(4)

DanielFox Abernathy added a comment - 16/Sep/07 07:24 AM
I've run into the same problem so hopefully this is the right place to post my findings. This is not an isolated case that I have noticed but I have had this happen several times. Although the new lossless upload functionality seems to work okay most of the time, I've had many sculpties that were corrupted until I went back and used SLImageUpload to upload them, whereupon they look fine. The attached "rings.bmp" did not upload correctly with the 'lossless' checkbox checked when I attempted it, using Second Life client version 1.18.3 (4) Sep 14 2007 ; I uploaded it twice just to make sure. You can see in the provided lossless_issue.jpg ; this is the SAME sculpt bmp "rings.bmp" the only difference is one was uploaded through the client and the other through SLImageUpload.

However, the attached "rings2.bmp" uploads fine through the SecondLife client; I am not sure what triggers the failure in the SecondLife uploading. This would lead me to believe there is in fact an issue with uploading. If it was just a downloading issue, I would not expect to be able to remedy the problem with SLImageUpload.


camilla Yosuke added a comment - 19/Sep/07 03:04 PM
ok, I just made a test : when I upload ( linux RC 1.18.3.2 ) a texture in 64*64 with losless compression on, it ends VERY BAD.
Now, the same texture, sized in GIMP to 128*128 without interpolation, uploaded in 128*128 with losless on rezzes perfectly.

uchi desmoulins added a comment - 23/Sep/07 01:47 PM
I have several sculptmaps that become corrupt after the initial download of them. Meaning, if I reload SL, they become corrupt, distorted, ugly and bad, and they remain so, the second time I view them..

THE FIX? - Clearing my cache and starting SL over again.

Then, they are fine. But only temporarily. So, is image data not being cached correctly?

And of course, this 'fix' doesn't apply to ALL sculptmaps, just a few that for mysterious reasons look good initially, then later appear distorted. ARGH!


SignpostMarv Martin added a comment - 24/Sep/07 04:52 AM
that would seem to suggest that the lossless sculptie maps are being re-encoded.

Funk Schnook added a comment - 29/Sep/07 04:06 AM
There is definitely a bug here. I have started using opensim to test sculpties and noticed once I upload to SL's main grid, the sculpties appear lumpier (I can see this in wireframe mode). So to test this, I did the following on LL's servers and on my own local opensim server:

1. uploaded a 64x64 tga using lossless compression
2. Save the image back to your HD (save image as...)
3. Load your original image and the newly saved tga into photoshop.
4. Copy and paste the newly saved image into a new layer on top of your original sculp map and set its blending mode to DIFFERENCE

This should produce a pure black image. You can take the color picker and swipe over pixels, while looking at the RGB values in the INFO panel. It should always be 0,0,0

Now the interesting part. If I save the tga from opensim, everything works. The color picker shows pure black on every pixel of the 64x64 image.

If I use the image saved from LL's server, the color picker shows some small differences using the color picker (eg, 0,1,0 or 1,0,0 etc etc). It's not pure black

So, according to this test, the SL client is actually uploading the image losslessly to the server (otherwise opensim's test would fail), but something is going wrong on LL's server side. Either the image data is not being stored correctly, or the sim is corrupting the data when it's sending it back to the client.


Qarl Linden added a comment - 29/Sep/07 09:22 AM
Funk - yes. the bug is not in the image encoding - it's in the networking system. i'm still trying to completely undestand it - it has something to do with assumptions about the datasize of the images. it's interesting that you're seeing success using the opensim code - have you checked a LOT of textures? (whatever i try, i'm finding that some textures will work in some cases, and not in others.)

Funk Schnook added a comment - 30/Sep/07 01:34 AM
The plot thickens.

1. As I said, opensim displays the sculpt map correctly after uploaded then applied to the prim.
2. BUT... once I relog and view the mesh its lumpier (looks just like the version on LL's grid)
3. If I clear my cache and relog, the sculpt map is fine again.
4. If I relog again WITHOUT clearing cache the sculpt map is lumpy again.

So at least on opensim, clearing cache and relogging fixes it. On main grid a cache clear doesnt fix it.

Now its starting to look like there is (also??) a client/cache bug, since opensim will display it correctly after a cache clear/relog.


SignpostMarv Martin added a comment - 30/Sep/07 07:16 AM
Funk Schnook, can you do me a favour and run this diff test (possibly repeatedly) on textures of all sizes ?

I'd be interested to know whether the textures people have uploaded are gradually losing bits :-P


Funk Schnook added a comment - 01/Oct/07 04:39 AM
I have attached an image (lossless-compression-bug.jpg) which shows the effect of the bug in opensim and secondlife.

The first image is my 3d model. The second shows you how the sculptie looks in open sim when you first upload it (this is the way it also looks after you relog and clear your cache).

The next 2 images display the buggy sculptie in both opensim and SL.

Clearing the cache fixes opensim but not SL as far as my testing goes.

This is starting to look more and more like a client side bug to me, since a cache clear will refetch the correct sculptie in opensim.


Funk Schnook added a comment - 01/Oct/07 05:07 AM
I have uploaded another screenshot showing LOSSY compression on both opensim and SL. It always looks like this whether you clear cache or not.

So, if you want your sculpties to look consistent, stick to LOSSY compression right now.


Funk Schnook added a comment - 01/Oct/07 05:11 AM
I have now attached the original sculptie 64x64 image (buckle-004-003.bmp) used in the tests above

Qarl Linden added a comment - 01/Oct/07 12:07 PM
here's the problem:

our SL clients and servers assume that all of our images are encoded the same way - and use this to optimize image transfer over the network. (it thinks to itself - "i need a 64x64 image - that should be about 64x64x3 bytes, compressed at 8:1, so i only need to download 1536 bytes.") this sort of heuristic occurs in the sim code, the viewer code, and the cache code, in different ways, which causes a variety of failure modes.

the assets on the server are in-fact intact and not degrading over time. you just can't see them.

short answer - listen to Funk: "So, if you want your sculpties to look consistent, stick to LOSSY compression right now."


Funk Schnook added a comment - 01/Oct/07 01:51 PM
@Qarl: Well I was hoping this issue would be sorted out before releasing another stable viewer. So basically what your saying is, you added this option, but it doesnt work.

I have heard some reports about slimageupload not displaying this problem. I havent run any tests yet but will try to soon. (ugh... now Im spending time beta testing instead of working and running my business)


Qarl Linden added a comment - 01/Oct/07 02:06 PM
heh - no. i'm saying that sometimes it works, and sometimes it doesn't, and we decided to leave it for the cases when it is useful.

Funk Schnook added a comment - 01/Oct/07 02:13 PM
@Qarl: Ah ok Well I have been testing a bunch of differnt sculpt maps over the past few days and the phtoshop difference test always showed some data loss (even though some of the sculpties actually looked quite good and usable anyway).

Id like to narrow down why some of your tests come up perfectly lossless. It must have something to do with file sizes?


Qarl Linden added a comment - 01/Oct/07 03:04 PM
what i'm seeing is that 64x64 images upsampled to 128x128 seem to work well - probably because they has a lot of redundancy (the upsampling) and so compress better (back within the assumed 8:1 ratio.)

Funk Schnook added a comment - 01/Oct/07 07:56 PM
@Qarl I didnt do a great deal of testing with 128x128, and the ones I tried werent upsampled from a 64x64 so wouldnt have compressed as well. They showed the same flaws as the 64x64s.

I'm thinking "nearest neighbor" upsampling in PS would be best for this so we arent introducing additional color info into the sculpt map.

If this works, using upsampled 128x128 images will be a good work around. Considering we are usually using bigger images for our prim textures, I guess it doesnt really matter about having a bigger sculpt map. Can't be any worse than the guy applying a 1024x1024 on his 0.01m prim jewelry


Qarl Linden added a comment - 02/Oct/07 10:41 AM
"I'm thinking "nearest neighbor" upsampling in PS would be best for this so we arent introducing additional color info into the sculpt map"

yes, exactly so.

meanwhile, one of the other lindens here suggested a good way to fix the problem - perhaps we'll have a full solution soon.


Funk Schnook added a comment - 02/Oct/07 12:01 PM
OK Qarl I'm having some success with this method:

1. render a 64x64 sculpt map
2. copy the top row of pixels into the clipboard (the top pole - I actually clean it up as a solid color too so my pole is nice and centered)
3. downsample (nearest neighbour) to 32x32 (I clean up the bottom pole here too as a solid color).. youll also notice your top line/pole went missing. Thats why I copied it to clipboard
4. upsample (nearest neighbour) to 64x64 and paste back the top row of pixels
5. upsample to (nearest neighbour) to 128x128
6. I add a black alpha mask just so my sculpt maps dont show up in the object panel (this is optional)

I havent downloaded the file back from sl to do a difference test in PS though because sl renders the sculptie without those huge jaggies seen in my screenshots. It renders the same in sl and opensim regardless of a cache clear.

Thanks for that final little clue which helped me work this out

You could even make this a photoshop action quite easily (except for the pole fixing?) so it's automated


Qarl Linden added a comment - 02/Oct/07 03:14 PM
kk guys - i think we got this one solved. patch is being tested by QA now.

DanielFox Abernathy added a comment - 02/Oct/07 07:11 PM
Great to hear Qarl. Eager to test it out

Acru Joliat added a comment - 03/Oct/07 07:36 PM
Will the fix for this be included with the upcoming rolling restart to fix SVC-750? I realy hope it will...

Qarl Linden added a comment - 04/Oct/07 09:56 AM
Acru - no. rolling restarts update software on our servers - this bug is in the viewer - so you'll need to download a new viewer. i wouldn't expect us to release a new viewer for a couple weeks.

Funk Schnook added a comment - 04/Oct/07 03:47 PM
Qarl, please make sure its in an RC so we can poke it first

Seg Baphomet added a comment - 10/Oct/07 09:35 PM
What was the fix? I've been trying to nail down VWR-1815 for some time and I've been suspecting something funny was going on before the textures even hit OpenJPEG...

Qarl Linden added a comment - 10/Oct/07 09:48 PM
don't think they're related Seg - the problem was that the client wasn't downloading the entire image file.

Varon Kappler added a comment - 19/Oct/07 01:16 PM
Could someone confirm whether the fix to this issue is included in the 1.18.4 release candidate?

Qarl Linden added a comment - 19/Oct/07 02:12 PM
Varon - yes, the 1.18.4 RC has the fix. enjoy.

SignpostMarv Martin added a comment - 19/Oct/07 02:27 PM
Second Life 1.18.4 (0) Oct 18 2007 14:36:02 (Second Life Release Candidate)

You are at 256323.1, 264102.6, 247.0 in Phasma located at sim391.agni.lindenlab.com (69.25.104.77:13006)
Second Life Server 1.18.3.71877

No fix appears to be present, problem still occurs.


Qarl Linden added a comment - 19/Oct/07 04:01 PM
yeah, i just noticed that too - i'm tracking down why the change didn't get into the RC...

Qarl Linden added a comment - 19/Oct/07 04:14 PM
hey guys - i've got some bad news.

this patch got hung-up in QA (due to issues unrelated to sculpties) and WILL NOT be apart of the 1.18.4 RC. we'll have to wait for 1.18.5.

very VERY sorry to get you all excited about it.


DanielFox Abernathy added a comment - 19/Oct/07 04:28 PM
Confirmed issue still relevant with latest Release Candidate Viewer (1.18.4(0))

Qarl Linden added a comment - 19/Oct/07 04:31 PM
DanielFox - don't re-open the issue. it remains fixed-internally.

DanielFox Abernathy added a comment - 19/Oct/07 04:33 PM
Second Life 1.18.4 (0) Oct 18 2007
Also confirmed issue not resolved. Posted a screenshot of my "sculpty torture test". These are identical image files uploaded through the latest RC, and SLImageUpload using libsecondlife, respectively. You can see SLImageUpload is still significantly outperforming the official SL viewer in lossless compression quality.

DanielFox Abernathy added a comment - 19/Oct/07 04:35 PM
Sorry Qarl, didn't see your comment as I was typing up mine on the 'attachment' page.
Good to hear the real fix is still coming

JimmyJ Sands added a comment - 02/Nov/07 09:17 PM
Is there any progress on this. I have a bunch of projects just waiting for it.

Acru Joliat added a comment - 04/Nov/07 03:27 PM
I am curious about an eta as well. Those sculpts that can wait, are waiting on the roll out of this fix, so I can upload the sculpt maps at a size much smaller than 128, for greater efficiency. .

beatfox xevious added a comment - 06/Nov/07 03:03 PM
Count me among those who eagerly await the rollout of this fix. We'd greatly appreciate any timetable info you could give us, Qarl, no matter how rough or tentative it may be! :3

beatfox xevious added a comment - 13/Nov/07 06:32 PM
Hmm... the issue still appears to be present in the 1.18.5 RC. Don't tell me it slipped out again?

hands Qarl some extra-strength epoxy glue, hoping maybe that'll help hold the patch in place better


uchi desmoulins added a comment - 14/Nov/07 03:31 AM
God (aka Qarl) hates us.

yvette quijote added a comment - 14/Nov/07 12:08 PM
Not fixed in 1.18.5. Would appreciate a firm timetable, since we're at a standstill and unfortunately changed our work flow relying on the assurances that it would be fixed in this release.

Qarl Linden added a comment - 15/Nov/07 01:33 PM
hey guys - YES - it should be in this release. let me check on what happened. if it all possible, i'll try to force it into the next minor release (i.e. SOON.)

Funk Schnook added a comment - 17/Nov/07 10:45 AM
Not fixed in 1.18.5 RC. My attached bitmap (buckle-004-003.bmp) still looks wrong

Qarl Linden added a comment - 21/Nov/07 09:58 AM
hey guys. sorry for all this delay. we've created a new release protocol over here (to help reduce escaping bugs) and it's taking a bit to get back up to speed.

i have it on good authority that this patch has already been merged into 1.18.6, which is scheduled for an RC0 release on nov-29.


beatfox xevious added a comment - 21/Nov/07 11:15 AM
Yay, an explanation AND an ETA!

Thanks a millions tons for getting back to us, Qarl - glad to hear things are improving over there. :3


uchi desmoulins added a comment - 05/Dec/07 01:44 PM
It's semi-fixed anyway. Resolutions under 64x64 don't appear to work still, so the guy with his 8x8 texture is still out of luck.

And regarding sculpties, I know people argue that 32x32 resolution textures won't work due to some 33rd-line issue, but considering I upscale my sculpty textures FROM 32x32 to something higher, and things work FLAWLESSLY, it leaves me a bit skeptical that that's true. It's impossible to know without trying.


uchi desmoulins added a comment - 05/Dec/07 02:15 PM
I uploaded a Before/After image comparing a 32x32 image as seen in the preview window and after after being uploaded.

16x16 seems okay.

I uploaded one 8x8 and it turned out a disaster. I uploaded it again, and while still bad, it wasn't a mess of garbage. I wasn't able to reproduce the error, but I was only willing to spend so much L. The UUID of that one is caaf3366-a3bc-e983-1ed8-fbd7f4c2a6ce


Qarl Linden added a comment - 05/Dec/07 02:17 PM
uchi is correct - very small textures still don't compress losslessly (in fact, if you attempt a lossless compression on them, they come-out worse than lossy) and this is due to yet another bug - this time in our 3rd party jpeg compressor.

given that the majority of complaints have been addressed (i.e. sculpties can now be created with lossless precision) i humbly suggest we close this ticket and re-open as a new, much lower priority ticket.


DanielFox Abernathy added a comment - 05/Dec/07 02:30 PM
has the downloading bug been addressed yet? since I'm still seeing my 128x128 torture test plane shear as seen above after initially uploading correctly

uchi desmoulins added a comment - 05/Dec/07 02:40 PM
Yeah, SLImageUpload produces even worse results...

Oh well.


JimmyJ Sands added a comment - 05/Dec/07 03:52 PM
Please don't close this out until its been tested a little. I uploaded (lossless) a 64x64 texture for a box, and its a vast improvement over the previous mess, but still, the faces have wiggles in them and the corners are rounded. I can see the corners might be unavoidably rounded due to the way the texture is translated to shape (even if its done perfectly), but I don't understand the slightly wiggly faces. I would expect them to be absolutely flat.

Qarl Linden added a comment - 05/Dec/07 04:39 PM
JimmyJ - i cannot help you unless you provide more information - the image file in question for example.

SignpostMarv Martin added a comment - 05/Dec/07 08:03 PM
Qarl: The title of the issue is "lossless texture compression on small textures not lossless", not "sculpties are fubared", closing the issue would be an inappropriate action.

Since the issue now seems to be migrating from one component to another, the most appropriate action would be to create a sub task for each component of the Viewer code that is affecting the issue.


Ever Student added a comment - 05/Dec/07 10:51 PM
Small sculpt-texture and snapshot of incorrectly-rendered sculptie.

Ever Student added a comment - 05/Dec/07 10:55 PM
I didn't realize this was supposed to be fixed by now; I didn't see an improvement. I'm attaching a sculpt-texture (dodecsculpt2.tga) and a snapshot (sculpt-snapshot.bmp). Note that the 32x32 texture is sharp-edged, but the uploaded version of it, both in the texture window and the build window, is blurry, and the sculptie itself is a mess. This is after a cache-dump, with the latest 1.18.5.3 client downloaded just yesterday, running on Linux.

Seifert Surface added a comment - 06/Dec/07 12:07 AM
64x64 is working perfectly for me now. Thanks Qarl!

Seifert Surface added a comment - 06/Dec/07 12:34 AM
(1.18.6 (0) ) When I uploaded the sculpties, lossless, all worked fine, and I was able to build the thing on the left. Came back the next day, and have been standing next to it for over half an hour, it still looks like the thing on the right.

Seifert Surface added a comment - 06/Dec/07 12:37 AM
(Seems like I spoke too soon, the above comment goes with the hilbert_sculpty_bad_compare.jpg image).

Seifert Surface added a comment - 19/Dec/07 11:49 AM
A little more data on this after some experimentation with Gearsawe Stonecutter:

It seems possible to repro the not-fully-loaded sculpty texture effect by going somewhere else very texture heavy, to the point that when one returns to the sculpty it needs to reload. Then it seems to fail.

Clearing cache and relogging at the location of the sculpty seems to make it load properly. Going to visit lots of large textures and returning makes it fail again.


Tobas Dryke added a comment - 26/Dec/07 05:52 AM
Could someone clarify the current behavior of lossless sculpties here?
I used the RC 1.18.6.0 and uploaded bunch of 64x64 lossless sculpties. Everything worked fine.
Few hours later, all those textures look worse than lossy ones... And I can't get them to look right again.

I repeated the test with RC 1.18.6.2: Same results - texture looks perfect, I can edit the sculptie, rotate my
camera around it, etc. But when I zoom out far enough to activate LOD, the texture gets broken and never
returns to its correct state.

So, the questions are: Where they got so distorted, when it will be fixed, and most important - I know for sure,
that people are uploading perfectly sharp sculpties. How?


Funk Schnook added a comment - 10/Jan/08 07:16 PM
Im testing in windlight at the moment and Im seeing the same problem mentioned by Seifert Surface. When I first log in the sculpties look ok. I'll tp away somewhere else (which may be texture heavy) then come back, and the sculpties are messed up. I don't even have to tp away. I can simply fly to another spot on my sim.

Im still using buckle-004-003.bmp for testing, which is attached to this jira

A relog fixes it though.


Acru Joliat added a comment - 13/Jan/08 03:11 PM
I did some tests today on the beta grid, of the 1.18.3.5 client vs the newest 1.18.6.3RC client, and though the 64x64 lossless size now works (aside from cases commented by others above), uploading lossless 32x32 or smaller sizes are still messed up.

Refer to Lossless_Comparison_63RC.jpg

[On a side note, the 128x128 one always rez'd correctly before the 64x64 one did, due to progressive sculpt rendering, making me wonder if 128x128 is still preferable to use over 64x64 in practice despite the larger data size? Or is it that much larger in practice really, due to data compression on transmit, or while resident in memory? Your thoughts, Qarl?]


Salid Sewell added a comment - 01/Feb/08 02:02 PM
Definately the problem still persists (tested on 128*128-32bit).
The upload seems to work, after upload the sculpty looks as expected...but after a while it comes to a download/cache problem that distorts the sculpty.

In the last months/viewer versions, clearing the cache solved it...but currently this seems not to be a working workaround anymore !?

Well, is there already a jira entry for this "sculptmaps are not correctly DOWN-loaded" issue ? Since this VWR-2404 is the "sculpties are not correctly UP-loaded"


SignpostMarv Martin added a comment - 01/Feb/08 02:12 PM
@Salid Sewell : This issue affects all textures, not just sculpties.

Sheet Spotter added a comment - 03/Feb/08 06:10 PM
Note that the edge of the buckle below the pin is bent inwards

Sheet Spotter added a comment - 03/Feb/08 06:12 PM
Note how the edge under the tip of the buckle is bent outwards

Sheet Spotter added a comment - 03/Feb/08 06:26 PM
I added two screen shots, BuckleView1.jpg and BuckView2.jpg.

These images are of the same sculpty, created by uploading the "buckle-004-003.bmp" provided above.

In one image the edge of the buckle that is under the buckle pin is bent inwards, and in the other image the same edge is bent outwards.

The only difference between these screenshots is that the camera was rotated around the object. Rotating the camera back and forth is enough to reproduce the inward or outward distortion.

The image distortion shown in these images is unlikely to be related to the texture cache or to re-logging, since the image always remained in view.

These distortions are likely unrelated to lossless compression.

(BTW, Sorry for adding three comments when one was clearly enough. This is my first time responding to a JIRA issue, so I hadn't realized that each time I upload an image the comment would appear as a separate entry.)


Qarl Linden added a comment - 04/Feb/08 09:26 AM
Sheet - the distortion you're seeing is unrelated to the lossess compression. it's being triggered by the bug, but isn't a bug itself.

the vertices of the pin (due to the compression errors) have been rearranged so as to "reverse the surface orientation." this causes their frontsides to be invisible and their backsides to become visible (which is the opposite of what's desired, although it makes for neat hacks when done intentionally (i.e. cell shading.))


Doradiia Nuvolari added a comment - 06/Feb/08 11:43 AM
Is there any hope of this either moving up in priority or at least being looked at again sometime soon? I can verify that it is still very much an issue and simply making sculpt maps 128x128 is not a viable workaround. (It seems to work better than smaller sizes, but still results in occassional loss of texture data resulting in a distorted image/sculpty.)

Personally, until it is reliable I cannot consider the lossless compression a viable feature at all. This is not merely a bug that crept in sometime after the feature was implemented. It has never really worked properly.


Sheet Spotter added a comment - 10/Feb/08 07:14 PM
Qarl - as you stated during your office hours a week ago, the problem is an incorrect assumption that a JPEG2000 file will be one-eighth the size of the original image's dimensions: Width x Height x Depth.

Tracking down the problem was not easy; it's taken numerous days of debugging.

The problem is in the LLTextureFetch::createRequest method, where it calls the LLImageJ2C::calcDataSizeJ2C method to estimate the "desired_size". The LLImageJ2C::calcDataSizeJ2C method includes the incorrect assumption that the file will be one-eighth it's original size.

I validated the cause by hacking the source code to force the correct file size of 2,185 bytes for the converted "buckle-004-003.bmp" texture. The sculpty now shows up as smooth as silk; no bumpies and no jaggies.

(This is a gross over simplification of the hack. I also had to dump a valid JPEG2000 copy of the image to disk and jiggle the file that was stored in my cache.)

I'm unable to offer a suggested fix; I don't know how to estimate the size of a JPEG2000 file.

I hope locating the problem allows you to identify the solution. I would not expect the solution to be trivial.


Sheet Spotter added a comment - 11/Feb/08 06:18 AM
I thought I should take another crack at explaining this problem, for the benefit of those who have not spent days with their head under the hood.

The JPEG2000 lossless compression is indeed lossless. Encoding a raw BMP image into the internal JPEG2000 format and then decoding it back to a raw image produces the identical image. There is no loss of image quality.

The server does indeed store the correct, lossless image.

The problem occurs when the client retrieves the image from the server or from the local cache on your hard drive.

The source code makes an incorrect assumption that the compressed JPEG2000 image will be one-eighth the size of the original image. The client stops downloading the image when it has read one-eighth the number of bytes that were in the original image. In some cases the JPEG2000 image is larger than one-eighth of the original image.

For example, the "buckle-004-003.bmp" image has 64x64x3 = 12,288 bytes in the original image. One-eighth of this number is 12,288/8 = 1,536 bytes. The client only retrieves the first 1,536 bytes of the texture. In this case, the actual compressed JPEG2000 image is 2,185 bytes. The last portion of the image is never downloaded from the server.

The image created by the client is distorted because the client has not retrieved the entire image from the server.


Qarl Linden added a comment - 11/Feb/08 08:47 AM
Sheet -

you are officially my new best friend. thank you for delving into the guts of our code.

but now i'm confused. the bug you found should already be fixed - there should be a special case in LLTextureFetch which checks for discard level 0. (this is a request for the full-rez version of the texture.) in this case, instead of using the broken calcDataSize(), it overrides with the filesize of the texture.

but if you don't see such a case - that means my fix never reached the light of day. (which would be supremely annoying.) let me check things on this end.

again - THANK YOU. THANKYOUTHANKYOUTHANKYOUTHANKYOUTHANKYOU.

K.


Theblack Box added a comment - 11/Feb/08 03:54 PM
I think this is the current state:

Server-side works correctly.

Main viewer 1.18.5.3 has the bug in its full uglyness (lossless on small textures always results in incomplete loading)

WL and RC viewers 1.18.6 and 1.19 based have the bug partially fixed (works alright when getting the texture from server ... )

Problem remaining in all Viewers: Loading lossless from cache

All props to Sheet Spotter !
Or is it Sheep Linden already ?


JimmyJ Sands added a comment - 11/Feb/08 04:08 PM
Sheet spotter! Way to go! Lets get this show on the road!

Sheet Spotter added a comment - 11/Feb/08 09:26 PM
The source code I looked at was for the 1.18.5.3 Viewer, which is still the default download.

The source code for the 1.19.0 RC Viewer includes a fix for this problem, but as "Theblack Box" has already stated it's only a partial fix.

The steps to reproduce the remaining problem in the 1.19.0 RC Viewer are outlined below.
1. Create a sculpted prim based on the "buckle-004-003.bmp" attached to this JIRA. Leave the sculpted prim rez'ed.
2. Clear cache and log out.
3. Log in with the 1.19.0 RC Viewer. The sculpted prim will be displayed correctly. [Texture was downloaded from server.]
4. Log off, without clearing the cache.
5. Log in with the 1.19.0 RC Viewer. The sculpted prim is now distorted. [Texture was loaded from local cache.]

With the 1.18.5.3 Viewer the sculpted prim was also distorted after steps 1 and 3.

I recognize this as a tough issue. Qarl has already applied one great fix to ensure the whole texture was downloaded from the server. I hope solving the second part (loading the whole texture from local cache) will be easier.

I ran out of time tonight, but I will keep looking at the issue over the next few evenings.


Theblack Box added a comment - 12/Feb/08 05:32 AM
vwr-2404 partially fixed in 1.18.6 and 1.19 based SL-viewers

Theblack Box added a comment - 12/Feb/08 05:39 AM
VWR-2404 partially fixed in 1.18.6 and 1.19 based Viewers

Theblack Box added a comment - 12/Feb/08 08:16 PM
UPDATE:

New WindLight Viewer (79674)

It appears to me like the bug has either been fixed or the effects have been reduced dramatically.
Nothing enlightening to be found in the update-note thou ... can anybody confirm or contradict that ?


Qarl Linden added a comment - 14/Feb/08 08:36 AM
can someone else confirm/deny Theblack's claim that this issue has been resolved in the windlight viewer? certainly the download issue should be addressed, so the cache load case is what needs to be tested. Seifert?

Theblack Box added a comment - 15/Feb/08 02:09 AM - edited
Follow up:

After some testing with Aminom Marvin and Cel Edman we are having mixed results.
Lossless images smaller than 64x64 still have the cache-problem everywhere. I didnt notice that because i always use 64x64.

But for some reason .... something changed in the effects this bug is causing since Windlight-79674.
On my computer (Linux amd64 Nvidia8600GS) i am no longer able to reproduce this error on lossless 64x64 sculpt images. They always load sooner or later fully for me now.

Other tests (on Aminoms and Cels computers) give different results. So we exchanged test-sculpties and i tried a 64x64 sculptie which causes trouble when loaded from cache (on Animons Computer) ..... for me this 64x64 lossless sculptie always loads sooner or later fully ... i am living with this sculptie for a few days now and didnt see it distorted for more than a couple of seconds while loading ever since.

Since Windlight-79674 release i am around these test-sculpties a lot ... all lossless 64x64 and all easy to see if fully loaded or not (all are made with degenerated surfaces, sharp & hard lighted edges ... etc ...)
And all of them ALWAYS load fully soon after login/arrival ... no matter if i have a cleared cache or not ...

My Setup:
Ubuntu Linux on an AMD64 with a NVidia 8600GS (512MB)
Using Windlight SL-viewer 79674

One possibility is that i am loosing it and am on my way to insanity (Which i cant exclude when it comes to this vwr-2404).

The other possibility would be that there have been some changes with "positive side-effects" on the impact of this bug.

Or is there a mechanism that checks if a texture matches a check-sum the server offers, AFTER loading the texture from cache ?
And reloads it from the server if it doesnt match ?

Just fishing in the dark here ... to sum it up:

I dont see the effects of this bug on my sculpties anymore since WL-79674 (all lossless 64x64 ... all easy to distinguish if loaded fully or not)


Qarl Linden added a comment - 15/Feb/08 08:23 AM
that's good news Theblack - although i'll hold-off celebrating just yet - we've been tricked by this bug several times in the past.

about textures smaller than 64x64 for sculpties - they are unsupported. i know some residents insist on using them - however they are on their own.


Seifert Surface added a comment - 15/Feb/08 08:29 AM
/me comes to spoil the party...

I can still repro by visiting the sculpties then going and flying around the mainland for 15 minutes then coming back. This is with both 64x64 and 128x128 lossless sculpties.

Second Life 1.19.0 (79674) Feb 8 2008 16:51:12 (Second Life WindLight)

You are at 189547.5, 240485.3, 63.2 in xyz located at sim3668.agni.lindenlab.com (64.129.46.179:13005)
Second Life Server 1.19.0.79368

CPU: AMD (Unknown model) (2400 MHz)
Memory: 2047 MB
OS Version: Microsoft Windows XP Service Pack 2 (Build 2600)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce Go 7950 GTX/PCI/SSE2/3DNOW!
OpenGL Version: 2.0.1


Qarl Linden added a comment - 15/Feb/08 08:40 AM
honestly Seifert - that's good news. otherwise i'd be left thinking the bug had magically fixed itself.

so now we go back to Sheet's investigations. he's found the culprit in the cache loading code - now we need to think of a way to fix it.


Hypatia Callisto added a comment - 15/Feb/08 12:26 PM
my experience is the same as Seifert - most of my 64 and 128 sculpts show recall errors from cache, save a few. The few that do not, always do not, and the ones that do (the majority) always do.

Aminom Marvin added a comment - 15/Feb/08 04:08 PM
This is not a small problem, but a major issue with sculpts. In my tests, a completely fixed lossless would allow for three times smaller file sizes at a bare minimum, and up to 20 times smaller file size.
Also, I'd like to see 32x32 images work well when lossless is fixed. They have their uses, either for the torus sculpt stitching type, or for sculpts that don't need to use the entire 33x33 vertex space.

Ariel Erlanger added a comment - 16/Feb/08 12:27 AM
Sculpted stairway texture useful for testing.

Ariel Erlanger added a comment - 16/Feb/08 12:27 AM
A few friends and I interested in the sculpty/lossless texture loading problem performed some experiments that may be of interest to this discussion. There is at least one problem in addition to cache loading. It turns out that, at least in the latest RC (1.19.0.2), some lossless textures that are on disk but not cached in the traditional sense will sometimes not load correctly. In this way you can prove that even though you have all the data of a texture, it's still not being "loaded" into SL correctly, probably because SL doesn't see a need to request more levels of texture detail. Along with that, textures downloaded over the internet also sometimes work and sometimes don't – it's not just the cache that has problems.

If you create a lossless texture and convert it to a JPEG2000 file, you can put this image into your skins/textures/ directory with the naming convention <texture key>.j2c. I've attached such a file to this thread, a very precise stairway that ideally should have perfectly sharp edges, which makes it a good test subject since any little errors show up as rounded corners and other obvious artifacts. Once you put that file in the textures/skins directory, SL will load this texture from your disk instead of asking the server for it, much like it does with your land permission icons, and it won't delete it when you clear the cache. Since you know you have the whole texture on your disk, you know that you ultimately have all the data for it, which makes it an interesting counterpoint to the regular cache loads.

Since there's apparently a strong random element for whether a texture loads correctly or not, my assistant and I ran a number of relogs in a controlled, high-altitude, low-texture environment, loading twelve lossless sculpted textures per trial, clearing the cache each time (and loading very few other textures). Five of the 12 textures were saved in my skins/textures folder, and therefore did not go in the normal cache; I was trying to load 7 textures per trial over the network. My assistant did not use the skins/textures folder, and attempted 12 textures over the network per trial. Each login we would note the textures that loaded fully and those that did not load fully. The restults:

RC 1.19.0.2:
81/91 network loads were successful (89%)
17/65 "skins/textures" loads were successful (26%)

WL 1.19.1.80044:
43/120 network loads were successful (36%)

Notes:

  • It seems like there has been an improvement between WL and RC, but not a complete fix.
  • Lossless textures transported over the network, even when they load successfully, take an extremely long time to download, particularly when you consider their relatively small size. It was commonplace during these trials to wait for 90 or 120 seconds for the last couple tiny textures to load completely.
  • When a texture fails to download completely over the network, it's also low-rez in the cache – in other words, the loss of detail isn't just a rendering problem.
  • In our controlled, low-texture environment, when we stopped clearing cache to reboot, the textures invariably loaded correctly after they had been cached, although this is definately not the case when you load them in a more complicated environment. It's our theory that the failures in loading from cache have something to do with loading a number of textures all at the same time – if the overall load is low it's easier to get successes.
  • It's also interesting that "skins/textures" loads try their best to load from the hard drive and decode simultaneously, in one giant chunk. Maybe this is a similar problem to the previous point: trying to push through a large number of textures at once causes failures?

Theblack Box added a comment - 16/Feb/08 07:22 AM
Observation:
WL 1.19.1.80044 is much worse than WL 1.19.0.79674 when it comes to lossless sculptie loading.

In WL 1.19.0.79674 this error could not be reproduced as easily as in earlier versions.
WL 1.19.1.80044 is horrible in this matter.

If there is any meaning and consequence behind the priority given to a bug in this JIRA, I would beg for giving this Issue a higher priority.

Very glad to see a few other people here having faith in Sculpties


Theblack Box added a comment - 16/Feb/08 07:28 AM
Added a proper Mesh-Texture that helps seeing Mesh-distortions.
(Also helpful for texturing when used as background-layer in PS/Gimp)

Ariel Erlanger added a comment - 16/Feb/08 12:44 PM
I guess it's worth adding that my experiment up above did demonstrate a temporary workaround, at least for people trying to design using sculpties. If you apply your sculpted texture to an object up somewhere high with nothing around, so there are few textures to load, and then relog without clearing your cache, you have an excellent chance of loading and rendering the sculptie correctly. That means, for that session anyway, you can at least work with your texture how it should look, even if nobody else can see it correctly at the moment. This has worked great for me in both 1.19.0.80044 WL and 1.19.0.2 RC.

I'd also like to second the suggestion to raise the priority of this issue, particularly since it's been open so long. Sculpties have gained a lot of traction in-world, particularly in shoes and other character attachments, and these continuing irregularities make it very difficult to design products that look okay from release to release, especially objects that combine more than one sculpty, or a sculpty and a regular prim. It's unfortunate from the consumer's point of view that the shoes they buy today might be unwearable in the next release, and of course that's disastrous from a designer's perspective. Until this issue is resolved it won't be possible to realize anything like the full potential of sculpted prims, transcending their early "organic-approximate-only" design goals.


Julia Faulkland added a comment - 17/Feb/08 06:53 AM
I think a fix to this is more important than the priority suggests. Sculpted prims are really taking off, and I myself have several completed projects that are shelved until this is properly resolved. The more detailed we make our sculpted prims, the more this bug kills them, and it's extremely frustrating to have such a powerful tool just out of reach because you can't really explain to residents why their product doesn't look at all the way it should. After a disappointing failed start, most people still don't understand the potential these would have if they were fully functional.

To confirm some information: My test results are similar to Ariel Erlanger's. Though there may be something to the cache loading, even a first-time load directly over the network can fail, suggesting that it's a deeper problem than that too. Testing this with friends, in the same world situation with the same sculpt maps, there seems to be no real pattern to who correctly loads a particular sculpt map or when, even with a clear cache. This has failed in both the RC (1.19.0 RC2) and Windlight (1.19.0.80044). Additionally, the sculpt map loading seems to fail at different points for different people, though most commonly it nears completion before completely halting.

It's also my experience that these transfers take an exceptionally long time. It can take several minutes before a full stall or complete and proper load for a simple 128x128 lossless texture, while a 512x512 lossy version of the same map loads in seconds. It's worth noting, however, that a fully loaded 128 lossless is far more accurate than a 512 lossy.


Ariel Erlanger added a comment - 22/Feb/08 11:48 PM
I think I've discovered and worked around at least one failure mode of this issue. By implementing the fix I'll describe below, I've been able to consistently and fully load lossless textures, and I've figured out what I think is the underlying problem. However VWR-2404 has proved so resilient that I don't want jinx it by saying I fixed everything, as promising as this workaround seems at the moment.

The problem I discovered occurs in LLImageJ2COJ::decodeImpl (in the file "linden/indra/llimagej2coj/llimagej2coj.cpp"). What happens is that when a decode is requested on a lossless texture with a desired discard level of 0 (meaning a full image), the OpenJPEG library sometimes messes up the decoding, and returns less-detailed layers in the raw, uncompressed image. Since the level that was actually received is never checked against the requested level, the image is assumed to have decoded correctly, the texture is considered completed, and the data that did decode is thus a lower quality than it should be, and no attempt is made to reload it unless the texture is removed from the viewer's list and subsequently reloaded (by teleporting away and coming back, for example).

Unfortunately I don't have access to the KDU library or the corresponding LLImageJ2CKDU class source, so I can't verify that the same problem is occurs there, and indeed the failure modes are a little different. If you compile your own viewer from source, using the open-source OpenJPEG libraries, you'll find that when textures fail to load completely they will often show up as smaller versions of themselves in the upper left-hand corner of an otherwise blank image, but that doesn't seem to happen in the commonly-available binary downloads (they just have a degraded quality without any geometry issues). I'm assuming that this is some cosmetic difference between the way the LLImageJ2CKDU and LLImageJ2COJ classes move the data from the library to the native LLImageRaw format or the way they resize the raw image. Also, though I'll describe my fix in detail, I'm not attaching a patch since the code will have to be rewritten for the KDU class anyway.

To fix this error, I basically just compare the discard level that OpenJPEG returns (one for each component) with the discard level that was requested. If any level is different (and one symptom of this decoding error is that sometimes you get back components with different discard factors in the same image) then I mark the decode as having failed and let SL re-request the texture. Eventually it does load correctly and fully. If the texture happens to be in your cache this doesn't take very much time. Conceivably this could create a situation where you keep trying to load the same texture over and over, only to have it fail each time, but I haven't actually seen that happen yet.

To implement my workaround, in the file "linden/indra/llimagej2coj/llimagej2coj.cpp", in the method "LLImageJ2COJ::decodeImpl()" I replace:

.
.
.
S32 f=image->comps[0].factor;
S32 width = ceildivpow2(image->x1 - image->x0, f);
S32 height = ceildivpow2(image->y1 - image->y0, f);
.
.
.

...with...

.
.
.
S32 f=image->comps[0].factor;
bool wrong = false;
for(S32 i = 0; i < img_components; i++) {
if(image->comps[i].factor != base.getRawDiscardLevel()) { wrong = true; }
}

if(wrong) { opj_image_destroy(image); base.mDecoding = FALSE; return TRUE; }

S32 width = ceildivpow2(image->x1 - image->x0, f);
S32 height = ceildivpow2(image->y1 - image->y0, f);
.
.
.

"base.getRawDiscardLevel()" is the requested discard level, and "image->comps[i].factor" is the discard level for component (that is, layer) #i that the decoder returned.
Changing base.mDecoding to FALSE and returning TRUE lets the calling function ("LLImageJ2C::decode", in "llimage/llimagej2c.cpp") know that the decode has failed and it takes care of invalidating it and so on.

Some additional notes:

  • This is not really a fix, since the real root of the problem is that the JPEG2000 library, at random, is incorrectly decoding lossless textures. Why that is I don't know; I'm tempted to look into the source of OpenJPEG, but since that doesn't have any apparent relevance to the KDU libraries actually being used for releases it seems like a waste of time.
  • Also, this might not really fix the problem in the release viewers, because of the different libraries. However I think that something very similar must be happening since the error modes are so similar, and also since I implemented my work around above, I have not seen any lossless sculptie textures fail to load – I haven't noticed any other failure modes, which would be expected if there were additional problems unrelated to this decoding issue.
  • These textures still load incredibly slowly considering their size, as mentioned by Julia Faulkland and myself above, and this fix does nothing to address that. It seems likely that whatever's causing that is in the host or the asset server.
  • The failure I found has nothing to do with the texture not being transported across the network, or being saved or recovered incompletely saved in the cache.
  • This fix seems to work for both the FL and the RC; I used the 1.19.0.79209 RC and the 1.19.0.80079 WL builds.

I would love to have someone re-implement my workaround and post if it was successful or not, so please give it a try! My machine specs follow in case that proves significant.

CPU: Intel(R) Pentium(R) 4 CPU 3.06GHz
Memory: 1009 MB
OS Version: Linux 2.6.23.15-80.fc7 #1 SMP Sun Feb 10 17:29:10 EST 2008 i686
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce 7600 GS/AGP/SSE2
OpenGL Version: 2.1.2 NVIDIA 169.09
LLMozLib Version: 1.1.0 (Mozilla GRE:1.8.0.12_0000000000)


Ariel Erlanger added a comment - 23/Feb/08 10:17 AM
A little photographic evidence, the "before" is taken with the new 1.19.0.0 RC3 (I'd heard a rumor that this issue was fixed in it, but that unfortunately doesn't seem to be the case).

Ariel Erlanger added a comment - 23/Feb/08 10:18 AM
...and this is taken with my fixed viewer. Sorry for posting twice, I just noticed the "attach multiple" files thing, lol.

Argent Stonecutter added a comment - 25/Feb/08 02:57 AM
The lossless version of the sculpted animated dolphin avatar TomHa Zymurgy and I are working on is never getting a full download when it's attached to an avatar, but it does work sometimes when it's not attached. Is there a different logic path for attachments?

Also, Qarl, I would REALLY like to make another request for a sculpt texture animation. The dolphin is an 8 frame animation, and will never be able to be animated with a stream because, well, it's attached to an avatar and can't be restricted to a parcel and, in addition, I don't think it could be salable as a product if it depended on a streaming server to be up to make it work. We NEED a way to get short sculpted animation loops without continually reloading textures, and using the same model as texture animation would make it possible to get the surface and texture animations to automatically sync.


Qarl Linden added a comment - 27/Feb/08 01:31 PM
hey Ariel - thanks for the detective work.

if my understanding of this issue is correct - what happens is that the jpeg library doesn't get all of the file data out of the cache - which may result in the incorrect discard level being returned. you code detects this and throws-out the data, thereby triggering a reload from the server.

i think your code is a good idea - but isn't a perfect fix in-that we want the cache to work.

i'll know more next time i get a chance to dig into this work.


Ariel Erlanger added a comment - 28/Feb/08 03:39 PM
Hi, me again, just verifying for the record that this is not fixed as of today's 1.19.0.4 release, despite the fact that VWR-2404 is listed as a "fix" in the release notes wiki (https://wiki.secondlife.com/wiki/Release_Notes#Release_Notes_for_Second_Life_1.19.0.284.29_February_28th.2C_2008). I was able to witness lossless textures incompletely loading in much the same way as our previous experiences.

Also, thank you for the response Qarl. If what you're saying is correct that would certainly explain why similar errors were being experienced using two different decoder versions. When I have time, if there isn't a fix in place by then, I'll explore what data exactly the decoder is trying to decode and maybe try to zero in on what's going wrong between the cache and the decoder. However I would like to see my workaround implemented anyway for the following two reasons:

1) It might take a good long time to get that perfect cache fix in, if that indeed turns out to be the problem. Since my workaround does in fact give the user the experience of correctly decoded sculpted textures, albeit not the optimum solution one would like to see, and also since this item has been outstanding for so long, having any kind of fix in place, even a suboptimal one, seems like a good idea and would definitely improve the end-user's experience.

2) My workaround does something useful beyond just sculpties – it rejects incompletely decoded textures, instead of cheerfully approving of them. This is probably a good idea in its own right, lossless sculpty textures aside. So this isn't just a hack or a band-aid explicitly for VWR-2404 and with no other purpose, and when the real fix is implemented there won't be any need to remove my workaround.


Qarl Linden added a comment - 28/Feb/08 03:50 PM
Ariel - you sold me. i'll try to get some time next week to apply your patch.

Seg Baphomet added a comment - 04/Mar/08 11:38 PM
Hello, OpenJPEG Czar here. Quoting Ariel Erlanger:

>>> This is not really a fix, since the real root of the problem is that the JPEG2000 library, at random, is incorrectly decoding lossless textures. Why that is I don't know; I'm tempted to look into the source of OpenJPEG, but since that doesn't have any apparent relevance to the KDU libraries actually being used for releases it seems like a waste of time.

No, there is no random bug in OpenJPEG. As I explain in VWR-1815, I have confirmed for 100% certain that the root of the problem is OpenJPEG is being given a truncated codestream, it is not being given the data it needs to decode the resolution level that has been requested. It is impossible for it to accomplish what the viewer wants from it. Arguably it is a bug that it doesn't recover more gracefully from this error condition, but the fact remains the viewer is asking for something that is impossible.

This bug is in common code. KDU is in the exact same situation. The difference is, KDU seems to be able to recover from this error condition more gracefully. I'm guessing it's probably just dropping down to the next lowest resolution level that's available in the codestream. Thus the "lossy lossless textures" seen in this bug.


Qarl Linden added a comment - 06/Mar/08 11:08 AM
Seg - i believe you are 100% correct - but that's what we said in the comments just before yours, no?

Nizzy Lusch added a comment - 06/Mar/08 11:54 AM
Attached goodstairsbadstairs.jpg, snapshots taken today. The sculpt map is a 64 x 64 lossless which always renders correctly after a fresh upload and (almost) always renders incorrectly on 2nd view and beyond.

In my experience with above, the bug seems unchanged since initially reported. :|

-------------------------------------------------------------
Second Life 1.19.0 (80044) Feb 15 2008 16:46:46 (Second Life WindLight)

You are at 256175.7, 288564.9, 31.2 in Bagoombah located at sim4176.agni.lindenlab.com (63.210.157.80:12035)
Second Life Server 1.19.1.81132

CPU: Intel Pentium 4 (Unknown model) (3192 MHz)
Memory: 2046 MB
OS Version: Microsoft Windows XP Service Pack 2 (Build 2600)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce 7800 GTX/PCI/SSE2
OpenGL Version: 2.0.3
LLMozLib Version: 1.1.0 (Mozilla GRE:1.8.0.12_0000000000)
Packets Lost: 29/537352 (0.0%)


Aminom Marvin added a comment - 06/Mar/08 04:59 PM
Ariel Erlanger has a modded client with this fix. I threw the most difficult-to-compress, complex 32x32 and 64x64 sculpts at her. They rendered perfectly, which was confirmed via snapshot. This is a true (if non-ideal) fix! Many thanks to Ariel for taking the time to provide a fix- all of us sculpt designers are in your debt
A related issue is loading priority for sculpts. Would it take much development time to increase the loading priority for 64x64 pixel images and below? It seems now that lossless has a fix, this would be something great to add- sculpts should load in a couple of seconds at most.

Nizzy Lusch added a comment - 07/Mar/08 04:04 AM
Oh I absolutely agree. Most often the color texture loads before the sculpt map even though it's a much bigger file. For this reason I only use sculpties when I absolutely have to, and never on attachments, because looking like the Michelin Man for several minutes makes a bad first impression :o

Melodee McMillan added a comment - 07/Mar/08 12:14 PM - edited
Just downloaded and installed the 1.19.1 Release Candidate. The caching bug is still present in this viewer. Editing the prim and double clicking the sculpt texture does seem to load the full texture though, but not always.

Second Life 1.19.1 (0) Mar 5 2008 17:51:19 (Second Life Release)

You are at 238812.3, 290583.7, 701.2 in Envy located at sim5624.agni.lindenlab.com (8.2.34.180:12035)
Havok4 Beta Server 1.19.0.80517

CPU: Intel Pentium 4 Northwood (3006 MHz)
Memory: 1535 MB
OS Version: Microsoft Windows Vista (Build 6000)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce 7900 GS/AGP/SSE2
OpenGL Version: 2.1.2
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.13510 (Mozilla GRE version 1.8.1.11_0000000000)
Packets Lost: 942/113391 (0.8%)


Melodee McMillan added a comment - 07/Mar/08 12:32 PM
My 1-prim jet engine only displays correctly on a fresh load. Loading it from cache leaves it in a "melted" state.

Theblack Box added a comment - 13/Mar/08 12:12 AM
Please include the fix before 1.19.1 Main Viewer Release in 2-3 weeks if anyhow possible.
This bug is now half a year old.

This and the low loading priority ( http://jira.secondlife.com/browse/VWR-3798 ?)
are the most urgent issues around Sculpties.

Just having lossless 64x64 sculpt-textures loading correctly and fast would lessen our pain very very much.
Please, please, please consider giving these 2 issues a higher importance than implementing new features.
I dont want to be a pain, I just want to make sure it is understood that these 2 issues make Sculpties a pain for all who seriously attempt to create or use them.

Am i being a cry-baby ? I hope not.

Cheers


JimmyJ Sands added a comment - 13/Mar/08 03:13 AM
I agree with Theblack Box - There are so many cool things that can be done with non-sloppy sculpties that have been just sitting on the shelf gathering dust for a half a year now. After a while, making colorful blobs becomes real old.

Leben Schnabel added a comment - 14/Mar/08 02:57 AM
Just a quick update: the bug is still present in 1.19.1 (1)

Also, I'd like to re-stress that, at least for me, the bug is always only visible in the highest LOD level (the fact has been mentioned in the former comments, but it seems a bit "hidden" to me). The effect is illustrated in a screenshot here:

http://forums.secondlife.com/attachment.php?attachmentid=47064


WarKirby Magojiro added a comment - 16/Mar/08 05:47 AM
Might this be the cause of VWR-3922 ?

I think I'm seeing this now. Some things just refuse to load after loading once on initial upload.


Argent Stonecutter added a comment - 16/Mar/08 06:22 AM
I don't think this is the cause of VWR-3922. The textures there are not loading at all... they're staying spheres... and they include textures I've never loaded before lik ethe giraffe neck and head pieces in the photo I attached.

Qarl Linden added a comment - 16/Mar/08 06:36 PM
hey all - i spent today looking at the issue - i have some bad news and some good news.

bad news: Ariel's patch doesn't work with our kdu jpeg library. it does work with openjpeg - but kdu must not return proper results when decompression fails.

good news: Sheet's patch does work. after a bit of testing - it seems that lossless textures load from the cache perfectly well. (there is an infrequent case where they might not - but the good news is Ariel's patch above nicely covers that case.)

so - good work all around. kudos. i've checked these patches into our maint-render-2 branch. i'll post here again when i know the timeframe for its merge to release.


Qarl Linden added a comment - 16/Mar/08 06:37 PM
also - since this bug has been incredibly difficult to kill (reappearing with regrown heads, etc.) - i'm leaving this JIRA open until the community has a chance to verify it's been fixed.

Theblack Box added a comment - 17/Mar/08 03:57 PM
Thanks a lot Qarl.

Another thing that might need your attention, and another hydra-bug which has been marked as resolved and reopened again in the meantime, is http://jira.secondlife.com/browse/VWR-3798

Let me be blunt.
The comment given when that VWR got prematurely closed leads me to the conclusion that atm there is no "Sculptie Department" in LL.
Am I correct to assume that the "Sculptie Department" basically is .... Qarl Linden ?

Qarl does good work and i am sure he does his best to help us sculptors and sculpt-tools makers, but wouldnt you say that Sculpties are important enough for assigning some more WoMan-Power ?

I would love to see Qarl as the head of a 3-5 Person Sculptie Team.
I am aware of my narrow point of view on Linden Labs, and i am sure it isnt just as easy as i make it here ... but i hope you catch the drift whatsoever.

More here: http://jira.secondlife.com/browse/VWR-5647


Seg Baphomet added a comment - 18/Mar/08 01:06 PM
I've just tried Ariel's fix with 1.19.0.5 and OpenJPEG 1.3. It has no apparent effect. In fact, the test condition does not ever get triggered. Note that OpenJPEG 1.3 has changed the way resolution discard is done, their fix may work with 1.2 but it does not seem to work with 1.3.

So the bug remains. The only effective workaround I know of is this one:

— linden.orig/indra/llimage/llimagej2c.cpp 2007-11-07 20:18:06.000000000 -0600
+++ linden.patched/indra/llimage/llimagej2c.cpp 2007-12-05 13:14:53.000000000 -0600
@@ -310,7 +310,7 @@
//static
S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 rate)
{

  • if (rate <= 0.f) rate = .125f;
    + if (rate <= 0.f) rate = 0.5f;
    while (discard_level > 0)
    {
    if (w < 1 || h < 1)

It's a hack but it works.


Carjay McGinnis added a comment - 23/Mar/08 03:36 PM - edited
Hm, the "public" maint-render-2 branch added a fix in rev 370 that is referenced as being a fix for VWR-2404 by Sheet Spotter.

Afterwards, I needed to apply this patch:

Index: lltexturefetch.cpp
===================================================================
— lltexturefetch.cpp (revision 386)
+++ lltexturefetch.cpp (working copy)
@@ -609,7 +609,7 @@
{
mCachedSize = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0;
// Successfully loaded

  • if ((mCachedSize >= mDesiredSize) || mHaveAllData)
    + if ((mDesiredSize && mCachedSize && (mCachedSize >= mDesiredSize)) || mHaveAllData)
    {
    // we have enough data, decode it
    llassert_always(mFormattedImage->getDataSize() > 0);

or else a texture that is already in the cache but too small to fit the requested discard level will lead to a permanent loop since the texture fetch worker will simply try to decode the cached image over and over, stalling the whole texture download process.

A more thorough explanation: mDesiredSize will become 0 if the "sentinel" value is sent, thus the condition is triggered and the DECODE_IMAGE-state is reached. The voodoo calculation which discard level can actually be reached with the amount of data present will only happen later but at that point we are already decoding the image so the reached discard level is simply returned to the texture fetch worker which subsequently goes to INIT state again.

I wonder if this has already been fixed internally since you can hardly miss it (especially if you use the debug version as it segfaults in one of the "llassert_always"-conditions in this case.

I am not sure if this applies to other branches as well.

I am also not sure if my patch has side effects since there are a lot of assumptions made in the code by checking magic values.

I also did only test it on the Linux x86_64 platform with OpenJPEG1.3.


Qarl Linden added a comment - 25/Mar/08 12:13 PM
yeah - we noticed that bug too.

happily, Steve Linden, our texture pipeline guru, found a nice fix. again - no promises, but i'm betting we have this finally fixed.


Theblack Box added a comment - 03/Apr/08 02:14 AM
Update:

the bug is still present in the new 1.19.1.4 (Main Viewer)

When will this fix be found in a RC Viewer ?
When will this fix be found in a Main Viewer ?


Theblack Box added a comment - 18/Apr/08 12:50 PM
WOOT

Fix-deployment seems to be scheduled for 1.20 RC2 !
Lets all fold our hands and prey to all gods there might be.

Almighty random chance, let this be the last time we ever see a vwr-2404 in an update-notice and have mercy on those who want precise complex sculpties.

Amen.


WarKirby Magojiro added a comment - 23/Apr/08 06:18 PM
http://blog.secondlife.com/2008/04/23/new-release-candidate-viewer-120-rc3-available/#comment-601348

Fix APPARENTLY deployed in the new 1.20.0 RC3 .

Can all you guys confirm if this is really fixed?


Ariel Erlanger added a comment - 23/Apr/08 09:41 PM
I'm sorry to be the bearer of bad tidings but I can confirm that this is not fixed in 1.20.0 RC3. It seems to exhibit the same failure modes as before. I have attached an example screenshot: the texture in the upper left has loaded correctly with crisp edges. The texture in the upper right should look very similar, but unfortunately it has visible artifacts. The bug apparently behaves about the same as it always has but I don't have time right now for more investigation. Two more files are attached which are just screen captures of the object dialog. It's clear that the correct one is sharp and nice while the failed one is missing at least one discard level.

Theblack Box added a comment - 24/Apr/08 02:21 AM
Correct ... it is not fixed at all.
Loading lossless from cache remains borked ...

It is extremely simple to reproduce.

This is getting slightly rediculous isnt it ?


Trybil Timeless added a comment - 24/Apr/08 05:36 AM - edited
Re: 1.20.0 RC3

With limited testing (3 logins and viewing 4 different sculpties) it seemed to be fixed for me. No instance of the lossless bug in this testing, which is significantly better than before.

I did notice that some sculpties took a while to load however, during which time the LOD was a notch or two low, but they eventually popped into a clean form. (Within a minute).

So for some scenarios there seems to be some improvement at least. I am not happy to hear that it doesn't seem to be 100% fixed, though.

Edit:

More testing. 3 more logins, 6 different sculpties, different computer (lower end laptop). Saw one instance of lossless bug. Before this RC, I would have seen several instances for sure. So it is statistically less likely, but still there. Argh.


Qarl Linden added a comment - 24/Apr/08 01:36 PM
Box sez:

> This is getting slightly ridiculous isnt it ?

slightly? no. extremely.

i'm sorry guys. i understand your patience is wearing thin. so is mine. let me see what i can do, and i'll get back to you as soon as i know more.


Moon Metty added a comment - 24/Apr/08 03:47 PM
I made a link to VWR-6460 , another 32x32 problem with a 64x64 workaround.

Many problems could be avoided if sculpties weren't uploaded as textures. A sculptie may have the format of a texturefile, but all similarities end there. If a sculptie would have its own in-world type, it could load with a higher priority, and with a different compression/encryption algorithm. Existing texture-type sculpties would still be valid (and oversized).

All it takes is an extra menu option and a new icon ... and to code it all


Seifert Surface added a comment - 24/Apr/08 08:44 PM
Still broken in RC4: 1.20.4 (85828)

Repro is the same: go and fly around the mainland for 10 minutes or so, come back and the sculpty (sometimes) doesn't load up properly again.

CPU: Dual i386 (Unknown) (2600 MHz)
Memory: 4096 MB
OS Version: Darwin 9.2.2 Darwin Kernel Version 9.2.2: Tue Mar 4 21:17:34 PST 2008; root:xnu-1228.4.31~1/RELEASE_I386 i386
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: NVIDIA GeForce 8600M GT OpenGL Engine
OpenGL Version: 2.0 NVIDIA-1.5.26
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.14669 (Mozilla GRE version 1.8.1.13_0000000000)


Day Oh added a comment - 25/Apr/08 01:47 AM
Does this issue have something to do with the way small images (128x128 or less) are failing to download fully most of the time (large images around them download fully but the smaller ones stay blurry)? Every once in a while the small images do download fully. Please advise

Theblack Box added a comment - 25/Apr/08 08:16 AM - edited
No Day Oh.

Currently this VWR-2404 is about lossless textures not being loaded correctly FROM CACHE, due to a wrong filesize assumption.

But the problem you describe I have noticed too. Small textures in some cases wont load fully at all, specially with lots of other bigger textures being around. A good place to see that in effect is the Sculpt Studio display at CMP 4 (60,130,24)

It is currently a bit difficult to point the finger onto something specific due to this VWR-2404 and VWR-3798.

I personally think that behind VWR-3798 is a nasty bug in the texture-pipeline which also causes small textures not to load fully at all in some cases, no matter how long you wait for it.

Edit:

(just in case vwr-2404 is aound much longer)

The workaround for vwr-2404 is to resize the Sculpt-Texture.
Resizing to 128x128 (in some cases 256x256 uploaded with SLImageUpload) using the resize-method Nearest Neighbor (Photoshop), No Interpolation (GIMP) or Pixel Resize (Paintshop Pro) will make a small, hard to compress lossless texture into a bigger one that is easier to compress lossless.
This way you can make a texture where the (wrong) filesize assumption can be satisfied.
This also seems to give the sculpt-texture a higher priority for loading which will make it rez/load faster.

This workaround is of cause NOT good practise because you end up having rediculously large textures for transporting only a little information.

When Sculptie-bugs are fixed 64x64 Sculpt textures are supposed to be optimal to the best of my understanding.


Winter Ventura added a comment - 25/Apr/08 12:33 PM
recent Release Candidate notes suggest that SL will soon officially support "non-powers-of-two file dimensions, which means we could finally see the much coveted 32x33 image.

Is there hope for support for 32x33 and 16x17 and 8x9?


Funk Schnook added a comment - 25/Apr/08 09:04 PM
You know I understand how difficult some bugs can be to fix, but this issue has been open for 7 months. Its just beyond a joke now.

Theblack Box added a comment - 28/Apr/08 07:22 AM - edited
Observation on further RC4 testing:

Repro by relogging (whithout clearing cache) does not work for me anymore. (Whenever i relog everything loads alright it seems)

Repro by flying around the mainland for 10 minutes (or just any Sculpty-rich place) and then coming back to the sculpty, still works. (As Seifert describes it above)

Edit: relogging doesnt fix wrongly loaded sculpties ... but if they were ok before relogging, they also seem to be ok after.


Aminom Marvin added a comment - 28/Apr/08 02:08 PM
Error 2404 bugfix not found

eazel allen added a comment - 29/Apr/08 04:38 PM
Update I have the bug back again but this time it took a few days to appear .LOL next time ill wait a few days before sayin mines fixed its so hard to tell with this erractic bug.

Trybil Timeless added a comment - 30/Apr/08 03:10 PM
Same here. After my initial optimistic post, the bug seems to have come back in force. It either is much more sporadic or it gradually builds up somehow, regardless of whether you clear your cache.

Please fix. SL is about creative people adding to the content and richness of the world. This bug is draining the enthusiasm of many of its most creative contributors.


Mifune Thibaud added a comment - 02/May/08 08:26 PM - edited
>>Edited 00:39PST Re: SLImageUpload not allowed to log into SL servers<<

Comment deleted, SLImageUpload appears to be allowed to log into SL again.

Note: While 3rd party should never be necessary for something to work properly, SLIU produces the desired results that everyone has been desiring out of the LL client software...that is, proper LOD, fast loading. Uploaded with RC5, LOD in uploaded lossless sculpts @ 128x128 is still low upon relog and it still takes a significant and unacceptable amount of time to load the sculpt map in comparison to things uploaded with SLIU. Im not in the position to hypothesize what the differences are, but the results are there.


Julia Faulkland added a comment - 02/May/08 09:11 PM
VWR-2404 has nothing to do with SLImageUpload. Third party software is not (and should never be) required to upload a proper lossless sculpt map. Thorough research by Qarl Linden and many of the posters in this issue have led to the conclusion that the bug is not related to uploading, so SLImageUpload is neither required nor helpful. Once a proper fix for this is in place, previously uploaded "broken" sculpt maps should all function correctly.

The lack of a working fix in the latest RC is disappointing. Understandably this is a very complex and difficult bug... however I think part of the frustration many of us feel is due to the fact that we appear to have one person, however dedicated, working on this bug part-time... which suggests that despite Qarl taking it very seriously, it's not much of a priority for LL. This is a very tricky bug that's been with us for many months, and if anything can be done to raise the priority and get extra resources on this fix, I'm sure it would be much appreciated by SL's sculpt developers.


Unreal Mccoy added a comment - 03/May/08 07:03 AM
Instead of having lossless sculptmaps, would it be possible to use the sound asset to store a sculpty?

The great thing about this would mean that sculpties could have 16 bit precision and there still wouldn't be any need for a new asset type.

We could still have the option to use compressed images to store sculpties too.

Instead of having a lossless option in the upload image preview panel, we could click on the sculpty edit window and have it display image and sound assets within our inventory for sculpty usage.

A new primitive type may need to be added. Or perhaps it would be possible to let the client determine the asset type specified in the map field.

Is this a crazy idea?

Or maybe just a little-too-late idea?


Seg Baphomet added a comment - 03/May/08 12:42 PM
The JPEG2000 format is perfectly capable of up to 32 bit accuracy. There is no need for such hackery.

Sigh, do I have to fix this bug myself?


Qarl Linden added a comment - 03/May/08 01:00 PM
go for it Seg - you'll be quite the hero.

Aminom Marvin added a comment - 06/May/08 03:37 AM
I'm sorry, but I've lost my patience. Since October we've been told repeatedly that a resolution to this issue is soon in coming. We see delay after delay. We've tried in-world notecard and JIRA voting drives, demonstrations of just how bad the bugs involved are, and appeals to Lindens. We see no progress, and in fact things are even more borked now because the "partial" sculpt loading fix makes things worse, and Windlight introduced a new loading bug (VWR-5785) that severely impacted a lot of content.

How bad is this bug? Getting lossless to work AT ALL requires a huge effort, using numerous hacks and tweaks. It is so bad that many sculpts actually require 256x256 lossless images, which are only able to be uploaded by SL Image Upload, a resident-created client. Using 256x256 images, files can be 8-20 TIMES larger than they should be. That is more bandwidth wasted for both users and LL, and needless use of texture memory. Aggrivating this is VWR-3798, the loading priority bug, and the two combine together to make sculpts take ages to load where it should be only a couple of seconds, if that. Until these things are fixed, sculpts will be little more than a novelty, instead of the most powerful building tool in SL, which it has shown itself to have the potential to be.

There's many people in SL that make livings working with sculpted prims. So, I think it is far to ask questions: what resources is LL allocating to fixing the three major sculpt bugs (this JIRA, VWR-3798 and VWR-5785)? When can we actually expect fixes for these issues?


WarKirby Magojiro added a comment - 06/May/08 01:17 PM
Go Seg. I really hope he can fix it.

This bug is becoming very depressing


uchi desmoulins added a comment - 06/May/08 02:55 PM
I'll put 100USD on the table for anyone (whom isn't a Linden) who can fix this bug. The conditions being that the sculpty doesn't take ten times as long to load (like the current 'fix' works), and that it works for resolutions such as 32x32 and lower as well.

Anyone want to add to the pot?


RobbyRacoon Olmstead added a comment - 06/May/08 03:41 PM
I'd be willing to throw in half of that (50USD, paid in L$ equivalent), if I believed it had a chance of success, but I'm extremely doubtful. As nearly as I can tell, LL is no longer accepting open source patches, and additionally I wonder how much of the problem lies on server-side.

Theblack Box added a comment - 07/May/08 06:46 AM
I add another 30000 L$ to the pot described by uchi, but will only pay out after i myself checked and confirmed that the fix really does fix the problem AND it needs to be found in a released Viewer version (RC or main).

My part of the pot can be earned by either an individual person who develops the fix or by a group working on it as a team.

And i fully agree with Aminom that "something" got worse.
The assumption that this bug only appears when loading fom cache is no longer true it seems.


Celierra Darling added a comment - 07/May/08 09:30 AM
RobbyRacoon: LL seems to still be accepting patches. Qarl's comment above ("go for it Seg") suggests the same, too.

RobbyRacoon Olmstead added a comment - 07/May/08 09:48 AM
@Celierra - I hope you are right. I don't have any personal experience trying to provide a patch, so I'm going by what others say who have, such as Nicholaz Beresford (http://nicholaz-beresford.blogspot.com/2008/04/moment-of-truth.html) : "There was a time when code submissions were readily accepted, then they were more and more cherry picked and these days, as far as I can tell, they are ignored at large, even if they are addressing the most basic and obvious problems like crashes (and I am not at all speaking of GUI changes)."

/me loves Qarl for giving us sculpties in the first place, but his comment above is more vague about whether a patch would be accepted than I'd like, and could even be taken as a snarky reply by some (text is a poor medium for communication, isn't it?)

But okay... I'll throw in 50USD worth of L$ to any third party that successfully implements a fix, gets the fix approved by The Lab and integrated into a release viewer, and can demonstrate credit for it. I'd certainly be willing to offer more under normal circumstances, but with all of the in-world problems that we've seen lately my sales are abysmal and that's the most I can confidently say I'll have available.


Fenrir Reitveld added a comment - 13/May/08 04:32 PM
Yes, this bug has been in the system far too long.

Sculpties are an awesome hack in the system; Kudos to Qarl for introducing the idea and then implementing it. It's a great way to get UV-mapped vertex objects without having to introduce a whole new kind of prim. I knew sculpties would be big when I was tipped off to the idea a while ago.

However, shame on you for letting this slide as long as it has! As it is now, sculpties don't work in the client. RC or regular. And "sometimes works" is not good enough.


Qarl Linden added a comment - 13/May/08 08:06 PM
> However, shame on you for letting this slide as long as it has!

Fenrir - you'll get no argument for me. i feel very ashamed we've let this bug persist for as long as it has.

i believe we have a fix for it. rather than let the fix go through the QA and release cycle (taking up to a month sometimes) i'm attaching it here as a patch. (lossless.patch). i'd very much appreciate it if someone from the open-source community could test it and make sure we've gotten a good fix (rather than the bad fixes we're provided thus far.)

FINGERS CROSSED.


WarKirby Magojiro added a comment - 13/May/08 08:46 PM
wonderful

Can someone compile and distrivute a viewer with this patch, so those of us who don't know how to compile can test the fix ?


Seg Baphomet added a comment - 13/May/08 11:15 PM
This seems relevant:

http://wiki.secondlife.com/wiki/Texture_Pipeline_Improvements

I haven't tried this latest patch, but everyone here has seen that simple patching has failed to fix this so far. Quite frankly, the entire texture download/cache/decode pipeline is total crackrock. The entire thing needs to be ruthlessly rewritten from top to bottom. This is not simple, or even fun work, but I'm convinced this is the only way this is going to get truly fixed. Unfortunately the crackrock-ery seems to extend through the client-sim protocol and into the simulator code, both of which are currently out of the hands of open source developers. So at best us open source people are still stuck hacking around the brokenness in that part of the system, until Linden Lab opens the sim source, or fixes it themselves. Michelle2 Zenovka is apparently way ahead of me on this, over on VWR-1815 there's some patches if anyone's feeling adventurous. I haven't gotten around to trying them, for now I'm just happy to no longer have a mangled map thanks to the recent OpenJPEG fix.

Hopefully this "Texture Pipeline Improvement" project is exactly this needed rewrite. But we're all already pretty sick of waiting on Linden Lab to fix this, aren't we?


Qarl Linden added a comment - 14/May/08 05:45 AM
Seg - i understand your skepticism - but please, don't decide the patch doesn't work without even testing it.

> Quite frankly, the entire texture download/cache/decode pipeline is total crackrock.

you'll get no argument from me there - that's certainly the main reason this bug has so-far resisted all attempts to fix it.

on the brighter side - we have a plan to switch our texture pipeline to use http instead of the existing oddness. last i heard, it's considered extremely high priority - to be executed sometime in the next two quarters.


Seg Baphomet added a comment - 14/May/08 09:46 AM
Well what I'm trying to say is, even if the patch does work, the code is in such a state that any simple patching around the problem is just slapping band-aids over the real problem. There's already been plenty of band-aids slapped over it already. This activity just makes the code worse in the long run, not better. It will just break again in the future. The thing needs a re-write and we all know it.

Ariel Erlanger added a comment - 15/May/08 03:40 PM