Input/Output files
Input files define the content of the scene, the animation and the environment setup. All input files can be specified using URL parameters. If not explicitly specified, VEB.js will try to load the animation and environment file of a scene according to the following convention. Given a scene file named scene.json, the convention is that the corresponding animation file is named scene_anim.json. and the environment file scene_env.json.
Examples of input files are provided in the Use Case section.

Scene

Scenes can be imported/exported from/to a .json file according to a specific schema.

Animation

The animation of the scene can be defined in a .json file together with additional data (e.g. reusable animation sequences) stored as .txt files.

Environment

The environment setup is defined in a .json file according to a schema with the following root properties:
  • "cameras": an array defining cameras to navigate the scene. Each camera can be characterized by "id", "type" (e.g. "FlyCamera", "FreeCamera", "ArcRotateCamera", etc.), "position", "rotation", "speed".
  • "lights": an array defining sources of light in the scene. Each light can be characterized by "id", "type" (e.g. "HemisphericLight", "PointLight", etc.), "position" or "direction", "intensity".
  • "shadows": an object specifying how shadows are generated with properties "darkness", "bias", "environmentIntensity".
  • "datagen": definition of parameters for the generation of data, in particular screenshots. The poperty "cam" defines the movements of the ArcRotateCamera that points the selected mesh in terms of alpha, beta and radius. Alpha and beta are degrees (angles) with a starting value ("alphaMin", "betaMin"), a final value ("alphaMax", "betaMax") and an incremental step ("alphaStep", "betaStep"). The radius is calculated multiplying the diagonal of the selected asset bounding box by a factor that is specified with an initial value ("radiusFactorMin"), a final value ("radiusFactorMax") and an incremental step ("radiusFactorStep").
  • "env":
    • "skyboxTexture": texture to be used for a skybox environment (default "textures/studio.env")
    • "backgroundColor": color of the background defined as an array of floats representing the RGB values (default [0.2,0.2,0.3]
    • "groundTexture": texture to be used for the ground (absent by default)
Last modified 21d ago
Copy link