SimulatorFeatures

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (OpenSim: line spacing only)
 
(62 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= SimulatorFeaturesModule =
+
{{Quicklinks|SimulatorFeatures}}
from dev-master hash/commit time 10a8d28_1407360312
+
== Overview ==
+
The SimulatorFeaturesModule is the mechanism used to inform the viewer about a region's ability to handle mesh model objects. This information is sent when the presence is created in the region so the viewer will be able to determine the region's mesh capabilities. There are no configurable items for the features. But, many OpenSim capable viewers support extended use of the simulator features to pass other parameters that the viewer can use to dynamically refresh values needed to properly operate components for the grid containing the region. This is particularly useful for Hypergrid since several viewer components receive parameters upon login and are specific to that grid. Unless the parameters are dynamically refreshed, the components will not work when visiting new grids. We pass the parameters inside a data structure named "OpenSimExtras" along with the simulator features.
+
  
 +
This information is based on the current OpenSim development version. This has changed over time, occasionally in incoherent ways.
 +
== SimulatorFeaturesModule Overview ==
 +
The SimulatorFeaturesModule provides support to the mechanism by which client programs (viewers) request information about some features or properties of a region, for example Bakes on Mesh (BOM) support, version of LSL/OSSL syntax, etc.<br>
 +
Viewer should ask for this information every time they see a new region. Unfortunately some of this may require that the viewer already created an avatar on that region.
 +
This information is sent via HTTP with llsd xml encoding.<br>
 +
Some information specific to OpenSimulator is sent in a section (llsd map) OpenSimExtras, so it is easily identified by viewers.
  
 
== Configuration ==
 
== Configuration ==
The region sends this data to the viewer, and we support the setting of these extras in the configuration of the simulator. But, we use the Robust or Standalone GridService and LoginService to push default values to the regions when they startup. The values we send are identical to the parameters we send in our home grid's login service when the user logs into the grid.
+
Some parameters are constant and defined in code. Others are defined by specific modules, some of which are optional. In fact, the SimulatorFeaturesModule itself is also optional.<br>
=== Robust Grid and Standalone ===
+
The facilities available via the module are also very dependent on the OpenSimulation version or flavor.
We currently (dev-master hash/commit time 10a8d28_1407360312 forward) support the configuration of several parameters via the Robust.ini or Robust.HG.ini for grids or via config-include/StandaloneCommon.ini for standalones.
+
This is a consequence of legacy decisions, unmanageable modularity and configurability, and blind selfish forking.
 +
More work is needed to provide consistency, in particular because some of this information is not optional at all if one likes to have viewers that work correctly.
  
<source lang=ini>
+
A few examples on regions configuration:
[GridService]
+
 
+
; Support viewer export of content
+
ExportSupported = true
+
 
+
[LoginService]
+
 
+
; Grid Search service url
+
SearchURL = "url to search service"
+
 
+
; Grid Map Service
+
MapTileURL = "http://127.0.0.1:8002"
+
 
+
; Grid destination guide url (grid favorite locations)
+
DestinationGuide = "url to destination guide"
+
</source>
+
 
+
=== OpenSim ===
+
 
+
OpenSimExtras are configured in several places through the code and the best way to track them is to search for modules that watch the OnSimulatorFeaturesRequest event.
+
 
+
For certain features, we support the override of the grid defaults in the SimulatorFeaturesModule, but the defaults should be set at the grid level to ensure that the services required to operate the viewer components will be correct when users login or enter regions via Hypergrid.
+
  
 
<source lang=ini>
 
<source lang=ini>
 
[SimulatorFeatures]
 
[SimulatorFeatures]
  
; Override search service url
+
  ; Override search service url
SearchServerURI = "url to search service for this Simulator and its region(s)"
+
  SearchServerURI = "url to search service"
  
; Override destination guide url
+
  ; Override destination guide url
DestinationGuideURI = "url to destination guide for this Simulator and its region(s)"
+
  DestinationGuideURI = "url to destination guide"
  
; Override map service url
+
  ; Override map service url
;(this may be set in one of several other locations, but we can use this to be consistent)
+
  ;(this may be set in one of several other locations, but we can use this to be consistent)
MapTileURL = "url to map service for this Simulator and its region(s)"
+
  MapTileURL = "url to map service"
  
 
[Chat]
 
[Chat]
  
    ; Distance in meters that ordinary chat should travel.  Default is 20m
+
  ; Distance in meters that ordinary chat should travel.  Default is 20m
    say_distance = 20
+
  say_distance = 20
    ; Controls whether the chat module is enabled.  Default is true.
+
  ; Controls whether the chat module is enabled.  Default is true.
    enabled = true;
+
  enabled = true;
    ; Distance in meters that whispers should travel.  Default is 10m
+
  ; Distance in meters that whispers should travel.  Default is 10m
    whisper_distance = 10
+
  whisper_distance = 10
    ; Distance in meters that shouts should travel.  Default is 100m
+
  ; Distance in meters that shouts should travel.  Default is 100m
    shout_distance = 100
+
  shout_distance = 100
 +
</source>
  
[Materials]
+
== Robust.HG.ini, GridURL and GridURLAlias==
 
+
Grid can send information to regions to override local settings, an example from Robust.HG.ini<br>
enable_materials = true
+
<source lang=ini>
MaxMaterialsPerTransaction = 50
+
[Hypergrid]
 +
;...
 +
  GatekeeperURI ="http://my.grid.host:9004"
 +
  GatekeeperURIAlias = "http://my.oldgrid.host:9004,http://my.localgrid.host:8003"
 +
...
 
</source>
 
</source>
  
==Extra information sent to the viewer over the SimulatorFeatures capability==
+
The Robust.HG.ini set GatekeeperURI will be sent to viewers as GridURL and GatekeeperURIAlias as GridURLAlias
  
The OpenSimulator specific proportion of this is as follows (TODO: Need to document the surrounding SimulatorFeatures structure as well!).
+
==Information Sent to Viewers==
 +
<b>WARNING</b> the information sent about current region grid is only to help viewers to identify grid changes and identify if a url points to a local region or a region on another grid. This information should not be used to replace any permanent information, like information used by viewers grid manager. The Authority for permanent grid information is the Grid service, not regions. The region information may even be incorrect since many regions are configured by end users with little skills grappling with the current over complex OpenSimulator configuration<br>
  
  OpenSimExtras (OSDMap)
+
== Example of data sent to viewer (dev 0.9.2 version) ==
     map-server-url (string)
+
<source lang="xml">
     search-server-url (string)
+
<llsd><map>
    destination-guide-url (string)
+
  <key>MeshRezEnabled</key><boolean>1</boolean>
    ExportSupported (Boolean)
+
  <key>MeshUploadEnabled</key><boolean>1</boolean>
    GridName (string) - name of this simulator's grid (can change if travelling via Hypergrid). OpenSimulator 0.8.1 onwards.
+
  <key>MeshXferEnabled</key><boolean>1</boolean>
    GridURL (string) - login URL of this simulator's grid (can change if travelling via Hypergrid). OpenSimulator 0.8.1 onwards.
+
  <key>BakesOnMeshEnabled</key><boolean>1</boolean>
    say-range (integer)
+
  <key>PhysicsMaterialsEnabled</key><boolean>1</boolean>
    whisper-range (integer)
+
  <key>PhysicsShapeTypes</key><map>
    shout-range (integer)
+
      <key>convex</key><boolean>1</boolean>
     MaxMaterialsPerTransaction (integer) (Added 19 June 2015 r/26085)
+
      <key>none</key><boolean>1</boolean>
 +
      <key>prim</key><boolean>1</boolean>
 +
     </map>
 +
  <key>LSLSyntaxId</key><uuid>0ca3945b-ad46-5155-6d66-6b6c74370dd2</uuid>
 +
  <key>AnimatedObjects</key><map>
 +
      <key>AnimatedObjectMaxTris</key><integer>150000</integer>
 +
      <key>MaxAgentAnimatedObjectAttachments</key><integer>2</integer>
 +
     </map>
 +
  <key>MaxAgentAttachments</key><integer>38</integer>
 +
  <key>MaxAgentGroupsBasic</key><integer>60</integer>
 +
  <key>MaxAgentGroupsPremium</key><integer>60</integer>
 +
  <key>OpenSimExtras</key><map>
 +
      <key>AvatarSkeleton</key><boolean>1</boolean>
 +
      <key>AnimationSet</key><boolean>1</boolean>
 +
      <key>MinSimHeight</key><real>-100</real>
 +
      <key>MaxSimHeight</key><real>50000</real>
 +
      <key>MinHeightmap</key><real>-100</real>
 +
      <key>MaxHeightmap</key><real>4000</real>
 +
      <key>currency-base-uri</key><string>http://my.grid.host:9000/</string>
 +
      <key>map-server-url</key><string>http://my.grid.host:9004/</string>
 +
      <key>GridStatus</key><string>http://my.grid.host:9004/GridStatus</string>
 +
      <key>GridStatusRSS</key><string>http://my.grid.host:9004/GridStatusRSS</string>
 +
      <key>ExportSupported</key><string>true</string>
 +
      <key>SimulatorFPS</key><real>11.001100540161133</real>
 +
      <key>SimulatorFPSFactor</key><real>4.9994997978210449</real>
 +
      <key>SimulatorFPSWarnPercent</key><integer>60</integer>
 +
      <key>SimulatorFPSCritPercent</key><integer>40</integer>
 +
      <key>MinPrimScale</key><real>0.0010000000474974513</real>
 +
      <key>MaxPrimScale</key><real>1024</real>
 +
      <key>MinPhysPrimScale</key><real>0.0099999997764825821</real>
 +
      <key>MaxPhysPrimScale</key><real>64</real>
 +
      <key>GridName</key><string>testgridLocal</string>
 +
      <key>GridNick</key><string>testgridLocal</string>
 +
      <key>GridURL</key><string>http://my.grid.host:9004</string>
 +
      <key>GridURLAlias</key><string>http://my.oldgrid.host:9004,http://my.localgrid.host:8003</string>
 +
      <key>search-server-url</key><string>http://my.grid.host:9004/</string>
 +
      <key>destination-guide-url</key><string>http://my.grid.host:80/guide</string>
 +
      <key>say-range</key><integer>20</integer>
 +
      <key>whisper-range</key><integer>10</integer>
 +
      <key>shout-range</key><integer>100</integer>
 +
     </map>
 +
  <key>AvatarHoverHeightEnabled</key><boolean>1</boolean>
 +
  <key>menus</key><map>
 +
      <key>agent</key><map>
 +
        </map>
 +
      <key>world</key><map>
 +
        </map>
 +
      <key>tools</key><map>
 +
        </map>
 +
      <key>advanced</key><map>
 +
        </map>
 +
      <key>admin</key><map>
 +
        </map>
 +
    </map>
 +
  <key>MaxMaterialsPerTransaction</key><integer>50</integer>
 +
  <key>RenderMaterialsCapability</key><real>3</real>
 +
</map></llsd>
  
Any of these is optional -- it may or may not be sent by the simulators. The entire map OpenSimExtras may or may not be present.
+
</source>
  
Portions of this are available in OpenSimulator 0.7.6 onward. Grid support is only available from r/25093 (4-Aug-2014 as dev-master hash/commit time 10a8d28_1407360312) onward.
+
Note that other set of region modules, Money modules for example, may add more entries

Latest revision as of 00:18, 19 August 2021

This information is based on the current OpenSim development version. This has changed over time, occasionally in incoherent ways.

Contents

[edit] SimulatorFeaturesModule Overview

The SimulatorFeaturesModule provides support to the mechanism by which client programs (viewers) request information about some features or properties of a region, for example Bakes on Mesh (BOM) support, version of LSL/OSSL syntax, etc.
Viewer should ask for this information every time they see a new region. Unfortunately some of this may require that the viewer already created an avatar on that region. This information is sent via HTTP with llsd xml encoding.
Some information specific to OpenSimulator is sent in a section (llsd map) OpenSimExtras, so it is easily identified by viewers.

[edit] Configuration

Some parameters are constant and defined in code. Others are defined by specific modules, some of which are optional. In fact, the SimulatorFeaturesModule itself is also optional.
The facilities available via the module are also very dependent on the OpenSimulation version or flavor. This is a consequence of legacy decisions, unmanageable modularity and configurability, and blind selfish forking. More work is needed to provide consistency, in particular because some of this information is not optional at all if one likes to have viewers that work correctly.

A few examples on regions configuration:

[SimulatorFeatures]
 
   ; Override search service url
   SearchServerURI = "url to search service"
 
   ; Override destination guide url
   DestinationGuideURI = "url to destination guide"
 
   ; Override map service url
   ;(this may be set in one of several other locations, but we can use this to be consistent)
   MapTileURL = "url to map service"
 
[Chat]
 
   ; Distance in meters that ordinary chat should travel.  Default is 20m
   say_distance = 20
   ; Controls whether the chat module is enabled.  Default is true.
   enabled = true;
   ; Distance in meters that whispers should travel.  Default is 10m
   whisper_distance = 10
   ; Distance in meters that shouts should travel.  Default is 100m
   shout_distance = 100

[edit] Robust.HG.ini, GridURL and GridURLAlias

Grid can send information to regions to override local settings, an example from Robust.HG.ini

[Hypergrid]
;...
  GatekeeperURI ="http://my.grid.host:9004"
  GatekeeperURIAlias = "http://my.oldgrid.host:9004,http://my.localgrid.host:8003"
...

The Robust.HG.ini set GatekeeperURI will be sent to viewers as GridURL and GatekeeperURIAlias as GridURLAlias

[edit] Information Sent to Viewers

WARNING the information sent about current region grid is only to help viewers to identify grid changes and identify if a url points to a local region or a region on another grid. This information should not be used to replace any permanent information, like information used by viewers grid manager. The Authority for permanent grid information is the Grid service, not regions. The region information may even be incorrect since many regions are configured by end users with little skills grappling with the current over complex OpenSimulator configuration

[edit] Example of data sent to viewer (dev 0.9.2 version)

<llsd><map>
  <key>MeshRezEnabled</key><boolean>1</boolean>
  <key>MeshUploadEnabled</key><boolean>1</boolean>
  <key>MeshXferEnabled</key><boolean>1</boolean>
  <key>BakesOnMeshEnabled</key><boolean>1</boolean>
  <key>PhysicsMaterialsEnabled</key><boolean>1</boolean>
  <key>PhysicsShapeTypes</key><map>
      <key>convex</key><boolean>1</boolean>
      <key>none</key><boolean>1</boolean>
      <key>prim</key><boolean>1</boolean>
    </map> 
  <key>LSLSyntaxId</key><uuid>0ca3945b-ad46-5155-6d66-6b6c74370dd2</uuid>
  <key>AnimatedObjects</key><map>
      <key>AnimatedObjectMaxTris</key><integer>150000</integer>
      <key>MaxAgentAnimatedObjectAttachments</key><integer>2</integer>
    </map>
  <key>MaxAgentAttachments</key><integer>38</integer>
  <key>MaxAgentGroupsBasic</key><integer>60</integer>
  <key>MaxAgentGroupsPremium</key><integer>60</integer>
  <key>OpenSimExtras</key><map>
      <key>AvatarSkeleton</key><boolean>1</boolean>
      <key>AnimationSet</key><boolean>1</boolean>
      <key>MinSimHeight</key><real>-100</real>
      <key>MaxSimHeight</key><real>50000</real>
      <key>MinHeightmap</key><real>-100</real>
      <key>MaxHeightmap</key><real>4000</real>
      <key>currency-base-uri</key><string>http://my.grid.host:9000/</string>
      <key>map-server-url</key><string>http://my.grid.host:9004/</string>
      <key>GridStatus</key><string>http://my.grid.host:9004/GridStatus</string>
      <key>GridStatusRSS</key><string>http://my.grid.host:9004/GridStatusRSS</string>
      <key>ExportSupported</key><string>true</string>
      <key>SimulatorFPS</key><real>11.001100540161133</real>
      <key>SimulatorFPSFactor</key><real>4.9994997978210449</real>
      <key>SimulatorFPSWarnPercent</key><integer>60</integer>
      <key>SimulatorFPSCritPercent</key><integer>40</integer>
      <key>MinPrimScale</key><real>0.0010000000474974513</real>
      <key>MaxPrimScale</key><real>1024</real>
      <key>MinPhysPrimScale</key><real>0.0099999997764825821</real>
      <key>MaxPhysPrimScale</key><real>64</real>
      <key>GridName</key><string>testgridLocal</string>
      <key>GridNick</key><string>testgridLocal</string>
      <key>GridURL</key><string>http://my.grid.host:9004</string>
      <key>GridURLAlias</key><string>http://my.oldgrid.host:9004,http://my.localgrid.host:8003</string>
      <key>search-server-url</key><string>http://my.grid.host:9004/</string>
      <key>destination-guide-url</key><string>http://my.grid.host:80/guide</string>
      <key>say-range</key><integer>20</integer>
      <key>whisper-range</key><integer>10</integer>
      <key>shout-range</key><integer>100</integer>
    </map>
  <key>AvatarHoverHeightEnabled</key><boolean>1</boolean>
  <key>menus</key><map>
      <key>agent</key><map>
        </map>
      <key>world</key><map>
        </map>
      <key>tools</key><map>
        </map>
      <key>advanced</key><map>
        </map>
      <key>admin</key><map>
        </map>
    </map>
  <key>MaxMaterialsPerTransaction</key><integer>50</integer>
  <key>RenderMaterialsCapability</key><real>3</real>
</map></llsd>

Note that other set of region modules, Money modules for example, may add more entries

Personal tools
General
About This Wiki