Pathfinding Costs

This posting showed up on the SL forum:

BlackMagi Darkwatch wrote:

So, I created a simple character using the new LL pathfinding functions and watched it merrily wander around – I won’t be leaving the object out though as my simple 1 prim cube had a LE of 15!  Not sure if the LE values are going to tweaked – I do hope so as I feel that is way too costly. 

All pathfinding characters have a fixed physics weight of 15. Adding prims will not cause this weight to go up and the weight is not affected by the physics shape type parameter. Streaming and script costs are computed are for any other object and the total land impact remains the max of all weights. So yes, a simple 1 prim cube has a LI of 15, but a much more complex character may still only have a LI of 15 (unless dominated by streaming or scripts, in which case the physics weight is irrelevant).

Falcon Linden

So, there is a surprising cost to the AI Characters. At least it surprised me.

The Lindens have been gearing the SL system to associate costs with the resources used. From outside the Lab we have no way to know if the cost is equitable or not. Fortunately SL runs from a free market and users are free to use AI Characters or not. That won’t make the entitlement folks happy, but that’s life.

Adding Prims to Control Navmesh – Click Enlarge

I have a 2-prim and 1-sculpty AI Character. My edit panel shows it as 1 object and 3 Land Impact. I can’t get the More Info to show the Physics cost. That is probably and issue with the development viewer.


In another post this showed up:

BlackMagi Darkwatch wrote:

Why do I now need to unlink buildings (remove the floor prim) to make it walkable?  This is especially pertinant as mesh builds can’t simply be unlinked.  The only option (if I’ve read correctly) is to add another prim to act as the physics shape?! Or re-upload the mesh… 

You don’t need to unlink and relink. Honestly, I’m not sure where that idea came from but I know it made its way into the documentation somewhere (which should be fixed). Here’s the deal:

In a perfect world, walkability would be a per prim property not a per linkset property. For technical reasons, this wasn’t achievable (and how would you have liked to have to set properties not just on all your linksets but on individual prims?!). So you have a couple options if you’d like to make a complex linkset like a house walkable (ignoring issues surrounding special prims like doors):

1) Make the whole house walkable. This is a perfectly good first pass solution. The only negative effect is that rebaking the navmesh will take slightly longer (I very much doubt it will ever be noticeable).

2) Unlink the walkable surfaces, link them together as a second linkset, and make just that walkable (and the rest Static Obstacle). This is understandably annoying, sometimes impossible, and generally unnecessary.

3) As a step better than (1), make whole house walkable and then drop an exclusion volume in that encompasses only the walls/roof. This will produce a result very similar to (2) (though not identical).

Falcon Linden

My house is not something I can edit. I made it walkable by adding 4 prims. Click to enlarge the images. I’ve added notes in the image so you can see what I did and the result.

Resulting Navmesh – Click Enlarge

The first image shows my house with 4 prims added. If I had built the house I would have used the existing floor prim. The Walkable prims create a yard, ramp, and in-house floor. There are 4 obstacle prims. I really only needed the one I have colored red.

The second image shows the resulting Navmesh laid over the original image. You can see the vertical faces of walkale primes are ignored by Havok as it builds the walkable Navmesh. You can also see how it handled the ramp connecting the floor and yard.

I’m still experimenting. My AI Character works just fine in the yard. It won’t start or wander on the patio or floor. On most occasions the character has stalled when I return. I’m adding some debug code so I can see what is happening.

In one case it managed to fall out of the yard. I still don’t know how that happened.


Innula Zenovka wrote:

As to vehicles, one issue I know some people have had is that when stuff that was using llVolumeDetect automatically converts to physics shape none (llVolumeDetect prims) and convex hull (everything else), this obviously puts you into the mesh accounting system, and it doesn’t necessarily do it the most economical way, in that (for example) tortured prims — especially toruses — can artificially inflate the LI unless at least some of them converted to physics shape none, too (the number of prims with a high rendering cost makes a difference).   But the automatic conversion process can’t know what to convert and what not.

Incorrect. The sim will never automatically opt you into the new accounting system. We only change the child to shape none if it was already using mesh accounting. Otherwise, we change the prim to behave like a normal phantom object. You can see this by noticing that in a non-mesh-accounting linkset with llVolumeDetect hacks those hacked prims now collide with the terrain (like a phantom object) whereas they did not before (and do not if using new accounting a shape type none). This is a minor problem and we felt it was the best way to handle the issue without introducing significant additional complexity.

 Falcon Linden


We have a number of Chicken Little types running around. There is lots of bad information and misinformation around right now. Plus a few people with little experience are blaming problems with their builds on Pathfinding and the Havok 2012.1 update. And buried in among the bogus stuff are some legitimate problems.

If you have a problem that you can reproduce and can write a step-by-step process for reproducing it, submit it as a JIRA. If the Lindens cannot see the problem, they cannot fix it.

