|
|
|
[
Permlink
| « Hide
]
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?
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.)
Example of bitmap which does not upload lossless properly in SL RC 1.18.3(4)
Example of 128x128 which doesn't seem to upload losslessly
Example of lossless upload issue; same texture uploaded with SLImageUpload vs "upload lossless" with RC 1.18.3(4)
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. 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. 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! that would seem to suggest that the lossless sculptie maps are being re-encoded.
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 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. 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.)
The plot thickens.
1. As I said, opensim displays the sculpt map correctly after uploaded then applied to the prim. 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. 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 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. 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. I have now attached the original sculptie 64x64 image (buckle-004-003.bmp) used in the tests above
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." @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) 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.
@Qarl: Ah ok
Id like to narrow down why some of your tests come up perfectly lossless. It must have something to do with file sizes? 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.)
@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 "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. OK Qarl I'm having some success with this method:
1. render a 64x64 sculpt map 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 kk guys - i think we got this one solved. patch is being tested by QA now.
Great to hear Qarl. Eager to test it out
Will the fix for this be included with the upcoming rolling restart to fix
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.
Qarl, please make sure its in an RC so we can poke it first
What was the fix? I've been trying to nail down
don't think they're related Seg - the problem was that the client wasn't downloading the entire image file.
Could someone confirm whether the fix to this issue is included in the 1.18.4 release candidate?
Varon - yes, the 1.18.4 RC has the fix. enjoy.
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) No fix appears to be present, problem still occurs. yeah, i just noticed that too - i'm tracking down why the change didn't get into the RC...
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. Confirmed issue still relevant with latest Release Candidate Viewer (1.18.4(0))
DanielFox - don't re-open the issue. it remains fixed-internally.
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. 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 Is there any progress on this. I have a bunch of projects just waiting for it.
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. .
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
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 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.
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.)
Not fixed in 1.18.5 RC. My attached bitmap (buckle-004-003.bmp) still looks wrong
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. 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 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. 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 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. 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
Yeah, SLImageUpload produces even worse results...
Oh well. 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.
JimmyJ - i cannot help you unless you provide more information - the image file in question for example.
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. Small sculpt-texture and snapshot of incorrectly-rendered sculptie.
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.
64x64 is working perfectly for me now. Thanks Qarl!
(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.
(Seems like I spoke too soon, the above comment goes with the hilbert_sculpty_bad_compare.jpg image).
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. 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 So, the questions are: Where they got so distorted, when it will be fixed, and most important - I know for sure, 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. 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?] 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 @Salid Sewell : This issue affects all textures, not just sculpties.
Note that the edge of the buckle below the pin is bent inwards
Note how the edge under the tip of the buckle is bent outwards
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.) 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.)) 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. 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. 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. 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. 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 ! Sheet spotter! Way to go! Lets get this show on the road!
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. 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. vwr-2404 partially fixed in 1.18.6 and 1.19 based SL-viewers
UPDATE:
New WindLight Viewer (79674) It appears to me like the bug has either been fixed or the effects have been reduced dramatically. 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?
Follow up:
After some testing with Aminom Marvin and Cel Edman we are having mixed results. But for some reason .... something changed in the effects this bug is causing since Windlight-79674. 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 ...) My Setup: 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 ? 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) 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. /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) CPU: AMD (Unknown model) (2400 MHz) 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. 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.
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. Sculpted stairway texture useful for testing.
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: WL 1.19.1.80044: Notes:
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. 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 Added a proper Mesh-Texture that helps seeing Mesh-distortions.
(Also helpful for texturing when used as background-layer in PS/Gimp) 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. 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. 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
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: . ...with... . if(wrong) { opj_image_destroy(image); base.mDecoding = FALSE; return TRUE; } S32 width = ceildivpow2(image->x1 - image->x0, 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. Some additional notes:
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 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).
...and this is taken with my fixed viewer. Sorry for posting twice, I just noticed the "attach multiple" files thing, lol.
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. 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. 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
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 Ariel - you sold me. i'll try to get some time next week to apply your patch.
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 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. Seg - i believe you are 100% correct - but that's what we said in the comments just before yours, no?
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. :| ------------------------------------------------------------- You are at 256175.7, 288564.9, 31.2 in Bagoombah located at sim4176.agni.lindenlab.com (63.210.157.80:12035) CPU: Intel Pentium 4 (Unknown model) (3192 MHz) 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. 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
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) CPU: Intel Pentium 4 Northwood (3006 MHz) My 1-prim jet engine only displays correctly on a fresh load. Loading it from cache leaves it in a "melted" state.
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 Just having lossless 64x64 sculpt-textures loading correctly and fast would lessen our pain very very much. Am i being a cry-baby ? I hope not. Cheers 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.
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 Might this be the cause of
I think I'm seeing this now. Some things just refuse to load after loading once on initial upload. I don't think this is the cause of
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. 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.
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. 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. More here: http://jira.secondlife.com/browse/VWR-5647 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
It's a hack but it works. Hm, the "public" maint-render-2 branch added a fix in rev 370 that is referenced as being a fix for
Afterwards, I needed to apply this patch: Index: lltexturefetch.cpp
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. 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. 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 ? WOOT
Fix-deployment seems to be scheduled for 1.20 RC2 ! 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. 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? 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.
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 ? 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. 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. I made a link to
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 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) 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
No Day Oh.
Currently this 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 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. 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. 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? 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.
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. Error 2404 bugfix not found
Update I have the bug back again
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. >>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. 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. 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? 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? go for it Seg - you'll be quite the hero.
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 (
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 Go Seg. I really hope he can fix it.
This bug is becoming very depressing 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? 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.
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. RobbyRacoon: LL seems to still be accepting patches. Qarl's comment above ("go for it Seg") suggests the same, too.
@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
/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. 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. > 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. 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 ? 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 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? 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. 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.
Hello! I did manage to apply this patch to the latest source I could get, which was RC 1.20.6 build 86487 (although I had to use the libraries from 1.20.2 build 85278 to get it to compile). I have now been stressing it out with hundreds of lossless textures for about an hour under varying conditions, and I have not managed a single load failure, although it still takes a really long time to get lossless ones over the network, and there is still that bug where you sometimes have to highlight the prim for it to "pop" from a sphere to a rendered sculptie. I'm going to use this viewer for a while and I will post if anything goes kooky with it later on.
Long story short, I think it works. Thank you very much, Qarl! It even completely loaded a lossless 32x32 texture! That's never happened before! Oh god, please get this into the next RC ASAP.
Ariel Erlanger: "..although it still takes a really long time to get lossless ones over the network,"
Arrrrgh!! I've been monitoring this problem for quite some time now because I was hoping the solution would also fix the issue of lossless sculpties taking far too long to appear on their initial download. I can now rest knowing that the issue is a totally seperate one.
Bye cruel (virtual) world!
I guess I have to withdraw my excitement. I tried out the patch for myself and it failed to load 32x32 textures.
On line 1357 of lltexturefetch.cpp, I changed desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, desired_discard) to = MAX_IMAGE_DATA_SIZE instead, and THAT worked, but was obviously wrong as every single texture took a lifetime to load then. Without that though, no luck. I don't know why the patch works for Ariel but not I. She's using Linux, but... that shouldn't matter. > I guess I have to withdraw my excitement. I tried out the patch for myself and it failed to load 32x32 textures.
AAARRRGHHHH! ok - couple things before we give-up all hope: 1) 32x32 isn't really supported. in my initial work on this issue, i discovered that both the openjpeg and our commercial kdu libraries won't correctly compress all 32x32 images. 2) make SURE you have your cache cleared before trying the test. (textures that were downloaded before this fix might be corrupt in the cache.) clearing the cache is extra difficult in the latest viewers, which have a BROKEN "clear cache" button. (you'll need to remove the cache directory by hand.) It sounds to me that the problem is that desired_size is being overloaded for multiple purposes. What is the logic here? What is it being used for?
Shouldn't the real size be known to the server and provided to the client? I don't understand why an approximation woudl even come into the picture. heh... as Seg so appropriate stated, the texture pipeline is... how to say... less than desirable.
so to answer your question: i have no idea all the places/ways that desired_size influences the download. i can give some historical context that helps understand why things are the way they are - but honestly, that's probably not very useful. the idea here is to get some kind of temporary hack in place that'll address the immediate problem, until the whole thing can be refactored. (which will happen in part when we implement http as the texture protocol, sometime in the next two quarters, likely.) Argent, yes the server knows the full size and sends a texture header with the data size and the number of packets this will take. BUT for example with a map 256x256 texture it possible to display at various discard levels of 32x32 64x64 128x128 and full 256x256 so as data is available a lower resolution texture can be displayed and the resolution increases as more data arrives. Otherwise it would take ages for full res to arrive and we would have too many Grey textures for too long
The real issue here is knowing where these divisions occur, this can only be determined by parsing the j2k codestream and looking for termination markers. If this was used to hand off to decode we would always have the correct amount of data for a given discard level. I don't think it's necessary to lose hope at all. For one thing the patch does work for me with respect to 32x32 textures. For another thing, if it's just a special case of 32x32s not being supported, you could always add a clause to that block:
... else if (w == 32 && h ==32) { desired_size = MAX_IMAGE_DATA_SIZE; } else if (w * h * c > 0) { desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, desired_discard); } ...which would only be inefficient in that one little special case. And finally, even if it doesn't work for 32x32s, working consistantly for 64x64s and up is still a big win as far as I'm concerned – that definately was not the case pre-patch. Ariel, You can ensure a 100% download by fudging processsimulatorpackets() see part of my patch on
You also have to fudge the cache to ensure that loads 100% of the data and thats not so easy, i attempt that on my patch by forcing the state machine back into NET which should then fetch the missing data from the server, this should not happen often if Quarl's patch is also applied. I'm actually interested if my patch and quarl's patch together help that 32x32 case described by Uchi. Ack, doesn't JP2000 have clean support for progressive display? PNG does, and you could use PNG for lossless... PNG's format's designed to parse easily and cleanly for streaming data.
Why yes, j2k's resolution layering capability is the main reason SL is using it in the first place, and actually is quite central to all this buggyness. Both the client and the sim are guessing at how much it needs to download/send depending on the desired resolution, rather than parsing the actual j2k stream and getting an exact number. This worked well enough when we were only using lossy images, as the assumption was based on lossy images, but now that we're throwing lossless images at it, the whole thing has fallen apart.
Though when it comes to lossless, at the "small" image sizes used in SL, j2k compression seems to be less than optimal. Much like "JPEG 1991" before it, its designed for photographic imagery. PNG is much better designed to deal with small contrast-y icons, constrained color palettes, and flat colored areas. I seem to remember PNG texture support was listed in a roadmap for 1.20... It would be easy enough to make the client automatically try both j2k and PNG before uploading and pick the one that ends up smallest. Though I don't know how PNG is going to fit in to the broken image download pipeline... (j2k is used a lot for geographical data measuring in the gigabyte+ range, and used by Cinema 4k. A 64x64 sculpty is tiny by j2k standards. The problem for me was that I wasn't using OpenJPEG. I switched to that and now any texture of any resolution I throw at it will load to completion, with or without the patches, and so I'm left without any solid repro. Granted, until I apply Michelle2's awesome patch, lossless textures will load unbearably slow. I've taken a stopwatch and timed these things taking up to 12 minutes! But yeah, ruling out the possibility that a texture is simply taking all friggen day to load will make things easier to test...
What's curious is that in 1.19.1.4, the current release, my 32x32 textures would atleast load some of the time, while in RC they absolutely never would. This has been declared "fixed" multiple times before. Don't close this until it's been verified by multiple people.
I'm with Argent on this one. Lets not be hasty. Qarl's patch has been included in 1.20.7 and it helps a lot but we still have the issue where some textures take for ever to download due to the companion problem on the server with it guessing at how much data to send and the fundamental issue that we should not guess at discard cut off points is still present. Although i am very pleased that Quarl's band aid is included in the official code base. I am getting some random crashes which sometimes trace up into openjpeg but they are random and could be due to general memory corruption somewhere else.
I'll add my voice to those who have verified that this fix seems to work in 1.20.7. As with Qarl's patch before, I have rained lossless textures on it every way I can and have not yet seen a failure. As others have mentioned, these issues still persist:
But these problems seem to me to be beyond the scope of Yah, close it when it's mainline. I was just concerned when I saw a bunch of issues closed all at once. Who knows what Gellan's closed that aren't actually fixed?
Yep, a single 64x64 sculptmap can still take approx 30 seconds to download.
So for me, lossless sculpties are still unusable and it makes me cringe to think of people continuing to use them. To fully appreciate what can happen when many lossless sculpties get together I suggest people go visit Timmi Allen's place. You can find it through his Picks. The guy makes lovely sculpties but I'm not so sure he fully realizes just how long his area takes to rez. You could be there for an hour and still see a half rezzed animals. We could download a high res mesh of Michelangelo's David in the time it takes for a single sculpty pillow to arrive. If I was Qarl I'd be seriously considering giving up on SL and it's spahghetti code. Please don't leave us, Qarl!! Further testing is looking pretty good, and I've accelerated the slow textures too to a point. Even the 32x32 test textures i was given are loading fine. But there are a few textures getting stuck at lower discard. In particular some Linden trees are not loading the wood/bark texture, its bailing at a terrible discard
Just went to Timmi Allen's place and its quite a good testing ground. Now i didn't notice anything "usually" slow, the textures all appeared in the general texture download mele that occurs. I would say any slowness to download is server issues either loading, network OR the good old assumption about how much data to send for a given discard or a combination of all. May be it is time to focus on specific issues that are closely coupled to this, such as the speed of download and failure to load some 32x32 textures and create seperate JIRA;s for each of them to keep focused and not let everything get piled up in the confusion. Trying to use 1.20.7 (87883) on a Mac OS X 10.4.10 to upload a 256x256 sculptie for a perfect cube. (This was constructed pixel by pixel in a 64x64 image, then expanded using nearest neighbor in photoshop.) The "lossless upload" box is dimmed and unchecked, and when the uploaded texture is applied to a sculptie, it does not give a cube which is indistingushable from a "real" cube object. There are seams and ripples. Have I done this right? Even if I made a mistake with the sculptie, I cannot imagine making a mistake which would give ripples on the faces of the cube.
I set the status to "Fix Pending" because it actually is fixed (and confirmed) in RC7.
Please keep in mind: 1. 32x32 Textures are officially not supported (Read Qarls comment above that) "Fix Pending" is the correct Status for a bug that has been fixed (or lets call it patched) in a Viewer-version that is not yet the Main Sl-Viewer. Using Release candidate SecondLife_1_20_9_88980 on a Mac OS X, I uploaded what I believe to be a perfect sculpted box as a 64x64 texture. I have attached it to this issue, it is named BoxSculptieExact2.bmp. Uploading with the lossless box checked and applying it to a newly created prim seems to almost work. Shape-wise it appears to be a perfect box, but it does not reflect light properly along its edges. I took a screenshot of the sculptie and an actual box and uploaded it, its called BoxSculptieExact2Picture. Both the sculptie and the box are black color, blank texture, high shiny. Note the distortions on the edges. Again, using ctrl-r and looking at the wireframe view, it appears perfect.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||