• 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-8551
Type: Sub-task Sub-task
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: SignpostMarv Martin
Votes: 71
Watchers: 18
Operations

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

lossless compression not lossless on small textures

Created: 07/Aug/08 08:01 PM   Updated: 09/Nov/09 01:13 PM
Return to search
Component/s: Graphics
Affects Version/s: 1.22, 1.23 Release Candidate
Fix Version/s: None

File Attachments: 1. File 8x8 pixel sphere (enlarged).bmp (48 kB)
2. File 8x8 pixel sphere, as uploaded by llkdu.dll (enlarged).bmp (48 kB)
3. File 8x8 pixel sphere.bmp (0.2 kB)
4. File 8x8 RGBYWGGK.tga (0.2 kB)
5. File original.tga (3 kB)
6. File tst16x16.tga (0.8 kB)
7. File tst8x8.tga (0.3 kB)
8. File tstx32x32.tga (3 kB)
9. File tstx64x64.tga (12 kB)
10. File uploaded.tga (3 kB)

Image Attachments:

1. cubetest20090606.jpg
(108 kB)

2. oblongLODProblems.png
(333 kB)

3. small_map_bug.jpg
(125 kB)

4. tapes.jpg
(128 kB)
Environment:
CPU: AMD (Unknown model) (2200 MHz)
Memory: 2048 MB
OS Version: Microsoft Windows XP Service Pack 2 (Build 2600)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce 8600 GT/PCI/SSE2/3DNOW!
OpenGL Version: 2.1.2
LLMozLib Version: [LLMediaImplLLMozLib] - 2.01.17189 (Mozilla GRE version 1.8.1.13_0000000000)
Packets Lost: 0/19944 (0.0%)
Issue Links:
Relates

Last Triaged: 29/May/09 11:38 AM
Linden Lab Issue ID: DEV-33062


 Description  « Hide
As with the original bug, 8x8 pixel images appear to be desaturated with lossless compression.

http://jira.secondlife.com/secure/attachment/11895/8x8+RGBYWGGK+upload+still+borked.png

See the attached TGA for the source file,
e2051c0a-1146-7d88-e470-80955860b979 for a lossless upload and
113b4bca-5310-2933-448e-eda6b6b30916 for a lossy upload



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Wood Fairey added a comment - 16/Mar/09 06:42 AM
I have also noticed 32 x 32 textures are not lossless. A texture which had every single Z value set to 127 (see attached filed, original.tga) does not produce a flat sculpt. When saving that file back (see attached file uploaded.tga) I notice that out of the 3,072 values stored in the image, 1,235 are corrupted.

The in-world UUID of the uploaded texture is 3852607c-46bf-761c-4d76-5912256e0553

Other information Linden may want to read:

Second Life 1.22.11 (113976) Mar 6 2009 15:21:09 (Second Life Release Candidate)
Second Life Server 1.25.6.113484
CPU: Dual i386 (Unknown) (2500 MHz)
Memory: 4096 MB
OS Version: Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: NVIDIA GeForce 8600M GT OpenGL Engine
OpenGL Version: 2.0 NVIDIA-1.5.36


Wood Fairey added a comment - 16/Mar/09 06:44 AM
Updated to Critical and more general with added information

gaia clary added a comment - 11/May/09 02:20 AM - edited
It looks like all oblong sculpties are affected with image sizes where either width or height is < 64.
Standard sculpties (64*64 image size) work without problems. See for a comprehensive discussion and
some more screenshot about that in the forums at

http://forums.secondlife.com/showthread.php?t=320205

The screen shot added above shows perfect cube sculpties with varying sculptmap sizes. they have been uploaded with lossless compression and the image sizes are:

facecounts -> image size
4x, 4y -> 16*16 bit
6x, 6y -> 16*16 bit
8x, 8y -> 16*16 bit
8x, 16y -> 16*32 bit
16x, 32y -> 32 * 64 bit
32x, 32y -> 64*64 bit


Omei Turnbull added a comment - 11/May/09 02:34 PM
My experiments suggest that the "lossless" JPEG2000 compression done by the Kakadu library is the main, if not the sole, cause of this problem. I used the attachment "8x8 pixel sphere.bmp" as a test case. Enlarged, it looks like "8x8 pixel sphere (enlarged).bmp". If I upload the 8x8 version with the RC 1.23.1 and then save the results to disk, the saved result looks like "8x8 pixel sphere, as uploaded by llkdu.dll (enlarged).bmp". Obviously, something has gone seriously wrong.

However, if I remove llkdu.dll from the RC directory and repeat the process using openjpeg.dll, the upload/save round trip results in a perfect match to the original. If I revert to using llkdu.dll and save the version I uploaded with openjpeg.dll, the result still matches the original exactly.


gaia clary added a comment - 11/May/09 03:30 PM - edited
I tried Omei's workaround with the sculpties from my earlier screenshot (see above). I found that the sculpties with image sizes of 16*16 pixels now create perfect cubes. But the images of size 16*32 and 32*64 create total chaotic results. I tried with lossless compression turned on and off, but the results where equaly bogus.

