From: Ralph Doctorow
When imported lossessly and using planar stitching, this renders as a kind of bowtie shape of two triangles arranged point to point with the common point displaced slightly negative from the origin in each axis. This makes me think that the "unused" rows are being rendered.
It depends on the sculpty size and LOD which pixels are used. 64 x 128 for example has hardly any common pixels between the various LODS. I handle this in the Primstar Blender scripts with the following python code:
quote this post for tab spacing
def lod_size(width, height, lod):
'''Returns x and y face counts for the given map size and lod'''
sides = float([ 6, 8, 16, 32 ][lod])
ratio = float(width) / float(height)
verts = int(min(0.25 * width * height, sides * sides))
y_faces = int(sqrt(verts / ratio))
y_faces = max(y_faces, 4)
x_faces = verts // y_faces
x_faces = max(x_faces, 4)
y_faces = verts // x_faces
return x_faces, y_faces
def vertex_pixels(size, faces):
'''Returns a list of pixels used for vertex points on map size'''
pixels = [ int(size * i / float(faces)) for i in range(faces) ]
pixels.append(faces - 1)
return pixels
def map_pixels(width, height):
'''Returns ss and ts as lists of used pixels for the given map size.'''
ss = [ width - 1 ]
ts = [ height - 1 ]
for i in [3,2,1,0]:
u,v = lod_size(width, height, i)
for p in vertex_pixels(width, u):
if p not in ss:
ss.append(p)
for p in vertex_pixels(height, v):
if p not in ts:
ts.append(p)
ss.sort()
ts.sort()
return ss, ts
So vertex_pixels(64, 32) gives list of pixels used at LOD3, vertex_pixels( 64, 6 ) gives a list used at LOD0.
map_pixels(64, 64) returns two lists for u and v pixel usage across all 4 LODs. This is how my finalise code which setups the map for mirroring in SL knows which pixels it can work on.
The complete list of used pixels for a standard sculptie (6, 8, 16, 32 faces on 64 pixels) is [0, 2, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 31, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 56, 58, 60, 62, 63]
For a 64 x 128 map, the results are:
u points = [0, 2, 3, 4, 5, 8, 10, 11, 12, 14, 16, 17, 20, 21, 23, 25, 26, 29, 32, 34, 37, 38, 40, 43, 46, 48, 49, 51, 52, 55, 58, 61, 63]
v points = [0, 2, 5, 8, 10, 11, 13, 14, 16, 19, 21, 22, 25, 27, 28, 30, 32, 33, 36, 38, 41, 42, 44, 45, 47, 50, 52, 53, 55, 56, 58, 61, 64, 66, 69, 71, 72, 74, 75, 77, 80, 83, 85, 86, 89, 91, 94, 96, 97, 99, 100, 102, 105, 106, 108, 111, 113, 114, 116, 117, 119, 122, 125, 127]
This is because of the face counts for this particular map which are:
LOD3:22x46
LOD2:11x23
LOD1:5x12
LOD0:4x9
Oh, and on sculpties 0,0 is bottom left, so your +~+~+ thing should have the bottom row at the top..