Client_EN - CCSEPBVR/CS-IS-PBVR GitHub Wiki
The client operates in a client-server mode (hereinafter referred to as Kurasaba mode) in which the remote PC and the user PC communicate and distributes visualization, and in a stand-alone mode in which the generated particle data is displayed. In Kurasaba mode, particle data transmitted as a result of server visualization is received and drawn using OpenGL. Further, the visualization parameters when the server performs volume rendering are entered and sent to the server. Data is sent and received between the client and the server by socket communication using an arbitrary port number. In standalone mode, the particle data file output by the server in batch mode is read and displayed. The method of starting the server is described in Server, and the socket communication method between the remote PC and the user PC is described in Tutorial.
After startup, the client program not only displays the visualization results, but also provides a GUI that can interactively control the visualization parameters.
The visualization results are displayed.
[How to operate]
- Rotate: Drag left with mouse
- Move: Drag right with mouse
- Zoom: Shift + Drag Left or Mouse Wheel + Drag
- Reset: Home button (fn + left arrow on Mac)
[Display contents]
- ColorMapBar: Displays the specified color transfer function
- FPS: Frame rate (frame/sec)
- Time Step: The currently displayed time step
- Orientation Axis
[Display contents]
-
Current Time Step
-
Next Time Step: Specify the time step to be displayed next
-
Min: Specify the interval of the time step (minimum time step)
-
Max: Specify the interval of the time step (maximum time step)
-
(Min:,Max)**: Minimum maximum timestep of the registered object
-
Step Interval: Specify the refresh interval during playback
-
Total Particles: Displays the total number of particles in the displayed particle object
-
Color Function: Display on the screen
-
Show Minimum Steps: Displays the minimum steps in an interval
-
Show Previous Step: Displays the previous step from the currently displayed step
-
Reverse playback: Reverse playback from the currently displayed step
-
Playback: Plays from the currently displayed step
-
Show Next Step: Displays the next step from the currently displayed step
-
Show maximum steps: Displays the minimum step in the interval (press and hold to keep updating with the latest step)
-
Display Arbitrary Step: Displays the time step entered in Next Time Step.
-
Loop: Toggle the loop enabled
- ColorMapBar (checkbox): Specify whether to show or hide the color map bar
- ColorMapBar(Caption): Specify the caption of the colormap bar
- OrientationAxis (checkbox): Specify whether or not to show the orientation box
- OrientationAxis(AxisType): Specify the axis type of the orientation box
- OrientationAxis(BoxType): Specifies the box type of the orientation box
- BackGroundColor: Specify the background color of the screen
- Width: Specify the screen resolution (landscape)
- Height: Specify the screen resolution (portrait)
- Show FPS: Specify whether to show or hide FPS
- Show TimeStep: Specify whether to show or hide the TimeStep
- Font: Specify the font color
- Apply: Apply the content
- Cancel: Discards the contents and closes the panel
- OK: Apply the content and close the panel
- Mode: Specify CS/IS communication
- Sampling Type: Specify the sampling type
- Port: Specify the port number
- Volume Data Dile Path: Specify the volume data
- Transfer Function File Path: Specify the transfer function file
- Cancel: Closes the panel without communicating
- Connect: Start communication with the set contents
In the data properties, the information of the filtered volume data entered is displayed.
- Filter Parameter File: Displays the path of the volume data (pfi or pfl file)
- Vector Number: The number of variables in the volume data
- All Elements:Number of elements in the volume data
- Sub volume: Number of volume data divisions
- Element Type: The element type that constitutes the volume data
- All Nodes: Number of vertices in the volume data
- Step Number: Number of time steps for the volume data
- File Type:Filter decomposition format
- 3D Extent:Minimum and maximum values of X, Y, Z coordinates in the volume data
The Transfer Function Editor allows you to create a transfer function that defines the color and opacity assigned to a physical value. In normal volume rendering, the transfer function is defined by only one physical quantity, but in PBVR
- Assign independent variables to color and opacity.
- Define each variable as an arbitrary function of coordinates X, Y, Z, and variables q1, q2, q3, ...
- Color function of the one-dimensional transfer function is C1, C2、...、 opacity function is O1, O2、... and synthesize them with arbitrary function expressions to define multidimensional transfer functions
By enabling a new transfer function design, we have realized visualization processing with an extremely high degree of freedom.
- Number of Transfer Functions: Specify the limit on the number of transfer functions that can be created.
- Export button: Save the created transfer function to a file
- Import button: Load the created transfer function file
- Apply button: Apply the created transfer function file
- Synthesizer: Specify the composition formula using the color function C1~C[N]*1
- Function: Select the color function C1~C[N] to edit.
- ... Button: Display the Color Function Editor and create a composite variable as an argument for the selected color function C1~C[N].
- C[N] Min:Max: Specifies the minimum maximum value to which the color function is assigned for the composite variable
- C[N] Server side Range Min:Max: Display the minimum and maximum values of the composite variable.
- Sync button: When enabled, the value of C[N]Server side range Min:Max is forcibly adopted.
- Edit Color Map: Opens the Color Map Editor to create a color map for the selected color function.
- Histogram: A histogram of the range of the minimum maximum value specified by C[N]Min:Max is displayed.
- Synthesizer: Specify the composition formula using the opacity function O1~O[N]*1
- Function: Select the opacity function O1~O[N] to edit.
- ... Button: Display the Opacity Function Editor and create a synthetic variate as an argument for the selected opacity function O1~O[N].
- O[N] Min:Max: Specifies the minimum maximum value to which the opacity function is assigned for the composite variate
- O[N] Server side Range Min:Max: Display the minimum and maximum values of the composite variable.
- Sync button: When enabled, the value of O[N]Server side Range Min:Max is forcibly adopted.
- Edit Opacity Map: Opens the Opacity Map Editor to create an opacity map for the selected opacity function.
- Histogram: A histogram of the minimum maximum value range specified by O[N]Min:Max is displayed.
【Operators usable in algebraic expressions】
+, -, , /, ^, sqrt(), cbrt(), log(), log10(), exp(), abs(), floor(), ceil(), sin(), cos(), tan(), asin(), sinh(), cosh(), tanh(), asinh(), acosh(), atanh(), heavi(), rectfunc() Binary functions: sigmoid(,), gauss(,), min(,), max(,)
*1: [N] is the limit value of the transfer function specified in Number of Transfer Functions.
The Color Function Editor allows you to synthesize physical quantities using user-specified algebraic expressions. The synthesized physical quantity is an argument to the color function C1~C[N]. The names of the variables that can be used in algebraic expressions are shown below.
- Physical quantities:q1、q2、q3、... q[N]
- Coordinate values:X、Y、Z
- Color Function List: Displays the transfer function that has been created
- f (algebraic formula): Enter f (variable) corresponding to the transfer function C[N]
- Cancel: Closes this panel without reflecting the settings.
- OK: Reflect the settings and close this panel.
The Opacity Function Editor allows you to synthesize physical quantities using user-specified algebraic expressions. The synthesized physical quantity is an argument to the color function O1~O[N]. The names of the variables that can be used in algebraic expressions are shown below.
- Physical quantities:q1、q2、q3、... q[N]
- Coordinate values:X、Y、Z
- Opacity Function List: Displays the transfer function that has been created
- f (algebraic formula): Enter f (variable) corresponding to the transfer function O[N]
- Cancel: Closes this panel without reflecting the settings.
- OK: Reflect the settings and close this panel.
In Presets, you can select a color map corresponding to C1~C[N] from the pre-prepared color maps
In Freeform Curve, a color map corresponding to C1~C[N] can be created by input of a free curve with the mouse.
- **Selected Drawing Color: Allows you to select a color for overlay
- Reset button: Revert to the color map bar before editing
- Undo button: Undo a single mouse action
- Redo button: Re-execute a canceled mouse operation
In Expression, you can create a color map corresponding to C1~C[N] by writing a mathematical formula.
- R: Describe the color function expression of the R component of the color in an algebraic expression
- G: Describe the color function expression of the G component of the color in an algebraic expression
- B: Write the color function expression of the B component of the color in an algebraic expression
The variable of the color function is x, and the domain of the color function ranges from 0 to 1.
In Control Points, a colormap bar corresponding to C1~C[N] can be created by specifying the control point.
- Number of Control Points: Specify the number of control points
- Point: Specify the value of the control point
- Red: Specify the R component of the color corresponding to the value of the control point
- Green: Specify the G component of the color corresponding to the value of the control point
- Blue: Specify the B component of the color corresponding to the value of the control point.
Each control point is interpolated by a piecewise linear function, and the domain ranges from 0 to 1.
In the Freeform Curve tab, you can create an opacity map corresponding to O1~O[N] by entering a free curve with the mouse.
In Expression, you can create an opacity map corresponding to O1~O[N] by mathematical formula description
In Control Points, an opacity map bar corresponding to O1~O[N] can be created by specifying the control point.
The built-in functions available in the Function Editor used to input transfer function composition, variate synthesis, colormap curves, and opacity curves in the Transfer Function Editor are as follows.
| arithmetic | format |
|---|---|
| + | + |
| × | * |
| / | / |
| Without | without(x) |
| Body | cos(x) |
| Tan | tan(x) |
| Log | log(x) |
| Exp | exp(x) |
| Square root | sqrt(x) |
| power | x^y |
PBVR supports volumetric rendering and composite display with other objects. The supported formats are as follows:
| Formats | Description |
|---|---|
| PointObjectKVSML | Particle Data |
| LAS | Particle Data |
| PTS | Particle Data |
| PolygonObjectKVSML | Untextured Polygon Data |
| stl | Untextured Polygon Data |
| 3ds ※1 | Textured Polygon Data |
| fbx ※1 | Textured Polygon Data |
*1 Loading of 3DS and fbx formats can be used by building a client program with the assimp library and FBXSDK installed.
This function is a function that processes local files divided into one file per time step according to the following naming convention.
prefix_XXXXX.format ※1
*1 XXXXX is the number of time steps displayed in 5 digits.
- Files: Displays registered server objects and local objects.
- Display: Show/hide the object
- Keep Initial: Display the data of the first time step before the start of the time series when displaying data with different starting time steps in a consolidated manner
- Keep Final: Display the data of the final time step after the end of the time series when displaying data with different end timesteps in a consolidated display
- Format: Displays the format of the registered object
- Color: Specify the color of the untextured polygon
- Opacity: Specify the opacity of untextured polygons
- Remove: Removes an object when applying
- ... Button: Specify a local file from the file browser
- Export: Save server particles locally
- Centering: Display objects displayed on the screen so that they fit within the screen
- Apply: Apply the information in Files
The operation when data with different time steps is integrated is described in the figure below (when there is particle data with 1~4 time steps on the server side and 0~3 time steps on the client side).
If the server and client displays are checked, all steps are displayed.
| Step 0 | Step 1 | Step 2 | Step 3 | Step 4 | |
|---|---|---|---|---|---|
| Servers | None | 1 | 2 | 3 | 4 |
| Clients | 0 | 1 | 2 | 3 | None |
If the server's Keep Initial Step is checked, the server's first time step will continue to be displayed.
| Step 0 | Step 1 | Step 2 | Step 3 | Step 4 | |
|---|---|---|---|---|---|
| Servers | 1 | 1 | 2 | 3 | 4 |
| Clients | 0 | 1 | 2 | 3 | None |
If the client's Keep Final Step is checked, the last time step will continue to be displayed.
| Step 0 | Step 1 | Step 2 | Step 3 | Step 4 | |
|---|---|---|---|---|---|
| Servers | None | 1 | 2 | 3 | 4 |
| Clients | 0 | 1 | 2 | 3 | 3 |
You can capture and save what is displayed on the screen in the anime control panel and play it back as a video.
- Keyframe anime
Save the screen information corresponding to the content displayed on the screen as a keyframe at any time. The saved series of keyframes is played back as a video.
[Capture keyframes and save the file]
- Click on the screen window to activate it.
- Press the [x] key on the keyboard for the drawing you want to capture as a keyframe. As a result, the view information for the drawing content at the time of pressing the [x] key is saved in the memory as a keyframe. Repeat the steps 1. 2 as necessary.
- Press the M (Shift+m) keys on your keyboard. This plays the keyframe anime saved in the memory.
- If there is no problem with the playback content, press [S] [Shift + s] on the keyboard and save it to a keyframe file.
[Capture keyframes and save the file]
- Press the L (Shift+l) key on your keyboard to specify the file where the keyframes are stored.
- Click on the screen window to activate it.
- Press the M (Shift+m) keys on your keyboard. This plays the keyframe anime saved in the memory.
The keybindings that can be used with anime controls are shown below.
| Key | Features |
|---|---|
| x | Save view information corresponding to the current viewer display in memory as keyframes |
| d | Delete the last keyframe in memory |
| D | Delete all keyframes in memory |
| M | Anime and pause keyframes in memory |
| S | Saving keyframes in memory to a file |
| L | Anime keyframes loaded from a file into memory |
The file that stores the keyframe information is in binary format. The file format is shown below.
| File Formats |
|---|
| Keyframe Data 1 |
| Keyframe Data 2 |
| : |
The details of the keyframe data are shown below.
| Type | Size (byte) | Applications |
|---|---|---|
| int | 4 | Timesteps |
| float | 4 | rotation[0].x |
| float | 4 | rotation[0].y |
| float | 4 | rotation[0].z |
| float | 4 | rotation[1].x |
| float | 4 | rotation[1].y |
| float | 4 | rotation[1].z |
| float | 4 | rotation[2].x |
| float | 4 | rotation[2].y |
| float | 4 | rotation[2].z |
| float | 4 | translation.x |
| float | 4 | translation.y |
| float | 4 | translation.z |
| float | 4 | scaling.x |
| float | 4 | scaling.y |
| float | 4 | scaling.z |
- Density: Specify the particle density that affects the depth of the image.
- Limit: Specify the upper limit of the particle data size to be generated by the server program to avoid the explosion of the number of particles due to incorrect specification of the transfer function. If the number of particles exceeds this limit, the server program automatically lowers the image quality so that the number of particles falls within the specified upper limit.
- Data-Size Limit: Specify the upper limit of the particle data size to be generated by the server program to avoid detonation of the number of particles due to incorrect specification of the transfer function. The unit is [GB]. If the particle data size exceeds the specified upper limit, particle generation is forcibly stopped.
- Coordinate 1: Enter the formula to determine the new X-axis. A blank space means "X".
- Coordinate 2: Enter the formula to determine the new Y-axis. A blank space means "Y".
- Coordinate 3: Enter the formula to determine the new Z-axis. A blank space means "Z".
In the text box of Coordinate 1~3, you can set the transformation formula of the coordinate axis. The variables that can be described in the expression are the original coordinate values (X, Y, Z), physical quantities (q1, q2、...、q9), and the time (T). X, Y, Z, and T are case-insensitive. In addition, the operations that can be described in the expression are the same as those in the Transfer Function Editor. If the specified physical quantity does not exist in the data, it evaluates to 0.
In the text box of Coordinate 1~3, after writing the conversion formula, press the Apply button to reflect the conversion.
- Current Repetition Level: Displays the currently set repeat level.
- Next Repetition Level: Specify the repeat level to be set
- Apply: Reflect the specified repeat level
- Size: Specifies the particle size of the point object
-
None: Disable shading
-
Lambert: Apply Lambert shading
-
Phong: Apply phone shading
-
BlinnPhong: Apply Brynn Fong shading
-
Ambient(Ka): Specify the environmental reflection coefficient
-
Diffuse (Kd): Specify the diffuse reflection coefficient
-
Specular(Ks): Specify the specular reflection coefficient (Phong, BlinnPhong only)
-
Shininess(S):: Specify the gloss level (Phong, BlinnPhong only)
- Translation: Specifies the parallel movement of an object in the X, Y, and Z directions
- Scale: Specify the scale of the object
- Rotation: Specify the rotation angle (in degrees) for each of the X, Y, and Z axes of the object.
- Apply: Applies the entered value
In the VR space, the following sticks/buttons/triggers on the VR controllers are used for operations:
- Movement (Fly-through) Use the stick for forward/backward movement based on the orientation of the VR controller. The controller can also rotate for turning left or right when moving sideways.
Object Manipulation Method
- Rotation Hold down the left and right Index triggers and rotate the left and right controllers.
- Movement Hold down the left and right Index triggers and move the left and right controllers.
- Zoom In Hold down the left and right Index triggers and bring the left and right controllers closer together.
- Zoom Out Hold down the left and right Index triggers and move the left and right controllers apart.
-
Glyph Type: Change the shape of the glyph. (Arrow, Diamond, Sphere)
-
Scale Factor: Adjust the size of the glyph uniformly.
-
Direction: Select three variables from q1 to qN to define the "direction" of the glyph.
-
Size: Define the "size" of the glyph by choosing from the following options:
- Constant: All glyphs have the same size.
- Variables Array: Select one or more variables from q1 to qN.
- Number of variable: Choose the number of variables to use.
-
Distribution: Choose how the glyphs are distributed.
-
Uniform Distribution: Distribute glyphs using a uniform random distribution.
- Number of Sample Points: Choose the number of glyphs to generate.
- Seeds: Enter an integer seed for the random number generator.
- All Points: Place glyphs at all grid points.
-
Every Nth Points: Place glyphs at every N-th grid point.
- Stride: Enter an integer value for N (maximum value: 10,000).
-
Uniform Distribution: Distribute glyphs using a uniform random distribution.
-
Color Data: Create a colormap to define the "color" of the glyph.
- Constant: All glyphs have the same color (white).
- Variables Array: Select one or more variables from q1 to qN.
- Number of variable: Choose the number of variables to use.
- Apply Button: Apply the settings.
- Resolution: Graph resolution.
- Start Point: Starting point of the line segment.
- End Point: Ending point of the line segment.
- Apply Button: Apply the settings.