Drongle McMahon added a comment - 11/May/09 03:35 PM - edited
This problem has become very prominent with the advent of small sculpt maps, oblong or square, in client 1.23. The image data used to generate the sculpt vertices is incorrect for square sizes less than 64x64. The distortion is extreme with lossless compression upload. Lossy compressed uploads of the same files give less distortion, but is still not usable for sculpts where vertex accuracy is essential - mainly those with sharp edges and hidden/degenerate triangles. This precludes the use of small maps for a large number of possible sculpties, and thus prevents the potential triangle and data transmission saving advantages.

The attached picture shows solid and wireframe examples of 8x8, 16x16, 32x32 and 64x64 simple interpolated vertex cubes. The 64x64 lossless upload is perfect. The 8x8 is distorted beyond recognition.


Drongle McMahon added a comment - 14/May/09 12:00 AM
Added a picture of some plain textures uploaded lossy/lossless, in case there are some clues there. Note the kdu exception for lossy 16x8 (and 8x16, not for lossless) ?! Is that general?

Rex Cronon added a comment - 30/May/09 11:59 AM
For quite a while all the sculptie images that have less than 4096pixelx have always look distorted. At first I thought that they never load fully. But now, it seems that images that have less than 4096 pixels are NOT uploaded as lossless
In the past I have been unsuccessful in convincing Qarl that there is something wrong with the uploading.
Lets hope that now this will finally be fixed.

Drongle McMahon added a comment - 05/Jun/09 06:27 PM - edited
Qarl suggested the workaround uploading with openjpeg and then viewing with llkdu. So I repeated that test using my four cubes. The picture cubetest20090606 shows, left-to-right, 64x64, 32x32, 16x16 and 8x8 maps (33x33, 17x17, 9x9, 5x5 vertices), uploaded losslessly with llkdu active (front) or inactive (back) so that opengl gets used. Well - it worked for the 8x8, but the 16x16 and 32x32 are still distorted. The distortions are very similar but not identical. Could it be a combination of upload and retrieval problems? Also uploading the test maps, "tstx*x*.tga" so anyone can play with them and/or see if I made any mistakes with them . They look right imported into Blender. PS. the 32x32 and 64x64 have to be inside-out; all are for planar topology.

gaia clary added a comment - 19/Jul/09 03:14 AM
I do not understand why it is so complicated to track this error. Apparently something is wrong. ok, so can't someone just take a look at the viewer, find where the sculptmaps are exported/imported and check if they are sent out broken or not and if they are received broken or not ? (I can't do this. I tried to compile the viewer once, but gave up quickly.)

If the sculptmaps are ok at the exitpoint(export to LL) but not ok on the entrypoint(import from LL), then the problem is on the server side and clearly it is LL who should do something (for instance put the the server side into open source so that this problem can be solved quikly, or allow some clever enthusiasts to look at the server side code and find the bug for them ...).

If the sculptmaps are broken when exporting or are intact right after getting from the Server, then it is is on the client side. And then it should not be such a big problem to create a patch ? and send it to LL so they can add it at least to the RC-viewer...

Probably this is very naive thinking ;-( Otherwise i can not understand, why this approach has never been taken up till now. Or is it just so complicated that nobody understands what goes on ? That would be fatal...


uchi desmoulins added a comment - 24/Jul/09 05:11 PM
Why wasn't VWR-2404 simply reopened? It's the same bug, only that it's marked "Fixed." Lol

Drongle McMahon added a comment - 25/Jul/09 04:36 AM
Uchi. By way of explanation, rather than justification: As far as I understand it, the original bug applied to sizes greater than the 64x64 which was the minimum supported sculpt map at that time. The fix applied worked down to 4096 pixels, which was all that was needed then. Only with the introduction of support for smaller maps did the issue reappear. I guess we don't know in advance whether it is the same bug and the fix was partial, or this is a new bug arising only with less than 4096 pixels. Thus the safest thing was a new jira. However, you are very correct in pointing out the link to VWR-2404 which has much highly pertinent discussion. Everyone interested should read that.

Shack Dougall added a comment - 01/Oct/09 10:37 PM
I'd just like to point out that this issue is related to VWR-13868. In VWR-13868, residents are complaining about an action that was taken to limit the number of vertices that are rendered.

Fixing this issue (VWR-8551) would allow residents to create sculpties with fewer vertices which would potentially lessen the need for the vertex limit.


Shack Dougall added a comment - 01/Oct/09 10:42 PM
I'd also like to pass along that several users have discovered this bug (VWR-8851) independently and reported it in the Prim Composer forums. The ability to create sculpties with less than 1024 faces is a killer feature if it worked. Unfortunately, all of the work that went into implementing low res sculpties is wasted if we can't get this this texture compression problem fixed.

Adeon Writer added a comment - 09/Nov/09 01:13 PM
The slowest parts of avatars to load are usually the sculpts... this would allow sculpts to load faster, since the files sizes would be smaller.

I see no downsides to this!