7 thoughts on “Pathfinding Costs

  1. Recently, I wonder whether it would be easier to forget everything I ever knew about building and prim editing – which wasn’t too much to begin with, but at least it helped me cope during the past years – perhaps take a long enough break and then start from scratch with the very basics. So you don’t keep wondering why a prim doesn’t count as a prim anymore, but rather as a formula of “x * something in case of y meets z = what was your question?” and you feel more comfortable to trash no mod builds which can’t be optimized.

    But the problem that keeps me from doing it is… where are those basics to learn from? The wiki documentation seems to be faulty and incorrect and trying to follow the discussions of the pros on boards and blogs makes my head spin due to information overload. Where else can you turn to start learning without requiring a degree in maths, 3D design and advanced scripting?

    I’d love to add Pathfinding content to the project I’m part of – but I fear that I might break the set just by trying to optimize it with walkable tracks and obstacles or I might make a stupid mistake that has the LI count exploding and accidentially autoreturning essential parts … phew, it’s kind of overwhelming. No idea if others remotely feel the same or whether I just failed to keep on track.

    • You feel how you feel. I can understand the issues with Land Impact cost and I feel it.

      Unfortunately for SL to advance new features are going to be complex. We are past the simple stuff and even that wasn’t/isn’t all that simple. 3D building has always been complex. The Lab carried the cost and simplified the process for users. Now they a shifting the costs to the users by making what we do sensitive to the load our building places on the servers and viewers. I think this is due to ongoing and raucous complaints about lag in SL. Building inefficiently with the new features will bring the system to its knees. I’ve seen boots with more polygons than some regions have. Something had to be done.

      One can still build with the older prim style building, in which case nothing much has changed. Sculpties are the same with the notable exception that they were way under priced for the resource load they create. The Lindens made what I consider a reasonable compromise in regard to sculpties. Only scripted sculpties change. Empty sculpties use the older accounting. Personally I don’t see much use for sculpties. It is hard to learn how to make them with all the constrains placed on them. Mesh is an easier learning process and people are more interested in general 3D modeling than specialized sculpty modeling. So, there are way more tutorials for generalized 3D modeling.

      Pathfinding has been slammed by numerous people, including myself. The Lindens are fighting the misinformation and fixing the problems. The result is PF is not the big boogeyman many think it is. You could add a couple of dozen AI Characters and likely never need to worry about optimizing for performance.

      I think it is much more important to be optimizing our existing builds for everyday performance. 12 step stairs made from prims can add something like 12,000 polygons to a region if any of several parameters are not kept to zero. A 12 step mesh stairs can be 72 polygons. However, a poorly designed mesh stairs may cost more than 12 prims. But, a well made mesh stairs could cost only 3 or 4 prims. I’m stretching a bit to make the point.

      To build with mesh does add complication to figuring Land Impact Cost. The cost was always there, we just saw it as lag. With the new accounting you can reduce your cost and lag. But, you do have to learn what it is in 3D modeling that is driving the cost and producing lag. Memorizing the cost equations is not going to help you reduce your cost or lag. Learning what produces lag and avoiding inefficient modeling will.

      Its up to you to decide what you want to do.

  2. Regarding Land Impact. I have some experience with those calcs.

    In general they’re balanced to guide residents toward a generally usable experience. If it costs more, that’s really because it takes up resources (not because of some Illuminati conspiracy). If pathfinding objects cost 15, then they’re basically saying that if you had nothing else in a region, you could have 1000 pathfinding objects and still have minimally adequate performance. I hope they’re being conservative with their initial value. Based on data collected after people start really using it, they might lower the physics LI. That was our strategy for LI and we did lower the calcs at least a couple times.

    Ideally each component of LI would have it’s own limit, but for reasons I can’t say we had to roll them into a single value. There’s some amount of efficiency lost but no ones head exploded either.

    It’s impossible to release something into a world this complex and not expect to tweak it some – and you never want to tweak it in the direction that could cause returns.

  3. I wish the Lindens would update the wiki on how to make Mesh objects specifically for SL. Yes there are tons of general 3D tutorials floating around, but simple black and white wiki instructions for specifically how *best* to model for SL – none.

    Simple wiki instructions on what causes lag and what doesn’t would cut a lot of hollering back and forth. I don’t really think that having the developers actually document the product is a bad thing, and I wonder why the wiki lags sometimes months or years after the changes to the system.

    • Several of us feel you. However, residents can edit the wiki and add pages. In many cases the residents know more about building things than the Lindens… I’ll even say, in most cases the residents know more.

      I’ve added tutorials and covered mesh issues extensively as mesh has developed. I’ve taken content from the SL Forum as people like Drongle explained what they have learned about mesh and how to build low cost mesh items. Unfortunately it is not in a nice clean single document. May be I’ll reorganize it and write a book.

      Use the menu at the top of this blog to find the articles on mesh.

      • Nal beat me to it.

        Lindens do not know how best to create content. That is something creators have always known in far more detail than anyone at Linden lab.

        I do think that it would be really helpful to have LL engineers better document how land impact values get calculated, which is probably more what you mean anyway. The practical issue is that the persons who are best fit to write/update that doc are the same ones needed to work on projects everybody wants.

  4. Pingback: Dies und Das aus dem Web (KW 33 / 2012) - [O.L.D.] Old London Docks

Leave a Reply

Your email address will not be published. Required fields are marked *