2014-12-31 18:50:48 +00:00
|
|
|
INonSharedRegion Module - ability to control flocks of prims within an OpenSim scene.
|
|
|
|
|
2011-07-13 22:46:09 +00:00
|
|
|
To build from source
|
|
|
|
|
2014-12-24 16:29:19 +00:00
|
|
|
Add OpenSimBirds source tree under opensim/addon-modules
|
2011-07-13 22:46:09 +00:00
|
|
|
|
|
|
|
./runprebuild.sh against opensim root to build this module into the solution
|
2014-12-31 18:50:48 +00:00
|
|
|
then xbuild, or build within Visual Studio / Monodevelop to produce the binaries.
|
|
|
|
Remember you need an .ini file in bin/addon-modules/OpenSimBirds/config/
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-24 16:29:19 +00:00
|
|
|
OpenSimBirds has no external dependencies other than the dlls currently included in opensim.
|
2014-12-31 21:13:16 +00:00
|
|
|
The project generates a single dll - OpenSimBirds.Module.dll which is copied into opensim/bin as part of the build step
|
2011-07-13 22:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
|
2014-12-24 16:29:19 +00:00
|
|
|
To become active, the module needs enabled in the ini file. Otherwise it does nothing on startup.
|
|
|
|
If you are running multiple regions on one simulator you can have different Birds
|
|
|
|
settings per region in the configuration file, in the exact same way you can
|
|
|
|
customize per Region setting in Regions.ini
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-31 18:50:48 +00:00
|
|
|
The configuration file for this module should be placed in:
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-31 18:50:48 +00:00
|
|
|
bin/addon-modules/OpenSimBirds/config/OpenSimBirds.ini
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-31 18:50:48 +00:00
|
|
|
and follows the similar format as a Regions.ini file, where you specify setting for
|
|
|
|
each region using the [Region Name] section heading. There is an example .ini file
|
|
|
|
provided which should be edited and copied to the correct place above.
|
2014-12-24 16:29:19 +00:00
|
|
|
|
|
|
|
Here is an example config:
|
|
|
|
|
|
|
|
;; Set the Birds settings per named region
|
|
|
|
|
|
|
|
[Test Region 1]
|
|
|
|
|
|
|
|
BirdsEnabled = True ;set to false to disable the module in this region
|
2015-01-02 15:45:17 +00:00
|
|
|
BirdsFlockSize = 50 ;the number of birds to flock
|
|
|
|
BirdsMaxFlockSize = 100 ;the maximum flock size that can be created (keeps things sane)
|
2014-12-24 16:29:19 +00:00
|
|
|
BirdsMaxSpeed = 3 ;how far each bird can travel per update
|
|
|
|
BirdsMaxForce = 0.25 ;the maximum acceleration allowed to the current velocity of the bird
|
|
|
|
BirdsNeighbourDistance = 25 ;max distance for other birds to be considered in the same flock as us
|
|
|
|
BirdsDesiredSeparation = 20 ;how far away from other birds we would like to stay
|
|
|
|
BirdsTolerance = 5 ;how close to the edges of things can we get without being worried
|
|
|
|
BirdsBorderSize = 5 ;how close to the edge of a region can we get?
|
|
|
|
BirdsMaxHeight = 256 ;how high are we allowed to flock
|
2015-01-02 15:45:17 +00:00
|
|
|
BirdsUpdateEveryNFrames = 1 ;update bird positions every N simulator frames
|
2014-12-24 16:29:19 +00:00
|
|
|
BirdsPrim = seagull01 ;By default the module will create a flock of plain wooden spheres,
|
|
|
|
;however this can be overridden to the name of an existing prim that
|
|
|
|
;needs to already exist in the scene - i.e. be rezzed in the region.
|
2011-07-13 22:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Various runtime commands control the flocking module behaviour - described below. These can either be invoked
|
2014-12-31 21:13:16 +00:00
|
|
|
from the Console or in world by directing them to a chat channel. You can specify which channel to use in the .ini:
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-31 21:13:16 +00:00
|
|
|
BirdsChatChannel = 118 the chat channel to listen for Bird commands on
|
2011-07-13 22:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Runtime Commands
|
|
|
|
|
|
|
|
The following commands, which can either be issued on the Console, or via a chat channel in-world, control the behaviour
|
|
|
|
of the flock at runtime
|
|
|
|
|
2014-12-31 21:17:48 +00:00
|
|
|
birds-stop or /118 stop ;stop all birds flocking
|
|
|
|
birds-start or /118 start ;start all birds flocking
|
|
|
|
birds-enable or /118 enable ;enable the flocking simulation if disabled
|
|
|
|
birds-disable or /118 disable ;stop all birds and remove them from the scene
|
|
|
|
birds-size <num> or /118 size <num> ;change the size of the flock
|
|
|
|
birds-prim <name> or /118 prim <name> ;change the bird prim to one already rezzed in the scene
|
|
|
|
birds-framerate <num> or /118 framerate <num> ;only update the flock positions every <num> frames
|
2014-12-24 16:29:19 +00:00
|
|
|
;only really useful for photography and debugging bird
|
2014-07-19 13:45:21 +00:00
|
|
|
;behaviour
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-24 16:29:19 +00:00
|
|
|
Bird prims
|
2011-07-13 22:46:09 +00:00
|
|
|
|
2014-12-24 16:29:19 +00:00
|
|
|
Any currently rezzed in-scene-object can be used as the bird prim. However fps is very much affected by the
|
2011-07-13 22:46:09 +00:00
|
|
|
complexity of the entity to use. It is easier to throw a single prim (or sculpty) around the scene than it is to
|
|
|
|
throw the constituent parts of a 200 linked prim dragon.
|
|
|
|
|
|
|
|
Tests show that <= 500 single prims can be flocked effectively - depending on system and network
|
|
|
|
However maybe <= 300 simple linksets can perform as well.
|
|
|
|
|
2015-01-02 15:28:10 +00:00
|
|
|
Network Traffic:
|
|
|
|
|
|
|
|
I tested the amount of network traffic generated by bird updates. 20 birds (each with 4 linked prims) takes up about 300kbps
|
|
|
|
in network position updates. 50 of the same birds generates about 750kbps traffic.
|
|
|
|
Each bird uses roughly 15kbps of network traffic. This is all measured using an update framerate of 1, i.e. birds' position
|
|
|
|
is updated every simulator frame.
|
|
|
|
|
2011-07-08 17:57:07 +00:00
|
|
|
|
2011-07-13 22:46:09 +00:00
|
|
|
Please Note
|
|
|
|
|
2014-12-31 18:50:48 +00:00
|
|
|
This module is currently only tested against opensim master.
|
2011-07-08 17:57:07 +00:00
|
|
|
|
|
|
|
Licence: all files released under a BSD licence
|
2014-12-24 16:29:19 +00:00
|
|
|
If you have any question please contact Jak Daniels, jak@ateb.co.uk
|