Wednesday, August 7, 2013

Balancing act

Moving through some sims is like wading underwater
There's been a bit of discussion on the SL Universe forum about pathfinding and whether it adversely affects sims, and it reminded me that I have been meaning to have a five minute rant on the theme that everything in Second Life is a balancing act... you have to balance what you want to achieve visually and interactively with the performance you want to achieve.

Unlike games, where the background and a lot of the objects in a scene will be fixed and pre-downloaded to your computer, and where you may be prevented from moving into a different area, in Second Life currently everything is dynamically streamed to the user's computer.  This means that the size of textures, complexity of objects, number of avatars, amount of scripting all have an effect on how fast things render and how well the region performs.

It's tricky because the visitors to a sim will have different computers, graphics cards and nternet connections, and all of those may affect the rate at which things stream or render in world.  There is a world of difference in how quickly a scene renders if you have your settings on Ultra and if you have them set low - and how pretty or otherwise things will appear to you.  Many aspects of the user experience are not under the control of a sim owner or designer.

However, certain things have always helped.  If you use a limited set of textures and make them as small as possible, if you reduce the complexity of the physics for the mesh objects in a sim, if you use as few scripts and make them as elegant as possible, all these will help to make things as fast as possible.  Only you can judge whether having big beautiful textures is more important than being able to load the sim environment quickly.  It's all a question of balancing your priorities, and it requires thought and planning to make it work for you.

As I posted on that thread on the SLU boards, articulation of prims seems to me to be a pretty big sim killer.  It's one of the reasons that it is hard to use pathfinding in a realistic way, as there aren't a lot of animals which can be made to move around naturally without articulation. 

A few years ago I helped to build the Linden Homes sims, which included trees with (non-pathfind, scripted) birds and squirrels in them.  I pretty soon realised that these had quite a negative impact on the sims and so removed them in the sims I was dressing.  We later had a general squirrel strangling effort as the impact became clear. 

For those who haven't used it, pathfinding is a simple way to make animals and objects move around a sim without having to program the locations.  The idea is that the system makes a navmesh - this was explained to me as being like a tablecloth laid over the sim terrain and objects - which gives a pathfinding creature information about where the terrain and objects in a sim are placed.

This navmesh is what a pathfinding creature will navigate automatically if set up to pathfind.  Thus a creature set to follow avatars, will automatically follow anyone who comes close enough to it, and will automatically avoid obstacles and shouldn't disappear into the terrain.  You should always be careful about having objects penetrating the navmesh, especially those which have physical attributes. 

However, I think that a lot of the negative impacts reported for pathfinding are actually attributable to the articulation used for creatures which pathfind.  It's the reason I cheated with flexi-fur for the goats and creatures I made for the Wilderness sims.  Avoid articulation if possible.  Or at least, be aware of the impact that these things may have on performance and only rezz creatures which have it when necessary - don't leave them going in empty sims if you can avoid it.

I'm sure it sounds like I am a killjoy when I say that you have to be prepared to balance your need for impact and interactivity with the need for a sim to be usable, but much like a web page which takes too long to load, if you make a beautiful sim with interesting interactive content, which takes too long to rezz or is painfully slow to use, people will simply teleport to somewhere more comfortable.

No comments:

Post a Comment

Comments on this blog are now post-moderated. Please comment in English, because I will delete comments I cannot read or understand.