Documentation > 3D-Visualizer

3D-Visualizer

Okay, example is running, but where is the eyecandy?!

3D-Visualizer

After you launched one of the examples or data providers, you have to launch the 3D-Viewer to actually see more than the Logstream on your console
gpu_voxels_visualizer.
As it based on Shared memory communication, a main-program has to run already and the Visualizer has to be restarted after the main program is restarted!

You can control the rendering of various layers of information:
First of all you can toggle the drawing of whole maps/octrees/lists by using , or . to switch between maps/octrees/lists and then use Function Keys to toggle the maps.
You may independently toggle the drawing of Voxeltypes with the number keys, holding ALT to set decimal prefix.
E.g. Pressing “ALT + 2” and then “4” will toggle Voxeltype 24.
Press “h” while your mouse is inside the visualizer window, to get a list of Shortkeys in your console.

Visualizer Keyboard Controls:

  • h: Prints help.
  • a: move slice axis negative
  • b: print number of Voxels drawn.
  • c: Toggles between orbit and free-flight camera.
  • d: Toggles drawing of the grid.
  • e: Toggle through drawing modes for triangles
  • g: Toggles draw whole map. This disables the clipping of the field of view.
  • i: Toggles the OpenGL depth function for the collision type to draw colliding Voxles over all other Voxels. GL_ALWAYS should be used to get an overview (produces artifacts).
  • k: Toggles use of camera target point from shared memory (Currently not implemented).
  • l or x: Toggles lighting on/off.
  • m: Prints total VBO size in GPU memory.
  • n: Prints device memory info.
  • o: Overwrite providers possibility to trigger visibility of swept volumes: The provider may select, which Swept-Volumes are visible. This option overwrites the behaviour.
  • p: Print camera position. Output can directly be pasted into an XML Configfile.
  • q: move slice axis positive
  • r: Reset camera to default position.
  • s: Draw all swept volume types on/off (All SweptVol types will be deactivated after switching off.)
  • t: rotate slice axis
  • ALT-t: Cycles through various view modes of Distance Fields (press 2x ‘s’ afterwards to update the view, if stuck)
  • v: Prints view info.
  • +/-: Increase/decrease the light intensity. Can be multiplied with SHIFT / CTRL.
  • CRTL: Hold down for high movement speed.
  • SHIFT: Hold down for medium movement speed.
  • 0-9: Toggles the drawing of the different Voxel-types. Pressing ALT, you can set a decimal prefix (10, 20, 30 …)
  • ,/.: previous/next keyboard mode: Voxelmap > Voxellist > Octree > Primitivearrays >
  • F1-F11 Toggle drawing according to the keyboard mode.

Visualizer Mouse Controls:

  • RIGHT_BUTTON: Prints x,y,z coordinates of the clicked voxel on console.
  • LEFT_BUTTON: Enables mouse movement.
  • ALT + CTRL + LEFT_BUTTON: Enables focus point movement in X-Y-Plane for Orbit mode.
  • ALT + CTRL + MOUSE_WHEEL: Move Camera closer of further away from focus point.
  • MOUSE_WHEEL: Increase/ decrease super voxel size. This influences rendering performance.

The visualizer can be parametrized with XML configfiles to set colors, camera poses and more:
./bin/gpu_voxels_visualizer -c ../packages/gpu_voxels/src/examples/VisConfig_live_col_detect.xml
Find an example in the examples directory.

If you experience a crash (either of the main program or the visualizer), it could be necessary to delete some shared-memory files:
rm /dev/shm/{OctreeSharedMemory,PrimitiveArraysSharedMemory,VoxelmapSharedMemory}