Reducing Resources

Hidden away on the Second Life Wiki are two very useful pages regarding optimisation, well they can be seen in that light anyway. One is regarding texture sizes and how much memory they consume. This is a useful guide but far from being the be all and end all, basically using 1024 x 1024 textures everywhere is silly, fortunately people generally use 512 x 512 but from the linked page we can see that a lot of them will eat resources too, which brings us to thinking about which textures we use and when we use them, do we really need 512 x 512? Well generally, it’s a yes but there are many times when 256 x 256 or even 128 x 128 would be fine.

The other page deals with pyhsics optimisation, this is a really handy page because it talks of using simple physics shapes to reduce load. The trick really is whether you can get away with only using a cube as your physics shape, say for example you build a nice fence with gaps all over the place and maybe it’s a bit weathered, could you just use a cube as the pyhsics shape? If you can, then the physics optimisation page is for you, if you can’t, then why can’t you?

Continue reading “Reducing Resources”

Repeats, Offsets, Hellish Maths!

So I’ve been working for a while on trying to figure out how the bloody hell you calculate offsets and repeats to make textures play nicely in Second Life when it comes to applying the same texture across multiple faces. There’s an alternative method, which involves using planar texturing and using the extremely useful align planar textures option. Planar texturing has an additional performance overhead but this is largely considered to be negligible, according to the mesh/rendering weight article on the official Second Life wiki.

However I decided to go the painful route of doing this with default texturing, which took me to maths hell! Seriously. I wanted to use three prims to make a total prim size of 14 metres, two of these prims were just side walls, so their edges would be showing on my front and back wall and then in the centre would be the main piece. The inital size of the prims I set as 0.200 for the edge walls and 13.600 for the main piece, this sounded nice. Now this would mean I’d have to adjust the texture repeats for the edges, as they would not need to have a horizontal size of 1.000, it won’t render nicely if I leave it like that.

One quick way to get a rough idea of how to do this is to to copy your main piece, then untick resize textures and resize it. However I wanted pinpoint accuracy, the way to get a more accurate size of your needed repeats is:

prim size/total building face size.

So for example in this case my first edge piece is 0.200m, the total building face size is 14 metres, so I divide 0.200 by 14, this is where the first Maths problem arose, 14 doesn’t divide nicely into 0.200, it comes out at 0.014285714285714285714285714285714, if I use the unticking stretch textures technique it would come out at 0.014, because it rounds down but that’s not pinpoint accuracy, for pinpoint accuracy you need your calculations to have no more than three decimal places.

Continue reading “Repeats, Offsets, Hellish Maths!”

Follow

Get the latest posts delivered to your mailbox: