Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sculpty map size question

Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
01-29-2009 14:44
I'm happily, well, sort of happily, making sculpties and trying to refine their appearance and at times I'm struggling to keep them as sharp as I'd like.
Looking at other sculpt maps in-world it's recently struck me that some come up as 128x128 images, others even at 256x256, whereas the ones generated by Domino's scripts in Blender always output for me as 64x64.
Am I missing something or are the higher resolution ones just overkill? I was of the understanding that SL dealt with all sculpt maps at the 64x64 but if the bigger images give a better solution is there an easy way to incorporate them through Blender?
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
01-29-2009 15:39
From: Carbon Philter
Am I missing something or are the higher resolution ones just overkill?

Someone much more knowledgeable about sculpty internals can expand on this, I'm sure, but higher resolution sculpt maps are overkill and aren't necessarily going to provide any benefit.
_____________________
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-29-2009 15:47
There's no benefit in making a sculpt map any larger than 64x64. Having more pixels in the map won't increase the mesh detail. It will just take longer to load, and consume more memory.

Back before we had lossless upload for sculpt maps, it was a different story. The only option then was the same lossy compression scheme that is used for all other textures. With any type of lossy compression, the smaller the image, the worse the effect. So people naturally started using larger maps, to minimize the impact of the compression artifacts. The maps took longer to rez, but they did look considerably better than the alternative at the time.

Nowadays, oversized maps make sculpties look worse, not better, since the correctly sized maps can be lossless. Plus, they still take longer to rez, just like always. So there's no win with the large maps at all, and the loss is actually double (slower AND uglier).

For best results, use 64x64 maps, and upload them losslessly.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
01-29-2009 15:59
From: Chosen Few
For best results, use 64x64 maps, and upload them losslessly.
Can anybody give a simple explanation, why sculpty maps of size 64*64 are best, while there are only 33*33 relevant pixels available (at maximum for plane objects) ? I was always asking myself, why it wouldn't be enough to provide 33*33 pics. I remember, Domino once stated that his scripts use 2 pixels per vertex. I never understood this either. But i eagerly want to know the secret...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-29-2009 16:17
Good question, Gaia. Simply put, it's because sculpties are a hack. They were a way to insert pseudo mesh support, without having to add anything really new or different to the way SL works. One of the ways it "works" is it only accepts images that are sized in powers of two.

Since 33 is not a power of two, the next best option was 64. Allowing for odd sized textures would have taken more work.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
01-30-2009 03:15
From: Chosen Few
Since 33 is not a power of two, the next best option was 64. Allowing for odd sized textures would have taken more work.
outsch. a hack ;-) ok, that is not what i expected, but so what ? Thank you for clearification...

One more question: Is the mapping done to pixels 0,2,4,6,...60,62,63 ? And line 63 is this magical "extra line" ? is it such simple ?
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
01-30-2009 03:19
Your knowledge and informative response is much appreciated, Chosen.
Thanks to all respondents.
Now, back to the modelling..............
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
01-30-2009 03:26
I have found ever higher sculpt maps than that as well. I assume that the SL client just downsizes them automatically, like the way they handle the other textures. So no, there is no benefit to a huge sculpt texture.
Aminom Marvin
Registered User
Join date: 31 Dec 2006
Posts: 520
01-30-2009 09:40
There is a benefit to using 128x128; it's almost all that I use.
The benefit is this: 128x128 sculpts will load _faster_ than 64x64, _as long as it is made correctly_.
First off, the original 64x64 sculpt must have non-interpolated points. That is, each vertex would correspond to a 2x2 square of pixels of the same color (because 64x64 images _generally_ have four times the amount of pixels sampled) rather than unused data points in between each pixel. This makes sure that the numer of unique pixel values is the same of unique used vertex values.
Then, resize the image using nearest neighbor resampling (keeps it blocky) in photoshop.

Here's a quick workflow:
1) Open a 64x64 (or similar pixel count oblong) sculpt in Blender.
2) Bake using default settings in Domino Marama's blender scripts (which include a "compressible" option I suggested as an addition.)
3) Save sculpt map. Open in photoshop, resize to 128x128 using nearest neighbor.

Explanation:
lossless sculpts use jpg2000 lossless compression. The compression can be sort of thought to work like GIF; the less total values used, the smaller the file size. And, because you use nearest neighbor resampling, the _relative_ file size of a 128x128 will be less than a 64x64. Even though a 128x128 has four times as many pixels, it would have 1.5-2 times the file size, not four.

This is important because SL "expects" certain file sizes for images of a certain pixel count. It will happily download data up to that level, and if the image is still not completely downloaded, it appears it will continue to download at a certain speed. Resizing to 128x128 usually puts the sculpt below the first expectation level due to smaller file size per pixel count.

The result is that 128x128 almost always load faster than 64x64.

The reason why you'll see 256x256 sculpts about is that there was once a bug that prevented sculpts from loading at all past a certain expectation level. For very complex sculpts, the only way to get them to load was to upload them at 256x256 lossless using a third party client.