Open sl-service-account opened 5 years ago
Sandry Logan commented at 2019-02-21T14:56:01Z
I've said much of the what I am about to say here in the animesh forums. My apologies if I'm doing some irritating cross posting.
I agree wholeheartedly that setting up for pathfinding quickly becomes too complicated for many residents.
I work for the Virtual Kennel Club, and I am making my comments based on the combined experience of our staff. We adopted pathfinding when it was launched. We were very excited. We had been waiting for something like this for years. But it was, and is, very difficult to get our customers to use it, especially those that are not very technical.
For the first year after pathfinding came out, I heard so many stories from our staff of trying to help customers to retrofit difficult builds. It can be a lot of work to get it right and sometimes there is little you can do. For example, a no mod, mesh house, with scripted doors. You cannot just set it to walkable or static obstacle, because then the doors cannot move. And you cannot set it to phantom and put in prim walls and floors and set the appropriate pathfinding attributes on those, (which was the advice the devs who worked on pathfinding gave for complicated existing builds) because it's no mod.
I mean no disrespect to our customers, but a huge number of them are not builders. Many rarely even rez a prim, much less know how to resize it, position it carefully and mark it as walkable. Pathfinding optimisation is far too hard for average users and can be very fiddly and time consuming even for experienced builders.
Our pets have what we call "Dual Mode", meaning that they can use pathfinding, or you can turn in off and use what we call "traditional mode", where they attempt to climb over small and medium sized obstacles and stop when they encounter large ones. In the end we switched from pathfinding mode as our default for the dogs and pets to traditional mode, so they just work out of the box. We felt that that great as it is, having pathfinding as the default mode for our pets was proving to be a poor initial experience for many of our customers. It's nothing like as cool when they jump over the sofa rather than go around it, or jump the fence rather than go through the gate, but it's better than your brand new puppy standing with his head down, looking mournful, because he cannot walk because pathfinding is not set up.
Don't get me wrong. We love pathfinding. Our pets all have it, but sadly it goes mostly unused. We have demonstrations twice a week to show off the benefits and classes to help people get to grips with it, and many of them reap great results from it. But I think for it to be widely adopted, it needs to be a lot easier to get it set up.
@animats: I like your "static walkable obstacle" idea very much, and I think it would go some way to easing the set up of pathfinding enabled builds. But, I am not convinced that it will solve everything. I think that even with this feature, my earlier example of a no mod house with scripted doors will still fall foul of static content being unable to move.
animats commented at 2019-03-04T06:04:21Z, updated at 2019-03-04T06:07:26Z
Notes:
Pathfinding works better in totally idle sims. The character moves in a straight line when it should, with no wiggling. If "Characters Updated" in the statistics bar drops below 100%, motion degrades badly. Below 50%, it's terrible. Whatever recovery mechanism is used to cope with overload is working very badly. Suggest testing in a sim where Characters Updated is in the 20-50% range. The character may slow down, but should not screw up.
(I've been testing in "Arowana", a sandbox region for boats near Orville and a Linden Homes continent, used by almost nobody. It normally has zero script events per second. So I can see good statistics that show only what I'm doing.)
animats commented at 2019-03-22T07:42:23Z
Related: I've been trying out LLGetStaticPath. For a simple path that requires going around one obstacle, I get waypoints like this: [21:18] Pathfinding tester 2.12: 13 waypoints. [21:18] Pathfinding tester 2.12: At waypoint <205.58090, 48.88295, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <204.54800, 47.47806, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <204.18300, 47.26727, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <204.07500, 47.25528, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <204.04240, 47.25165, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <203.98440, 47.24844, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <203.89060, 47.24844, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <203.89060, 47.24844, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <203.72520, 47.24844, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <195.75780, 47.24844, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <195.47040, 47.33411, 35.14844> [21:18] Pathfinding tester 2.12: At waypoint <195.22380, 47.49541, 35.14844> [21:18] Pathfinding tester 2.12: At destination. Only four waypoints are needed, not 13. In the list returned by the planner, there are several duplicate and some collinear waypoints.
This may be the cause of some of the problems with spinning behavior while pathfinding. A duplicate waypoint means a zero-length segment, which has no direction. Note that <203.89060, 47.24844, 35.14844> is duplicated.
animats commented at 2019-05-10T06:27:22Z
A video summary of the problems.
animats commented at 2019-07-11T04:56:12Z
Further testing of llGetStaticPath reveals that it cuts corners. Paths tend to clip obstacles on inside turns. Adding 0.1m on each side of the path seems to provide adequate clearance. Users can't do this for pathfinding characters, because the character's collision capsule diameter, set by the user, is also the static path width. So characters bump into things. Give us a safety margin there and this will work better.
You can see this by using the path viewer tool in the viewer under Build->Pathfinding-View/Test. Try a path that goes around a cube and notice how the path clips the cube.
animats commented at 2019-09-09T20:38:24Z
Withdrawing one feature request above:
"Requested feature: Add a new pathfinding class "static walkable obstacle". The object is a static obstacle, and horizontal top surfaces are walkable. Setting a building to this class should make all the floors walkable. Ramps and stairs will still require manual handling. Door thresholds should work by default. This should solve the mesh building problem."
Although it is undocumented, this what setting something to "walkable" does. Set an entire building to walkable, and the horizontal surfaces become walkable, while the vertical surfaces become static obstacles. The change to an obstacle occurs somewhere between 60*°* and 70*°* from horizontal. This is a great feature, and makes setting up a parcel for pathfinding far simpler. I just got rid of my "invisible walkable rugs" and similar hacks. If the object has a reasonable physics model, including ramps for the stairs, it all just works.
The terminal at the airport in Orville sim is a nice example of this working. Take a look at it with the the viewer tools for viewing the pathfinding mesh.
animats commented at 2019-09-09T20:44:43Z
Attached two pictures of buildings with the building image semi-transparent and overlaid on the pathfinding mesh as shown by the Build->Pathfinding->View/Test menu item. Note the stairs in the pathfinding mesh. Those were recognized automatically; I didn't do anything to identify them as stairs. That's static pathfinding mesh; llGetStaticPath will find paths up and down stairs with this.
What just happened?
Animesh characters using pathfinding don't work very well.
What were you doing when it happened?
Trying to build good pathfinding animesh NPCs.
What were you expecting to happen instead?
Pathfinding should Just Work.
Other information
As requested by Simon Linden, I've put all the pathfinding issues into one JIRA entry.
Goal: Make pathfinding work well enough that animesh non-player characters can be created by creators, sold on Marketplace, purchased and installed by non-technical users, and experienced by any SL user.
Common NPC roles such as greeter, waiter/waitress, salesperson, security guard, pet, etc. should work well. NPCs should be able to function well around avatars. Extensive modification of the customer's parcel to make pathfinding work should not be necessary. Complexity and workarounds in character scripts are acceptable provided that the limitations requiring them are documented.
BUGS
Pathfinding clips corners, resulting in characters colliding with objects https://jira.secondlife.com/browse/BUG-226161
This is the worst problem. Combined with the bad behavior when a character bumps into something, it makes motion look terrible. Worst case, characters get stuck in walls or go into exclusion volumes. Characters should behave like avatars in this area. If avatars brush a wall, they slide along it. If pathfinding characters brush a wall, they spin and move in random directions.
Part of the problem is that the character's collision capsule and the planning path width are the same. There's zero tolerance for error. That, plus paths that touch obstacles, plus bad collision response, adds up to poor character behavior.
In the absence of moving obstacles, llNavigateTo and llPursue should Just Work every time, with smooth motion and no nonsense.
High priority.
Pathfinding failing and not calling path_update event, or reporting false success https://jira.secondlife.com/browse/BUG-226061
This is an annoyance but can be worked around in LSL scripts, by detecting fails and restarting.
Lower priority.
FEATURE REQUESTS
Requested feature: Add a new pathfinding class "static walkable obstacle". The object is a static obstacle, and horizontal top surfaces are walkable. Setting a building to this class should make all the floors walkable. Ramps and stairs will still require manual handling. Door thresholds should work by default. This should solve the mesh building problem.
Use case: makes it easy for a parcel owner to set up their parcel for pathfinding. Currently, it's sometimes necessary to take buildings apart to make the floors walkable. This is the currently recommended approach in the wiki. It predates mesh and doesn't work with mesh buildings. Workaround involving walkable rugs and invisible walkable surfaces are possible but create other problems.
High priority
Requested feature: add "llGetDynamicPath", working like "llGetStaticPath", but returning info based on the pathfinding mesh including movable obstacles. This allows scripts more control over path planning and movement in difficult situations. The use case is mostly for working around pathfinding bugs.
Low priority, provided all items under "BUGS" are fixed. Oz Linden has indicated that fixing the bugs is better than doing this. But if it's easy to expose this functionality to scripts, and fixing the bugs is hard, this is an alternative. Give us this and we can script around the other problems.
Attachments
Links
Related
Original Jira Fields
| Field | Value | | ------------- | ------------- | | Issue | BUG-226391 | | Summary | Pathfinding issue summary | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | animats (animats) | | Created at | 2019-02-20T19:24:49Z | | Updated at | 2019-09-09T20:44:43Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2019-02-21T08:56:00.613-0600', "Is there anything you'd like to add?": 'As requested by Simon Linden, I\'ve put all the pathfinding issues into one JIRA entry.\r\n\r\nGoal: Make pathfinding work well enough that animesh non-player characters can be created by creators, sold on Marketplace, purchased and installed by non-technical users, and experienced by any SL user. \r\n\r\nCommon NPC roles such as greeter, waiter/waitress, salesperson, security guard, pet, etc. should work well. NPCs should be able to function well around avatars. Extensive modification of the customer\'s parcel to make pathfinding work should not be necessary. Complexity and workarounds in character scripts are acceptable provided that the limitations requiring them are documented.\r\n\r\nBUGS\r\n\r\nPathfinding clips corners, resulting in characters colliding with objects\r\nhttps://jira.secondlife.com/browse/BUG-226161\r\n\r\nThis is the worst problem. Combined with the bad behavior when a character bumps into something, it makes motion look terrible. Worst case, characters get stuck in walls or go into exclusion volumes. Characters should behave like avatars in this area. If avatars brush a wall, they slide along it. If pathfinding characters brush a wall, they spin and move in random directions. \r\n\r\nPart of the problem is that the character\'s collision capsule and the planning path width are the same. There\'s zero tolerance for error. That, plus paths that touch obstacles, plus bad collision response, adds up to poor character behavior.\r\n\r\nIn the absence of moving obstacles, llNavigateTo and llPursue should Just Work every time, with smooth motion and no nonsense.\r\n\r\nHigh priority.\r\n\r\n\r\nPathfinding failing and not calling path_update event, or reporting false success\r\nhttps://jira.secondlife.com/browse/BUG-226061\r\n\r\nThis is an annoyance but can be worked around in LSL scripts, by detecting fails and restarting. \r\n\r\nLower priority.\r\n\r\nFEATURE REQUESTS\r\n\r\nRequested feature: Add a new pathfinding class "static walkable obstacle". The object is a static obstacle, and horizontal top surfaces are walkable.\r\nSetting a building to this class should make all the floors walkable. Ramps and stairs will still require manual handling. Door thresholds should work by default. This should solve the mesh building problem.\r\n\r\nUse case: makes it easy for a parcel owner to set up their parcel for pathfinding. Currently, it\'s sometimes necessary to take buildings apart to make the floors walkable. This is the currently recommended approach in the wiki. It predates mesh and doesn\'t work with mesh buildings. Workaround involving walkable rugs and invisible walkable surfaces are possible but create other problems.\r\n\r\nHigh priority\r\n\r\n\r\nRequested feature: add "llGetDynamicPath", working like "llGetStaticPath", but returning info based on the pathfinding mesh including movable obstacles. This allows scripts more control over path planning and movement in difficult situations. The use case is mostly for working around pathfinding bugs.\r\n\r\nLow priority, provided all items under "BUGS" are fixed. Oz Linden has indicated that fixing the bugs is better than doing this. But if it\'s easy to expose this functionality to scripts, and fixing the bugs is hard, this is an alternative. Give us this and we can script around the other problems.', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'System': 'SL Simulator', 'Target Viewer Version': 'viewer-development', 'What just happened?': "Animesh characters using pathfinding don't work very well.", 'What were you doing when it happened?': 'Trying to build good pathfinding animesh NPCs.', 'What were you expecting to happen instead?': 'Pathfinding should Just Work.', } ```