Virtual Learning Factory Toolkit
  • Virtual Learning Factory Toolkit
  • VLF Knowledge Base
    • Factory Data Model
      • OWL Classes
      • SPARQL Queries
      • SPARQL Updates
    • Instantiation of Factory Models
      • Assets
        • Assets in Spreadsheet
        • Assets in JSON
        • Assets in Ontology
      • 3D Models of Assets
        • 3D Models for Virtual Reality
      • Statechart
      • Animations
      • Data Repositories
        • Local Repository
        • Remote Repository
  • VLF Tools and Libraries
    • OntoGui
      • Modules
        • Control Panel
        • Individual Manager
        • System Design
        • Utilities
      • Personalization
    • OntoGuiWeb
      • Modules
        • Control Panel
        • SPARQL
        • Graphs OWL
        • Utilities
        • Asset Design
        • System Design
        • System Control
        • Performance Evaluation
        • MQTT Sync
        • Virtual Environment
        • Graphs Eng
        • StateChart
      • Personalization
    • jsimIO
      • How to start
      • JMT Overview
        • JSim
          • Model generation
          • Launch of the simulation
          • Reporting
        • Bibliography
    • VEB.js
      • Functionalities
      • Input/Output files
      • Integration with other software tools
      • Advanced Users
    • ApertusVR
    • MTM
      • How to start
      • Formalise the process
      • Prepare input data
      • Execution and results
    • MOST
      • How to start
      • Formalise the process
      • Prepare input data
      • Execution and results
    • RULA
      • How to start
      • Formalise the process
      • Prepare input data
      • Execution and results
    • OCRA
      • How to start
      • Prepare input data
      • Execution and results
  • Use Cases
    • Automated Assembly Line
    • Assets and Animations
    • Modelling of Factory Assets
      • Modelling of an Assembled Product
      • Modelling of a Workstation
      • 3D Modelling of a Workstation for Virtual Reality
    • Process Modelling
      • Modelling an Assembly Process
    • Modelling of a manufacturing system
      • Modelling in OntoGui
      • Modelling a Job Shop using OntoGui
      • Modelling of a Flow Shop using OntoGui
      • Modelling a Hybrid Flow Shop using OntoGui
      • Modelling an assembly system using OntoGui
    • Performance evaluation using jsimIO
      • Performance evaluation of a manufacturing system
        • Performance evaluation in Jsim
        • Performance evaluation of a Flow Shop using Jsim
        • Performance Evaluation of a Job Shop using JSim
        • Performance evaluation of a Hybrid Flow Shop using Jsim
        • Performance evaluation of an assembly system using Jsim
      • jsimIO Assembly
      • jsimIO Automatic
      • jsimIO Production
  • Classworks
  • Advanced Features
    • JMT model
      • Automatic generation of a JMT model
      • Automatic generation of animations
    • Enabling technologies
      • Node-RED
        • Node-RED tutorial
      • RDF libraries
Powered by GitBook
On this page
  • Schema
  • Context
  • Nodes
  • Sequences
  • Animation sequence
  • Examples

Was this helpful?

  1. VLF Knowledge Base
  2. Instantiation of Factory Models

Animations

PreviousStatechartNextData Repositories

Last updated 1 day ago

Was this helpful?

The animation of assets in a factory model can be defined according to the JSON schema described in this section. is a lightweight text-based data-interchange format that is easy to read/parse and write/generate both for humans and machines. A .json file can be opened with any basic or advanced text editor (e.g. , ).

Schema

The schema is composed of three root properties:

  • “”: set of properties of initial setup for the whole animation

  • "": an array defining what happens during the animation

  • "": an array defining animation sequences

  • "bookmarks": an array defining bookmarks

Context

The “context” is characterized by the following set of properties:

  • "UnitOfMeasureScale": (optional) unit of measure scale (e.g. 0.01 stands for centimeter, whereas 1 stands for meter). If not defined, then the unit of measure of the associated scene is adopted.

  • "assetTrail": value set to true if trails (red lines) must be shown to track the movements of moving assets, false otherwise to hide all trails.

  • "Repo3dModel": Path of the repository where the 3D models can be found. Repo3dModel can be defined as absolute or as relative to the application path. The file path of 3D models is defined relatively to Repo3dModel (e.g. '/repository/', 'https://example.com/datarepository/').

  • "RepoAnim": Path of the repository where the animation sequences can be found. RepoAnim can be defined as absolute or as relative to the application path. The file path of animation sequences is defined relatively to RepoAnim (e.g. '/repository/', 'https://example.com/datarepository/').

