The PRIM is a lie. 3D content is not made up of cubes, it is instead more commonly made up of points and lines, Verts and edges. But for democratising the ability to create 3d content Linden Lab created a system where users could simply create cubes and link them together and it was a brilliant invention.
Linden Lab could not have predicted just how many ways Second Life users would use their PRIMATIVE invention to create astonishing things, and there lies the problem with Second Life’s ongoing struggle with performance. We build and build and build in many different ways in our virtual world with no real clues into how some things are a strain on performance. So i’m going to share some of the rules i try to stick to when building things in Second Life. These are practices i’ve picked up from my own experiments and from advice given by other creators.
1. Don’t use Sculpts because they are big fibbers
Sculpts are often used because they can produce very elaborate and large mesh like shapes at only 1 land impact. mainly used for large parts of landscapes or trees. You know when you have arrived in a Sculpty region when everything first appears as big grey blobs that take forever to load. Sculpts are evil and use up more computing resources than they lead you to think. If you want to use Sculpts then keep it to a minimum.
2. Don’t distort your prims.
Prims are still a great tool for quickly creating structures. I often use them with my mesh builds for creating wooden structures and supports for more detailed mesh. I also use them a lot for creating invisible simple physics. But Prims have a dark side and can quickly become nasty if you start to split them, make holes in them and twist them (tampering and slanting is fine). Some people find when they link a distorted Prim with mesh they see the land impact shoot up by 100, thats not a bug, thats the mesh recalculating how much resources that prim is actually taking up. An undistorted Prim is a much happier Prim.
3. Only use Blended Alphas Textures when you really need to.
Did you know there are two types of Transparent textures that can be set on the surface of an object? ‘Blended’ and ‘Masking’. In the old days we only had the choice of ‘Blending’ transparent Textures. This often lead to transparency flipping where the computer could not make its mind up which texture should be in front of the other, often seen in trees. A lot of processing power goes into working out how the background looks through a blending transparent texture. Places with big forests and fields of grass covered in blended Alpha textures tend to be more laggy because of this. With the introduction of Materials Linden Lab added ‘Masking’ Alphas. This allows you to create a hard cut out of your transparent texture that has a clear line for the computer to calculate greatly reducing the resources needed to display them. So take note of your transparent textures and always set to MASKING alpha when you can, your visitors and friends with love you for doing so.
4. Don’t use scripts that change the state of something every single second.
Each time an object has to change something it has to send a message to the SL servers so it can tell everyone else that change has occurred. At least thats my understanding of it. So if we script something to do something like say constantly change colour, each colour change has to be reported to the servers and distributed to everyone who can see that object change. Lag and rubber banding can occur if to much info has to be sent to everyone. Because of this belief, i try to create stuff that does not send updates unless it really needs to and refrain from creating things that constantly change state. That includes, colour morphing, Texture Side/face flipping (alpha swapping) and animating Prims.
These are my own practices which may or may not be correct but they work for me, at least i think they do 😛 If you have any tips you would like to share or if you want to correct me, fill up the comments 🙂