source: trunk/packages/vizservers/nanovis/protocol-nanovis.txt @ 3630

Last change on this file since 3630 was 3630, checked in by ldelgass, 7 years ago

Nanovis refactoring to fix problems with scaling and multiple results.
Do rendering in world space to properly place and scale multiple data sets.
Also fix flows to reduce resets of animations. More work toward removing
Cg dependency. Fix panning to convert viewport coords to world coords.

  • Property svn:eol-style set to native
File size: 8.8 KB
Line 
1================================================================================
2
3 Copyright (C) 2004-2013  HUBzero Foundation, LLC
4
5================================================================================
6Protocol for nanovis render server. 
7
8Commands take the general form of command and arguments using Tcl syntax and are
9terminated by a newline.  Some command arguments expect a Tcl list which can be
10sent by enclosing the list in curly braces to prevent the interpreter from
11splitting the list into multiple arguments.  Likewise, strings with spaces
12should be quoted or enclosed in curly braces.  In the documentation below,
13arguments are indicated by angle brackets and optional arguments are surrounded
14by question marks -- the brackets and question marks are not part of the
15protocol and should not be included in argument strings.  The arguments shown
16in angle brackets should be replaced with a string (where there are fixed
17choices this document indicates valid values by separating them with pipe
18symbols), a list in Tcl syntax, or a numeric value.  Boolean arguments can take
19the form of 0|1, true|false, or yes|no.  Since the protocol commands are
20executed in a Tcl interpreter, Tcl code such as math expressions in expr
21commands enclosed in square brackets are also allowed.  Since the interpreter
22is a "safe" interpreter, some Tcl commands that could cause security issues may
23not be available for use.
24
25Some commands such as the 'flowvis add' commands create Tcl objects within the
26server's interpreter.  The name sent as an argument when adding the object can
27then be used as a protocol command.  For example, the string sent as the <name>
28argument to 'flowvis add' can then be used in place of <flowObj> in the commands
29documented below.  The flow object name also creates a volume name that can
30be used in volume and cutplane commands, but in that case the name is used as
31an argument to the volume or cutplane commands rather than as the command
32itself.
33
34When binary data is to be sent, it should follow the newline after a command
35that indicates incoming data including a byte count argument.
36================================================================================
37================================================================================
38Requests:
39================================================================================
40axis visible <bool>
41
42camera angle <xAngle> <yAngle> <zAngle>
43       ** Deprecated, use camera orient **
44camera orient <quatW> <quatX> <quatY> <quatZ>
45camera pan <x> <y>
46camera pos <x> <y> <z>
47camera reset <?all?>
48camera zoom <factor>
49
50clientinfo <list>
51
52cutplane position <relval> <x|y|z> <?names?>
53         Set the position of a volume cutplane.  Names is
54         an optional list of volume names.
55         relval = [0,1]
56cutplane state <bool> <x|y|z> <?names?>
57         Set the axis (normal) of a volume cutplane.  Names is
58         an optional list of volume names.
59
60flow add <name> <?option value...?>
61         <name> is an object name to use in <flowObj> commands
62         In addition, a volume is added with the same name
63         which can be used in volume and cutplane commands
64         see '<flowObj> configure' for switch options
65flow delete <names>
66flow exists <name>
67     This doesn't currently produce a response, it only returns a boolean
68     within the server's interpreter
69flow goto <nSteps>
70flow names
71     This doesn't currently produce a response, it only returns a Tcl list
72     within the server's interpreter
73flow next
74flow reset
75flow video <token> <?switches...?>
76     -bitrate <val>
77     -format <mpeg|theora|mov>
78     -framerate <val>
79     -height <val>
80     -numframes <val>
81     -width <val>
82
83<flowObj> box add <name> <?switches...?>
84          See '<flowObj> box configure' for switches
85<flowObj> box configure <name> <?switches...?>
86         -color <{r g b a}>
87         -corner1 <{x y z}>
88         -corner2 <{x y z}>
89         -hide <bool>
90         -linewidth <val>
91<flowObj> box delete <names>
92<flowObj> box names
93          This doesn't currently produce a response, it only returns a Tcl list
94          within the server's interpreter
95
96<flowObj> configure <?option value...?>
97          -ambient <val>
98          -arrows <bool>
99          -axis <x|y|z>
100          -diffuse <val>
101          -hide <bool>
102          -light2side <bool>
103          -opacity <val>
104          -outline <bool>
105          -position <val|%val>
106           val = world coordinate, or %val = [0,100]
107          -slice <bool>
108          -specularExp <val>
109          -specularLevel <val>
110          -transferfunction <name>
111          -volume <bool>
112<flowObj> data file <fileName> <numComponents>
113          Load a data file.  fileName is path to file on server
114<flowObj> data follows <nbytes> <numComponents>
115          Send flow data.  Data bytes follow the newline after the command
116<flowObj> legend <w> <h>
117
118<flowObj> particles add <name> <?switches?>
119          see '<flowObj> particles configure' for switches
120<flowObj> particles configure <name> <?switches?>
121          -axis <x|y|z>
122          -color <{r g b a}>
123          -hide <bool>
124          -position <val|%val>
125           val = [0,100], or %val = [0,1]
126          -size <val>
127<flowObj> particles delete <names>
128<flowObj> particles names
129          This doesn't currently produce a response, it only returns a Tcl list
130          within the server's interpreter
131
132grid axiscolor <red> <green> <blue> <?alpha?>
133grid axisname <x|y|z> <name> <units>
134grid linecolor <red> <green> <blue> <?alpha?>
135grid visible <bool>
136
137heightmap create <heightmapName> <xMin> <yMin> <xMax> <yMax> <xNum> <yNum> <valueList>
138heightmap cull <none|back|front>
139heightmap data follows <nBytes> <heightmapName>
140          After newline following command, nBytes of data are sent
141heightmap data visible <bool> <?heightmapNames?>
142heightmap legend <heightmapName> <width> <height>
143heightmap linecontour color <red> <green> <blue> <?heightmapNames?>
144heightmap linecontour visible <bool> <?heightmapNames?>
145heightmap opacity <value> <?heightmapNames?>
146heightmap polygon <wireframe|fill>
147          **Warning: This is a global setting**
148heightmap shading <flat|smooth>
149          **Warning: This is a global setting**
150heightmap transfunc <transferFunctionName> <?heightmapNames?>
151
152legend <transferfunc name> <width> <height>
153       Request render of transfer function
154
155screen bgcolor <r> <g> <b>
156       Set screen background color
157screen size <width> <height>
158       Set size of rendered images
159
160snapshot
161         Render a 2k x 2k image (offscreen buffer). Response image data is tagged
162         as '-type print'
163
164transfunc define <name> {colors} {alpha}
165          colors => 1 line each of "value r g b"
166          alpha => 1 line each of "value alpha"
167          value => [0,1]
168
169up <x|y|z|-x|-y|-z>
170   Set orientation of volumes
171
172volume animation capture <numframes> <?filename?>
173       This is not fully implemented.  Rendered frames are not returned
174       to the client.
175volume animation clear
176volume animation start
177volume animation stop
178volume animation volumes <?names?>
179
180volume data follows <nbytes> <name>
181volume data state <bool> <?names?>
182volume delete <names>
183volume exists <name>
184       This doesn't currently produce a response, it only returns a boolean
185       within the server's interpreter
186volume names
187       This doesn't currently produce a response, it only returns a Tcl list
188       within the server's interpreter
189volume outline color <r> <g> <b> <?names?>
190volume outline state <bool> <?names?>
191volume outline visible <bool> <?names?>
192volume shading ambient <value> <?names?>
193volume shading diffuse <value> <?names?>
194volume shading isosurface <bool> <?names?>
195volume shading light2side <bool> <?names?>
196volume shading opacity <value> <?names?>
197volume shading specularExp <value> <?names?>
198volume shading specularLevel <value> <?names?>
199volume shading transfunc <tfName> <?names?>
200volume state <bool> <?names?>
201
202================================================================================
203Replies:
204================================================================================
205nv>legend <volume> <min> <max> <nbytes>
206  (followed by bytes)
207
208nv>image -type image -bytes <nbytes>
209  (followed by bytes)
210
211nv>image -type print -bytes <nbytes>
212  (followed by bytes)
213
214nv>image -type movie -token <token> -bytes <nbytes>
215  (followed by bytes)
216
217nv>data tag <dataobj-tag> min <val> max <val> vmin <val> vmax <val>
218   The min,max data values for the data object and the cumulative volume data
219   min,max over all volumes
220
221nv>data tag <flow-tag> min <val> max <val>
222   Sent after a "<flowObj> data follows...".  Min,max values are for the
223   magnitude of the vector field.
224
225================================================================================
226Error Replies:
227================================================================================
228nv>viserror -bytes <nbytes>
229   <multi-line error string of nbytes>
230================================================================================
Note: See TracBrowser for help on using the repository browser.