Difference between revisions of "Pathfinding Tools in the Second Life Viewer"

From Second Life Wiki
Jump to navigation Jump to search
Line 18: Line 18:
=== Controls ===
=== Controls ===


{|border="1"
{{:Viewerhelp:Basic pathfinding setup}}
! Control Label !! Description
 
|-
|width="200" align="center" | Unfreeze <i>button</i> || align="left" | Allows the user to switch from the default <b>FROZEN</b> state to the <b>UNFROZEN</b> state.  In the <b>UNFROZEN</b>, the user is allowed to move permanent objects and to alter the terrain.
|-
|width="200" align="center" | Freeze <i>button</i> || align="left" | After making the desired changes to permanent objects and/or terrain, the user will use the <i>Freeze</i> button to switch back to <b>FROZEN</b> mode.
<span style="color:darkcyan">FUTURE:</span> Upcoming changes to the simulator will also re-generate the navmesh when a user switches back to the FROZEN state.
|}
<br><br>
=== Example Usage ===
=== Example Usage ===



Revision as of 12:17, 2 March 2012

KBnote.png Note: The Viewer tools described here are not yet available in a public Second Life Viewer build, but will be soon.

Introduction

For pathfinding, four new floaters allow users to more efficiently create, visualize, test, and debug pathfinding-enabled characters. These tools are not required to create pathfinding behaviors but are particularly useful to builders and experience creators in Second Life.

These tools may all be accessed through the Build->Pathfinding menu in the Project Viewer - Pathfinding.

Second Life Build Menu with new Pathfinding menu items

Basic Pathfinding Setup Floater

Overview

The intent of Basic Pathfinding Setup floater is primarily for basic SL user. This floater will allow users to quickly toggle between FROZEN and UNFROZEN mode allowing basic users to position pathfinding-enabled objects into the desired location within the region.

Basic Pathfinding Setup floater

Controls

Unfreeze   Click to switch from the default FROZEN state to the UNFROZEN state. In the UNFROZEN, you can move permanent objects and alter terrain.
Freeze   Click to switch back to FROZEN mode after making desired changes to permanent objects and/or terrain.

FUTURE: Upcoming changes to the simulator will also re-generate the navmesh when a user switches back to the FROZEN state.

Example Usage

A basic Linden user purchases a pathfinding-enabled house. Because the pathfinding-enabled house will contain objects that are marked as permanent, the user will be unable to rez and position the house into the region in the FROZEN state.

Thus, when a pathfinding-enabled house is to be rezzed on the region, the user will use the Basic Pathfinding Setup floater to switch in the UNFROZEN state. The user may then rez and position the house as desired. After the house meets the user's expectation, the Freeze button on the Basic Pathfinding Setup floater will toggle the user back into the FROZEN state. Additionally, the switch back to FROZEN will eventually (FUTURE FUNCTIONALITY) re-generate the navmesh.

Pathfinding Edit/Test Floater

Overview

The intent of the Pathfinding Edit/Test floater is for advanced users who are building pathfinding-enabled objects and characters.

This floater consists of 3 control areas.

  1. Visualization Controls (left-side of the floater)
  2. Edit Tab Controls
  3. Test Tab Controls

The following image is a screenshot of the Pathfinding Edit/Test floater with the Edit tab displayed.

Pathfinding Edit/Test floater with the Edit Tab displayed

The following image is a screenshot of the Pathfinding Edit/Test floater with the Test tab displayed.

Pathfinding Edit/Test floater

Controls

Visualization Controls
Control Label Description
Show Navmesh checkbox Toggles the display of the navmesh within the Viewer.
Show Walkability Map drop-down This does nothing currently.

FUTURE FUNCTIONALITY If the navmesh is displayed, this drop-down will allow the user to select to view the navmesh as a heatmap. This mode will allow the user to view the walkability values baked into the navmesh. This view will be in the style of a heatmap illustrating the values across the navmesh.

Show Walkables checkbox Toggles the display of Walkables used when the navmesh was generated. This functionality can be used to visualize how objects of type Walkable affected the navmesh generation.
Show Material Volumes checkbox Toggles the display of Material Volumes used when the navmesh was generated. This functionality can be used to visualize how objects of type Material Volume affected the navmesh generation.
Show Static Obstacles checkbox Toggles the display of Static Obstacles used when the navmesh was generated. This functionality can be used to visualize how objects of type Static Obstacle affected the navmesh generation.
Show Exclusion Volumes checkbox Toggles the display of Exclusion Volumes used when the navmesh was generated. This functionality can be used to visualize how objects of type Exclusion Volume affected the navmesh generation.
Show World checkbox Toggles the display of the world with the navmesh.
Status text Reports the status of the pathfinding navmesh including the download process of retrieving the navmesh data from the server.

