BulletSim/de

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Funktionen der BulletSim-Skripterweiterung)
Line 71: Line 71:
 
== Funktionen der BulletSim-Skripterweiterung ==
 
== Funktionen der BulletSim-Skripterweiterung ==
  
Die Physikerweiterungsschnittstelle wird von BulletSim verwendet, um viele neue Physikfunktionen zu implementieren. Damit diese Funktionen funktionieren, muss die Schnittstelle mod_invoke [[OSSL_Script_Library/ModInvoke|mod_invoke]].
+
Die Physikerweiterungsschnittstelle wird von BulletSim verwendet, um viele neue Physikfunktionen zu implementieren. Damit diese Funktionen funktionieren, muss die Schnittstelle [[OSSL_Script_Library/ModInvoke|mod_invoke]].
  
 
[[BulletSim/ScriptFunctions]]
 
[[BulletSim/ScriptFunctions]]

Revision as of 13:51, 12 January 2022

BulletSim

Contents

BulletSim ist das Modul für OpenSimulator, das mithilfe der Bullet Physics Engine. BulletSim ist das Modul für OpenSimulator, das mithilfe der Second Life kompatibel ist .

Projekt Information

BulletSim/Functionality listet die möglichen physischen Operationen, ihren Implementierungsstatus und alle Hinweise zu ihrer Verwendung auf. Dies ist besonders nützlich für den Fahrzeugbetrieb.

Building

BulletSim-Architektur

BSScene

Simulations Stepper. Step Events (Pre-Step-Event, Post-Step-Event).

Voraussetzung für die Steuerung von Physik-Engine-Modifikationen mit dem Taint-System (normale Taints, Post-Taints).

Detailprotokollierungssystem.

Parametersystem.

BSPhysObject

Children klassen von BSPrim und BSCharacter.

Terrain

Einschränkungen

Bullet Implementierungen

BulletSim ist ein Wrapper für die Bullet-Physik-Engine. Die Schnittstelle aus der virtuellen Welt, die BulletSim an die Physik-Engine anpasst, wird durch die abstrakte Klasse beschrieben BSAPITemplate. Es gibt zwei Instanzen dieser Klasse BSAPIXNAund BSAPIUnman.

BSAPIUnman enthält die Verbindung zur nicht verwalteten DLL/SO, die die C++ Version der Bullet Physik Engine ist. Die Quellen und Build-Anweisungen sind verfügbar unter git://opensimulator.org/git/opensim-libs/trunk/unmanaged/BulletSim.

BSAPIXNA ist die Verbindung zu einer C# Version von Bullet, deren Quellen hier gehostet werden https://code.google.com/p/bullet-xna/.

Die Auswahl der Physik-Engine erfolgt zur Startzeit der Region. Sie wird pro Simulator mit folgenden INI-Einstellungen angegeben:

    [Startup]
    physics = BulletSim
    [BulletSim]
    BulletEngine = BulletUnmanaged  ; The default
    ; BulletEngine = BulletXNA      ; uncomment this line for C# version of Bullet

Managed/Unmanaged Interface

Linksets

"Actor" Architecture and the Actors

Jedes physische Objekt von BulletSim kann mit einer beliebigen Anzahl von "actors" verbunden sein. Die Aktoren registrieren sich für Simulationsereignisse (in der Regel vor jedem Simulationsschritt aufzurufen) und ändern die physikalischen Parameter des Objekts. Die derzeit implementierten Akteure sind:

   *BSActorAvatarMove: steuert Bewegungen und Treppenlaufen von Avataren;
   *BSActorHover: implementiert vertikales Schweben für Objekte und Avatare;
   *BSActorLockAxis: wendet eine Beschränkung auf physische Objekte an, um eine oder mehrere Winkelachsenbewegungen zu sperren;
   *BSActorMoveToTarget: bewegt ein physisches Objekt an einen Ort;
   *BSActorSetForce: wendet eine kontinuierliche Kraft auf ein physisches Objekt an;
   *BSActorSetTorque: wendet ein kontinuierliches Drehmoment auf ein physisches Objekt an;
   *BSDynamic (Name ändert sich): implementiert SecondLife(r)-Fahrzeugmodell.


