VES/KiwiViewer Scene File: Difference between revisions

From KitwarePublic
< VES
Jump to navigationJump to search
(Created page with "KiwiViewer Scene File")
 
No edit summary
Line 1: Line 1:
KiwiViewer Scene File
===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 <b>.kiwi</b>.
 
===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 <b>filename</b>.  The available headers are: <b>filename, url, r, g, b, a</b>.  The <b>r, g, b</b> columns specify the dataset color.  The <b>a</b> 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:
<pre>
filename
foo.obj
bar.obj
</pre>
 
This file specifies two datasets.  The first dataset will be downloaded from a URL, the second will not be.
<pre>
filename,url
foo.obj,http://example.com/foo.obj
bar.obj,
</pre>
 
Thils file specifies one dataset that will be green and translucent.
<pre>
filename,r,g,b,a
foo.obj,0,1,0,0.5
</pre>
 
===Specifying a URL===
 
You can specify a <b>url</b> column to download datasets.  The file must still have the <b>filename</b> column.  The dataset will be downloaded from the URL and saved to local storage using the value specified in the <b>filename</b> column.  If the scene file is loaded again in the future, and the file still exists on local storage, <b>it will not be downloaded again</b>.
 
===Specifying a filename===
 
The filename specified is relative to the <b>.kiwi</b> scene file.  For examaple, loading the scene file <i>/sdcard/Documents/test.kiwi</i> that specifies a filename <i>models/foo.obj</i> will open the file <i>/sdcard/Documents/models/foo.obj</i>

Revision as of 19:04, 13 February 2012

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