FUTURE FUNCTIONALITY This status will eventually also report on the status of the server-side navmesh re-generation including when the navmesh is dirty, baking, or clean.



Edit Tab Controls
Control Label Description
Unfreeze button Allows the user to switch from the default FROZEN state to the UNFROZEN state. In the UNFROZEN, the user is allowed to move permanent objects and to alter the terrain.
Linksets button After switching to UNFROZEN mode, the user is allowed to access the Linksets button which opens the Pathfinding Linksets floater.
Freeze button After making the desired changes to permanent objects and/or terrain, the user will use the Freeze button to switch back to FROZEN mode.

FUTURE: Upcoming changes to the simulator will also re-generate the navmesh when a user switches back to the FROZEN state.



Test Tab Controls
Control Label Description
Character Width slider This slider allows the user to specify the width of the test character, ranging from 0.1 meter to 2 meters.
Character Type radio button This controls allows the user to specify the character type of the test character.
Ctrl-click left mouse button By holding down the <CTRL> key and clicking the left mouse button in the viewer window, the user specifies the starting point of the test character path.
Shift-click left mouse button By holding down the <SHIFT> key and clicking the left mouse button in the viewer window, the user specifies the endpoint of the test character path.
Clear Path button After a path is generated and displayed, it will remain displayed within the Viewer until the user clicks the Clear Path button.



Example Usage

  1. The advanced user will use the Visualization controls to visualize how the navmesh and related permanent objects have been generated. By seeing this visualization of how the physics engine interprets the navigation information, the advanced user can understand how to better custom the pathfinding-enabled objects to obtain the desired behaviors of characters.
  2. The advanced user will use the Edit Tab to switch to UNFROZEN mode, then to make the desired changes to pathfinding-enabled objects, and then to switch back to FROZEN mode. FUTURE FUNCTIONALITY In the future, switching back to FROZEN mode will prompt the server to re-generate the navmesh.
  3. The advanced user will use the Test Tab to visualize how a test character would choose the path between selected start and end points.



Pathfinding Linksets Floater

Overview

The intent of the Pathfinding Linksets floater is to give advanced users and builders the ability to customize an area to achieve interesting effects with pathfinding-enabled characters.

The floater displays information for all linksets within the current region for which the user has the ability to alter. The table reports useful information including

  • Linkset Name
  • Description
  • Land Impact
  • Distance from the user's avatar
  • Linkset Use
    • Potential values
      • Walkable
      • Static Obstacle
      • Movable Obstacle
      • Material Volume
      • Exclusion Volume
      • Movable Phantom
  • Walkability Coefficients
    • Character Type A
    • Character Type B
    • Character Type C
    • Character Type D

Additionally, selecting any linksets within the floater will also select the object(s) within the Viewer.

Pathfinding Linksets floater



Controls

Control Label Description
Filter by Name text input Allows the user to filter the linksets to the subset containing the user-specified text in the Name field.
Filter by Description text input Allows the user to filter the linksets to the subset containing the user-specified text in the Description Field.
Filter by Linkset Use drop-down Allows the user to filter the linksets to the subset with the matching linkset use field.
Apply button Applies the given filter criteria to the linkset list.
Clear button Clear the filter criteria returning the linkset list back to the original un-filtered contents.
Refresh List button Refreshes the linkset list from the server. Typically used after a linkset is added or deleted in-world.
Select All button Convenient way to select all linksets in the list.
Select None button Convenient way to deselect all selected linksets in the list.
Show Beacon checkbox When checked, a beacon will be displayed in the viewer indicating the in-world location of each selected linkset. This can be used to locate hard-to-find or invisible linksets in the region.
Take button Takes the selected linkset(s) into the user's inventory.
Take Copy button Takes a copy of the selected linkset(s) into the user's inventory.
Return button Returns the selected linkset(s) to the owner's inventory.
Delete button Deletes the selected linkset(s) from the region.
Teleport Me To It button Teleports the user to the selected linkset. This is useful to rapidly find linksets located far away from the user. Note that this button is only enabled when 1 linkset is selected.
Choose Linkset Use drop-down Allows the user to edit the linkset use field of the selected linkset(s).
Walkability Coefficients text inputs Allows the user to edit the individual walkability coefficients for each character type (A, B, C, D).

