Apertus
  • Documentation
  • Introduction
    • Definitions
      • Coordinate systems
      • Primitives
    • Features
      • Basic
        • Nodes
        • Light sources
        • Geometries
        • Primitives
        • Texts
      • Environment simulation
        • Water
        • Sky
        • Terrain
      • Browser
      • UI technologies
        • HTML UI
        • Presentation
        • Gallery
      • PointCloud
      • 360
        • 360 Images
        • 360 Videos
      • 3D Model Formats
      • Scene Sharing
        • Multiplayer
      • Video and Voice Chat
      • Hand Tarcking
        • Leap Motion
      • Head Tracking
        • Fob
      • Displays
        • Multi Display
        • Cave System
        • HMDs
      • Industry
        • IoT, and Sensors
        • Robot monitoring
        • Robot calibration
  • Developers
    • Development Cycle
    • Architecture
      • Project folders
      • Configuration ecosystem
    • API
      • C++ API
      • JavaScript API
      • HTTP REST API
    • Getting Started
      • Creating a plugin
      • Creating a sample
  • Contribute
    • Report a Bug
    • Suggest a Feature
  • Tutorial - How to visualize CAD models in VR
    • Introduction
    • Import CAD Models
    • Convert CAD Models
    • Create Low-poly from CAD Models
    • Create Photorealistic CAD Models
  • Plugins - Photorealistic Render
  • Plugins - Physics
  • Tutorial - How to visualize Tensorflow training in VR
  • Tutorial - Virtual Learning Factory Toolkit Gamification
  • Overview
    • Introduction
    • Architecture
    • Use Cases
  • Installation
    • Windows
    • Android
      • How to use
      • Writing an application
    • MacOS
  • Build
    • Windows
      • How to build the source on Windows
    • Android
    • MacOS
  • Plugins on Windows
    • Photorealistic Render
      • How to use
      • How to configure
      • Features
      • Sample
    • Physics
      • How to use
      • How to configure
      • Features
      • Samples
      • Demo video
  • Plugins on Android
    • Java Native Interface
      • How to use
      • Extending the API
    • Filament render
      • How to use
      • How to configure
      • Developers
  • Plugins on MacOS
    • Untitled
  • Samples on Windows
    • Deep learning
      • Untitled
      • Use the Fastai-PythorchVR Sample
      • Use the HTTP API
      • Create HTTP Requests from Python
      • Demo video
    • Virtual Learning Factory Toolkit Gamification
      • Installation
      • Lobby - User Interface
      • Local - User Interface
      • Student - User Interface
      • Teacher - User Interface
      • VLFT Gamification Session
      • VR Mode
  • Virtual Learning Factory Application
    • Installation on Windows
    • Installation on Apple
    • Lobby
    • Single Player
    • Multi Player - Student
    • Multi Player - Teacher
Powered by GitBook
On this page
  1. Plugins on Windows
  2. Physics

How to configure

In this section we'll discuss how you can configure the Bullet plugin.

PreviousHow to useNextFeatures

Last updated 5 years ago

In ApertusVR all of the plugins are configurable by a json file belonging to the plugin. That means you must have an apeBulletPlugin.json config file too. If you don't know how to create one, please check the former section about how to use BulletPhysics plugin.

The particular json file, what is belonging to Bullet plugin must look something like this:

apeBulletPlugin.json
{
  "maxSubSteps": 1000,
  "fixedTimeStep": 0.0046,
  "forceScale": 100,
  "gravity": [0, -10, 0]
  "bouyancy": {
    "liquidHeight": 0.0,
    "liquidDensity": 1.0
  },
  "waterWave": 
    "direction": [-0.5, -4, 0]
    "freq": 5.0,
    "duration": 1.0
  }
}

Compared to the other plugins, you don't have much option to configure, but let's get through it!

  • The first two property is responsible for the performace.

  • The third parameter is a scaling parameter for handling the differences between bullet's and ApertusVR's unit of distance. Roughly 1 unit in ApertusVR is 1cm, and 1 unit in Bullet Dynamics World is 1m. Therefore most of the time we need a force scale equal 100. However it can be a great opportunity to use this scaling for debug too.

  • The next property we discuss is the gravity. You can set any vector for gravity in Bullet Physics, so why couldn't you do it in ApertusVR? If you set it to (0,-10,0) like we did on this code sample, you get -10m/s gravity acceleration for each of your rigid body on your scene (since the forceScale is 100). Simple, isn't it?

  • The next two property are responsible for the liquid simulation. Let's start with the '"bouyancy". It has two other properties inside. The first tells the plugin where the water's (or any liquid's) surface, and the second tells us what is the density of the liquid. It's recommended to set the liquid density around 1.0.

  • If you simulating some kind of water scene, you can generate waves for it as well. That's just applying some force in a certain frequency in a certain direction, and apply it until the given duration lasts. The goal of this isn't a physically realistic wave simulation, just a good opportunity to use it in game, like the waterGame sample.

If you got this far, that means you are able to configure your Bullet Plugin as you desire. In the next section we will look through what features are provided by the plugin for adjusting a particular rigid body.

How to use