VES/KiwiViewer Scene File

From KitwarePublic
< VES
Revision as of 19:04, 13 February 2012 by Patmarion (talk | contribs)
Jump to navigationJump to search

Introduction

KiwiViewer can load scenes consisting of multiple datasets by reading a scene description file. The file has a simple comma-separated-value format. The file extension should be .kiwi.

Separators

Each field should be separated by a comma without leading or trailing spaces. Fields are not quoted.

Headers

The first row of the file contains text column headers, separated by comma. The order of the columns does not matter. The file may contain extra columns, they will be ignored. The only required header is filename. The available headers are: filename, url, r, g, b, a. The r, g, b columns specify the dataset color. The a column specifies alpha (transparency). Color and alpha are specified using decimal numbers between 0.0 and 1.0. If color is not specified, it will default to white. If alpha is not specified, it defaults to 1.

Example Files

This file specifies two datasets:

filename
foo.obj
bar.obj

This file specifies two datasets. The first dataset will be downloaded from a URL, the second will not be.

filename,url
foo.obj,http://example.com/foo.obj
bar.obj,

Thils file specifies one dataset that will be green and translucent.

filename,r,g,b,a
foo.obj,0,1,0,0.5

Specifying a URL

You can specify a url column to download datasets. The file must still have the filename column. The dataset will be downloaded from the URL and saved to local storage using the value specified in the filename column. If the scene file is loaded again in the future, and the file still exists on local storage, it will not be downloaded again.

Specifying a filename

The filename specified is relative to the .kiwi scene file. For examaple, loading the scene file /sdcard/Documents/test.kiwi that specifies a filename models/foo.obj will open the file /sdcard/Documents/models/foo.obj