dynamic_scene_graph.proto
Last update: 17.04.2023 52 // message and EnSight will respond with a sequence of update messages. If the File->Allow push updates
87 // View | Contains timestep and camera information for a tree of geometry. It may contain Group and Part entities.
88 // Group | Child of a View or another Group. It may contain Part and Group entities. Includes a 4x4 matrix transform and arbitrary attributes.
90 // Geom | Child of a Part. Storage for the arrays that define a block of a geometry. Note: a single Geom will have connectivity defining either be LINES or TRIANGLES, not both. Includes: Coordinates, Connectivity, current variable data, edge flags
91 // Variable | Defines variable display properties: Nodal, Elemental, ranges, interpolation, etc. Child of a Scene.
100 // The update process is initiated by the client application unless a SceneClientCommand message
107 // 2. EnSight sends a SceneUpdateCommand UpdateSceneBegin (SceneUpdateCommand::SceneUpdateCommandType::UPDATE_SCENE_BEGIN)
111 // can be of these types (DeleteID, UpdatePart, UpdateGroup, UpdateGeom, UpdateVariable, UpdateView).
114 // 4. EnSight sends a final SceneUpdateCommand UpdateSceneEnd (SceneUpdateCommand::SceneUpdateCommandType::UPDATE_SCENE_END)
167 }
168 int32 version = 1; // The API version number as an integer. It should be the value VersionEnumType::CURRENT_VERSION.
169 }
174 // would like a scene update. The server will respond by starting a scene update command sequence,
175 // beginning with a SceneUpdateCommand message, UpdateSceneBegin sub command. The update sequence
178 // This message also informs the server what the maximum size of a block of data should be (in bytes).
179 // It also can be used to enable "spontaneous" scene updates that can be started by the EnSight server
181 // set the allow_incremental_updates flag to false, suppressing state cache tracking by the server.
183 bool allow_spontaneous = 1; // If true, EnSight is allowed to spontaneously start a scene update. If false, updates can only be initiated by the client via this message.
184 bool allow_incremental_updates = 2; // If true, EnSight is allowed/encouraged to send the minimal number of update packets. If false, the client must re-send the entire scene.
185 int32 maximum_chunk_size = 3; // Sets the maximum payload blocksize in bytes in a single UpdateGeom message (0=unrestricted payload size).
186 bool include_temporal_geometry = 4; // If true, request that the current temporal geometry be sent. If false, the current static view is sent
187 }
191 // Message from client to change some EnSight session state. This command is currently unimplemented. The
192 // intent is that this message would be sent from the VR environment to interact with the EnSight session (e.g. load data, clip plane motion)
199 // This command represents a union of two different base commands: SceneClientInit and SceneClientUpdate. To
200 // use the message, set the command_type to the type of the message and fill in the appropriate ClientCommand
205 INIT = 0; // Initial command to be sent. Can be sent repeatedly to reset session parameters or request a scene update
206 UPDATE = 1; // Undefined at present, but used to send interaction information from VR1 back to EnSight
207 }
218 // Sent to mark the start of an update operation, the scene will not be complete until UpdateSceneEnd is received
220 bool reset = 1; // If true, scene being updated will replace the current scene, client deletes all existing entity definitions. If false, this is an incremental update to be merged into existing scene entities
233 repeated uint64 ids = 1 [packed=true]; // A list of entity ids that have been deleted (and non longer exist in the cache)
246 repeated float timeline = 3; // Start and end time these children are to be displayed, two values.
252 repeated float nearfar = 9; // The distance from the lookfrom point to the near and far clipping planes.
255 }
263 // The material name needs additional work. If 'steel' or 'glass' are specified, are we expecting the client
264 // to come up with shaders for those materials, or just informing that fill_color and shininess parameters
265 // are steel-like or glass-like. General thinking is to use common namespaces (e.g. granta, etc)
266 // for known material specifications and namespace prefixed JSON for others (e.g. ensight:{json payload}
271 CONNECTIVITY = 1; // render the elements defined by the connectivity, triangles or lines. Note: if edgeflags are specified and the connectivity is triangle, element boundaries are to be outlined
272 }
278 }
283 CLAMP = 1; // Like GL_CLAMP_TO_BORDER, except values outside [0,1] get the usual part color/lighting/color by var in DECAL mode, and killed in REPLACE or MODULATE mode.
285 }
288 REPLACE = 0; // 2D texture color replaces all other color. No lighting. Same as DECAL unless wrap mode is CLAMP.
290 MODULATE = 2; // Color as usual with part color, lighting, color by var, etc. Then multiply by the 2D texture color.
291 }
304 repeated float fill_color = 5; // Base color for the part (rgba). If color_variableid is not set, draw the part with this RGB. Even if color_variableid is set, combine RGB from color_variableid with A in fill_color.
305 repeated float line_color = 6; // Used for rendering line connectivity and element boundaries if edgeflags are specified
307 ShadingMode shading = 8; // Defines the location of the normals. If normals are specified per-element, triangles should be shaded as "flat"
316 uint64 alpha_variableid = 16; // If this is set, transparency varies over the part, and comes from the alpha channel for alpha_variableid. It supercedes the alpha value in fill_color.
317 uint64 node_size_variableid = 17; // If the 'render' variable has 'NODES' set, the size of rendered points can vary by the value of a variable instead of the node_size_default.
318 uint64 displacement_variableid = 18; // if this is set, the vector variable should be added to the coordinate variable to generate the final coordinate.
327 // could specify a projected plane for tex coords, then sometimes would not need to send the TEX_COORDINATES update
328 // TBD: "control" variables (e.g. clip plane position, etc) that can be modified in the VR environment
329 // TBD: attributes specific to certain types of parts, like animation options on particle traces
330 // TBD: mirroring/instancing. perhaps add an array of transformation matrices, or just the mirror plane/rotational axis parameters
342 // [EnSight Units]: https://nexusdemo.ensight.com/docs/python/html/ENS_UNITSSchema.html#TOC-ENS_UNITS_SYSTEM "EnSight Units System"
346 // ENS_OBJ_TYPE | The EnSight object type associated with this Group entity (e.g. "ENS_PART", "ENS_CASE", "ENS_VAR").
348 // ENS_UNITS_SYSTEM | The unit system for the a specific ENS_CASE. Encoded in JSON. An example would be: '{"system":"SI","label":"Metric SI","M":"kg","L":"m","T":"s","K":"K","Q":"A","D":"rad","I":"cd","A":"mol"}'. See also [EnSight Units].
349 // ENS_CASE_DATAFORMAT | The EnSight data reader used to load this portion of the tree. An example would be: 'Fluent'.
365 // If triangles, optional edgeflags specify the "line" representation of the triangles (for element outlining)
366 // Otherwise, the geom object can hold the data payloads for other variables tagged via their variable id.
367 // The use of these variables is dictated by fields in the Part entity that note the use of specific
369 // Multiple UpdateGeom packets are send to fill in an entire array, limited by the size specified
371 // target array (in base type units, uint32 or float) and an offset where the payload of a specific
385 }
391 uint64 variable_id = 4; // If the ArrayType is VARIABLE, this is the associated entity id of a Variable
393 repeated float flt_array = 5 [packed=true]; // Used when payload_type is VARIABLE or COORDINATES
394 repeated uint32 int_array = 6 [packed=true]; // Used when payload_type is TRIANGLES, LINES or EDGEFLAGS
395 uint64 chunk_offset = 7; // The offset in "elements" (floats, uint32, etc) of the array represented by this Geom
396 uint64 total_array_size = 8; // The total size in "elements" (floats, uint32, etc) of the array represented by this Geom
399 }
416 // All parts colored by a the same variable in EnSight use the same palette, same var range, etc.
421 // [EnSight Units]: https://nexusdemo.ensight.com/docs/python/html/ENS_UNITSSchema.html#TOC-ENS_UNITS_SYSTEM "EnSight Units System"
425 // ENS_OBJ_TYPE | The EnSight object type associated with this Group entity (e.g. "ENS_PART", "ENS_CASE", "ENS_VAR").
427 // ENS_UNITS_DIMS | The unit dimensionality for the a specific ENS_VAR. An example for a pressure variable would be: 'M/LTT'. See also [EnSight Units].
435 }
444 }
456 // EnSight has a special float value indicating that the variable is undefined for a vertex or element.
457 // Options for drawing these elements are in the UndefinedDisplay enum. The value that means 'undefined' is
464 }
474 PaletteInterpolation pal_interp = 7; // How the color palette specified by levels should be interpolated
475 repeated VariableLevel levels = 8; // The color and var value at palette levels. Lowest to highest.
476 uint32 sub_levels = 9; // The number of "sub-levels" that might be used with BANDED interpolation. The total number of bands is (levels-1)*(sub_levels+1). The color in each level is used on the band at and above the level value, except for the last level's color, which is use on the band below it. Linearly interpolate in RGB space to get the colors of the bands between levels.
478 repeated float undefined_color = 11; // If undefined_display==USE_UNDEF_COLOR, rgb in [0,1] given here
479 bytes texture = 12; // rgba pixel values (rrggbbaa 4 bytes/pixel) in [0,255]. For the color_variableid, use only the rgb portion of this texture. For the alpha_variableid, use only the 'a' portion of this texture. levels[0].value should map to tex coord==0 for banded, 0.5 texel for continuous levels[levels.size()-1].value should map to tex coord==1 for banded, 1 - 0.5 texel for continuous.
525 DELETE_ID = 2; // Tell the client to delete an entity ID that was defined in a previous scene update
532 }
rpc GetSceneStream(stream SceneClientCommand) returns(stream SceneUpdateCommand)
Start a new dynamic scene graph stream.
Definition: dynamic_scene_graph.proto:135
rpc GetAPIVersion(VersionRequest versionrequest) returns(VersionReply)
Get the server version of the dynamic scene graph stream.
Definition: dynamic_scene_graph.proto:140
Aggregate command sent by a dynamic scene graph client.
Definition: dynamic_scene_graph.proto:204
ClientCommandType
Definition: dynamic_scene_graph.proto:207
Request by the client for an EnSight scene update.
Definition: dynamic_scene_graph.proto:183
Update a parameter in the EnSight session.
Definition: dynamic_scene_graph.proto:194
Aggregate command sent by EnSight to a client.
Definition: dynamic_scene_graph.proto:504
TextureSampleMode
Definition: dynamic_scene_graph.proto:298
TextureApplyMode
Definition: dynamic_scene_graph.proto:291
A "knot" point in the palette for the Variable.
Definition: dynamic_scene_graph.proto:398
Request for the server API version.
Definition: dynamic_scene_graph.proto:150