I really don’t think there’s someone in Second Life that has never used the “Build tools” (aka the “Edit floater” – these terms will be used interchangeably from now on). This particular toolbox has been with us since the earliest of days (when it was really the only way to create 3D objects for use and/or sale within Second Life and I’d wager everyone has used it for numerous purposes: aligning and resizing avatar accessories and attachments (hair, shoes, jewellery etc), moving and aligning homes and so on.
One of the many purposes the build tools serve is texturing. Let’s face it, Second Life just wouldn’t be the same if everything was untextured or had the default “plywood” texture on everything. In the edit floater’s “Texture” tab, we have various options, including texture repeats on the X and Y axis, flipping the texture, rotating it, and offsetting it. Now, we all have come across situations where we’ve had to texture a hollow object – and this is precisely what I’m going to discuss here.
To reduce land impact, we are often told that it’s best to make a room out of a single, hollow box and apply a texture on its hollow inside. And then, with careful application of convex hull physics, we can end up with a land impact that is half of the original prim count. All is fine and dandy, except for the way horizontal repeats are calculated in the hollow area.
Let’s say we have a hollow cube, like the one in the picture above. I’ve determined that the hollow area would have 4 horizontal repeats and 1 vertical. You’d expect that each side of the inner square would get one repeat of the texture, but, as you can see, that’s not the case. Now, you’ll say, why does it matter? Use a seamless texture and you’re done. Well, that would be a good idea if the texture had no features that made proper alignment with the sides of the hollow area necessary. For example, see textures that have pre-baked brighter areas showing the distribution of light from a sconce on a wall. Or textures that have checquered patterns. These need to align properly.
Would it be hard for LL to implement a tool that would do the necessary calculations? No idea. But let’s have a look at the available hollow shapes:
Let’s put circles aside, because they don’t really matter all that much (you can just set the number of repeats and be done with it) and let’s have a look at the shapes that have corners: squares and triangles.
A square can – depending on the dimensioning – stay square or become oblong. If it remains square, its perimeter is 4a, where a is the length of each side. If it becomes oblong, its perimeter is 2(a + b), where a and b are the lengths of each of its sides. How hard would it be for a repeat calculation system to properly assign repeat counts to the sides of the box’s hollowed area?
As for the triangle, it can be either equilateral or an isosceles. If it’s equilateral, its perimeter is 3a, where a is the length of each side. If it’s an isosceles, its perimeter is 2a + b, where a and b are the lengths of the two equal sides and the base accordingly. Again, would it be impossible for a repeat calculation system to correctly assign repeat counts to the faces of the hollowed area?