Walkability coefficients range from 0% to 100% to determine the influence the effect the linkset has on a character's speed while the character is traversing across the linkset object.

For example, a linkset with Walkability Coefficient of 50% for character type A will cause characters of type A to reduce their speed by half while the character is traversing the object.

Apply Changes button After making changes to the selected linkset(s) use type and/or walkability coefficients, the user MUST click on Apply Changes to affect the linksets attributes.



KBwarning.png Warning: For linksets with use fields marked as "[restricted]", only certain linkset use modes are available. This restriction is the result of the object not having modifiable permission enabled for the user.



KBwarning.png Warning: The "[Terrain]" linkset is available to be viewed and edited by the estate managers only. Additionally, while the walkability coefficients for the "[Terrain]" linkset are modifiable by estate managers, the Linkset Use field of "[Terrain]" linkset is not modifiable by anyone and will always be "Walkable".



Example Usage

The advanced users and builders will use the Pathfinding Linksets floater to customize areas to create interesting effects for pathfinding-enabled characters.

For instance, imagine the scenario of a builder constructing a single room in a pathfinding-enabled house. For the single room, the builder would use the following types as follows:

Linkset Use Description
Walkable The floor linkset would be set to be Walkable to allow characters to move across the floor.
Static Obstacle A desk linkset in the room would be set to be Static Obstacle to block characters from walking through or across the object.

NOTE Any object that should block character movement and that does not move should be marked as Static Obstacle to improve performance of pathfinding characters.

Movable Obstacle A door linkset in the room would be set to be Movable Obstacle. This will still block characters but, in contrast to Static Obstacles, Movable Obstacles will allow the linkset itself to move. In the case of the door, this will allow the door to open and close, but will still prevent characters from walking through the door.
Material Volume Material Volumes are phantom objects that can be used to affect the walkability coefficients of intersecting objects. Imagine that the builder applied a texture to the floor. Also, imagine that the floor texture includes small throw rug in the middle of the room. (The builder did not want to create a separate object for the rug, so is using a texture on the floor to give the appearance of a rug). The builder can then create a Material Volume object intersecting the floor at the location of the rug. Then, by setting a lower walkability coefficient for the Material Volume, the builder will create the affect of slowing down characters as the characters traverse across the painted rug area.
Exclusion Volume Exclusion Volumes are phantom objects that can be used to create areas where characters are prevented from moving. For instance, the builder can use an Exclusion Volume to create a section of the room where avatars would be able to move, but characters would be blocked from following.
Movable Phantom Movable Phantoms are phantom objects that have no affect on pathfinding-enabled characters.



In addition to linkset use attributes, builders can achieve additional effects by modifying the walkability coefficients for linksets. The walkability coefficients are values, ranging from 0% to 100%, that affect a characters speed. A walkability coefficient of 50% will reduce a characters by half while the character is traversing across the linkset.

Pathfinding Characters Floater

Overview

The intent of Pathfinding Characters floater is primarily for users to locate characters moving throughout a region and to identify the CPU cost of characters affecting the performance of a region.

The floater displays information for all characters within the current region for which the user has the ability to manipulate. The table reports useful information including

  • Character Name
  • Description
  • Owner
  • CPU Time
  • Altitude

Pathfinding Characters floater

Controls

Control Label Description
Refresh List button Refreshes the characters list from the server. Typically used after a character is added or deleted in-world.
Select All button Convenient way to select all characters in the list.
Select None button Convenient way to deselect all selected characters in the list.
Show Beacon checkbox When checked, a beacon will be displayed in the viewer indicating the in-world location of each selected character. This can be used to locate hard-to-find or invisible characters in the region.
Take button Takes the selected character(s) into the user's inventory.
Take Copy button Takes a copy of the selected character(s) into the user's inventory.
Return button Returns the selected character(s) to the owner's inventory.
Delete button Deletes the selected character(s) from the region.
Teleport Me To It button Teleports the user to the selected character. This is useful to rapidly find characters located far away from the user. Note that this button is only enabled when 1 character is selected.



Example Usage

  1. If a region owner has created a pathfinding-enabled character but is unable to find the character within the region, the Characters floater can be used to locate and select the character.
  2. Additionally, the Pathfinding Characters floater reports the CPU time cost for each character within the region. This functionality can be used by advanced users to identify which characters are impacting performance the most.