Vehicles

BulletSim/Vehicles

BulletSim/VehicleTuning

Siehe auch die archivierte Seite: Vehicles

Funktionen der BulletSim-Skripterweiterung

Die Physikerweiterungsschnittstelle wird von BulletSim verwendet, um viele neue Physikfunktionen zu implementieren. Damit diese Funktionen funktionieren, muss die Schnittstelle mod_invoke.

BulletSim/ScriptFunctions

Avatar Walking Up Stairs

The avatar movement actor include special checks to allow avatars to move up stepped objects (think stairs). The code works by checking for collisions close to the avatar's feet and, if trying to walk forward and not flying, pushing the avatar up to get over the object. This is a different algorithm than ODE which relies on the curvature of the avatar's capsule to move up and over low obstacles.

There are five INI parameters that control stairs:

AvatarStepHeight The maximum height of a step. If the avatar collides with something of less than this height, it will be considered a step and the avatar will consider moving up to get over it;
AvatarStepAngle The maximum angle of the collision surface to consider it a step. If set to zero, for instance, the step faces must be perfectly vertical before it would be considered a step surface. Typical value is 0.3f which allows some step variability;
AvatarStepGroundFudge A small fudge factor subtracted from the computed base of the avatar when checking if the collision is close to the avatar's feet. The base of the avatar computation can be a little high (above the ground) so this factor allows comparing lower for the step. This can prevent small bumps on the ground being too small to be considered a step (which causes the bump to act like a wall);
AvatarApproachFactor The angle the step must be approached. This is the radians of the angle between the avatar and the colliding step surface. This prevents walking up things when approached from a wide angle. The default of 0.6 is about a 45 degree approach angle. Setting this down to 0.3, for instance, requires the avatar to be walking nearly directly into the step to get the up actions.
AvatarStepUpCorrectionFactor A multiplication factor for changing the avatar's position to get over the step. The height of the collision with the step is multiplied by this factor and that number is added to the avatar's Z coordinate. This moves the avatar up in relation to the step. If this factor is less than zero, the AvatarStepHeight is used.
AvatarStepForceFactor A force factor to push the avatar up to get over the step. An up force of the step collision height times the avatar mass times this factor is applied to the avatar. These last two factors can be used in combination for moving the avatar when a step is collided with.
AvatarStepSmoothingSteps when an avatar walks up the steps, collisions go on and off as the steps are hit and moved over. This is the number of simulator ticks (about 10 per second) that walking up steps will still be performed after the last step collision is sensed. This smooths out the action a little.

The default values are:

[BulletSim]
    AvatarStepHeight = 0.6
    AvatarStepGroundFudge = 0.1
    AvatarStepApproachFactor = 0.6
    AvatarStepUpCorrectionFactor = 1.0
    AvatarStepForceFactor = 2.0
    AvatarStepSmoothingSteps = 1

Other Notes

Adjusting Avatar Height

As of May 13, 2013, BulletSim uses the Bullet capsule shape to approximate a standing avatar. One oddity of the capsule is its height which doesn't scale nicely in the way OpenSimulator would like. To fix this, several adjustment parameters are available to correct the avatar capsule height so that an avatar properly appears to be standing on the ground rather than floating over or sunk into the ground.

These parameters are:

INI varaible Default Description
AvatarHeightMidFudge 0.0 This is a fudge factor added to the 50% avatar height (about 1.87 meters). This number is added to the total height so adjusting this number moves the whole capsule up and down by roughly this distance.
AvatarHeightLowFudge 0.0 This factor is added to the height at the low end of the height scale ("0%" height which is about 1.62 meters). This number is scaled proportionally from the mid height to the low height. Adjusting this number adjusts the height of the capsule for small shapes.
AvatarHeightHighFudge 0.0 This is similar to AvatarHeightLowFudge but it is applied to the high end of height ("100%" height which is about 2.12 meters). It is also added proportionally from the mid height to the large height.
Personal tools
General
About This Wiki