Nodes

Each item in the “nodes” array contains the following properties (all required):

  • "actions": array of actions that are relevant for the animation

Each item in the “actions” array contains the following properties (all required):

  • "trigger": specifying when the action takes place with properties “type” and “data”

  • "event": specifying what action takes place with properties “type” and “data”

Possible values for “type” of “trigger”:

  • "timestamp": the value in “data” is interpreted as time in milliseconds after the start of animation

Possible values for “type” of “event”:

  • “show”: the asset is shown in the scene. The place where the asset appears is defined with additional properties (as for the scene definition): "position" (default value [0.0,0.0,0.0]), “scale" (default value [1.0,1.0,1.0]), "rotation" (default value [0.0,0.0,0.0] Euler angles YXZ in radians), "placementRelTo". For instance, if only "placementRelTo" is defined, then position, scale and rotation have default values.

  • “attach”: the asset keeps its absolute position, rotation and scale, but its location in the scene graph is updated according to the value of property "placementRelTo". If "placementRelTo" is empty or not defined, then the asset is attached to the root node in the scene graph.

  • “hide”: the asset is hidden from the scene

  • “state”: the asset changes its state in terms of 3D representation and description. The state is specified by the following properties, all optional:

    • “data” property is a string with the file path of the 3D representation file (e.g. .obj). The new 3D representation completely replace the (possibly) existing mesh while inheriting its attributes (e.g. position, rotation, scaling).

    • "descr" is a string with the description of the current state. This description is incremental and does not replace the static description of the asset.

  • “link”: link to a (text) file that is specified by the following properties:

    • “data” is a string with the local file path

    • "descr" is a string with the description of the content that is found at the link

    • “URL” is the address where the file can be downloaded from

  • “trail”: setting the visualization of the trail (red line) to track movements of the specific asset with the following property.

    • “value” is a boolean set to true if the trail generation is started, false if the trail generation is stopped.

  • "sendEvent": send an event to the asset with the following properties:

    • "data": id of the event that is sent.

Sequences

Each item in the “sequences” array contains the following properties:

  • "id": unique identifier of the animation sequence

  • "FPS": [optional, required if property "seq" is not defined] integer defining the FPS (frame per second).

  • "pos": [optional, required if property "seq" is not defined] array of positions in the 3D space for each frame

  • "rot": [optional, required if property "seq" is not defined] array of rotations (as Euler angles YXZ in radians or alternatively as quaternion for "animation" and axis-angle for "animationAdditive") in the 3D space for each frame

Animation sequence

The animation (“animation” or “animationAdditive”) sequence can be defined in a .txt file as a list of numerical values to be interpreted as follows:

  • The first line defines the total number of frames (N) in the file.

  • The second line defines the FPS (frame per second).

  • Lines from 3 till N+2 define the position in the 3D space for each frame.

  • Lines from N+3 till 2*N+2 define the rotation (as Euler angles YXZ in radians or alternatively as quaternion for "animation" and axis-angle for "animationAdditive") in the 3D space for each frame.

Examples

"id": unique identifier of the that is characterized in terms of animation [required]

"animation": animation of the asset starts. The value of “data” property defines the animation sequence to be employed, specified either as the or as the path of the . The positions and rotations are defined in absolute terms, but if the additional property “placementRelTo” is defined then it must be intended in relative terms.

"animationAdditive": animation of the asset starts. The value of “data” property defines the animation sequence to be employed, specified either as the or as the path of the . The animation is intended as additive (incremental) with respect to the current placement (position, rotation) of the asset.

instantiated in a JSON file are available together with the corresponding JSON file instantiating the scene and assets. Animations can be played in .

Examples of animation
VEB.js
JSON (JavaScript Object Notation)
NotePad++
Visual Studio Code
context
nodes
sequences
ID of an item in the array of "sequences"
file (.bin or .txt) containing the animation sequence as text
ID of an item in the array of "sequences"
file (.bin or .txt) containing the animation sequence as text
asset