VTK 9.0.0

The VTK development team is pleased to introduce VTK 9.0.0.

This major release includes many improvements and fixes to VTK, as well as new features that extend VTK’s utility as a state-of-the-art toolkit for scientific visualization. VTK v9.0.0 demonstrates our commitment to modernizing our code base and build infrastructure. The following is an incomplete list of changes and additions made to VTK by our incredible community of open-source developers:

Overarching Changes

  • This release introduces a new build system that uses CMake’s built-in functionality for behaviors that were performed manually in the previous iteration of the build system.
  • Much of the code base has been simplified to reflect VTK’s requirement of C++11 (though we still support GCC 4.8.X and VS2015).

Rendering

  • Support for a Physically Based Rendering (PBR) shading model is now available for surfaces via vtkPolyDataMapper. It is an alternative to the current Phong mode (Comparison of a non-metallic sphere (left) and a metallic sphere (right) with the same color (0.7, 0.5, 0.1) and the same roughness coefficient (0.2).)
  • A new render pass vtkSSAOPass is available. This render pass is a screen-space technique to simulate ambient occlusion. It is particularly useful to improve the depth perception of objects.
  • vtkLightWidget/vtkLightRepresentation represents a light. It is depicted as a sphere at the light position and a line between the light position and the focal point. A cone is shown in positional mode with a cone angle.
  • vtkRenderWindow::GetScreenSize() implementation in Cocoa, Win32, and OpenVR has been fixed to actually return the size of the whole screen and to not clobber the Size ivar, which should contain the size of the vtkRenderWindow.
  • vtkCocoaRenderWindow::SetPosition() has been fixed to actually position the window at the given position instead of at (0,0).
  • The instance of vtkShaderProperty has been moved from vtkVolume to vtkProp, allowing all types of mappers to use it to store user-defined shader replacements and uniform variables.
  • vtkOpenGLFluidMapper is a new mapper for the real-time rendering of particle-based fluid simulation data.
  • vtkVtkJSSceneGraphSerializer is a new scene graph traversal algorithm that converts a VTK scene into a vtk.js scene.

Data Types & Data Containers

  • There are six new cell types based on Bezier elements. These cells are similar to the Lagrange cells, but internally they are described using rational Bezier shape functions. This allows the exact representation of conical shapes as circles and spheres. Moreover, some of these cells support anisotropic degree, meaning that each parametric direction in a cell can be a different degree. For instance, the quarter disc shown below is quadratic in the tangential direction and linear in the radial one. Lagrange cells can now be represented with anisotropic degrees as well.

  • Updates for IO for vtkHyperTreeGrid include

    • a new version in the existing IO XML HTG format (.htg extension), which allows to optimize the storage (in volume) and the reading time while offering to the user the possibility to reduce the volume to be loaded (by selecting some HyperTree(s) and/or the maximum depth level). This can lead to several orders of magnitude of memory/reading time reduction
    • a ghost cell construction method essential when executing certain parallel processing (contour…). Be careful, this filter will only give a correct result for a HyperTreeGrid where each HyperTree is only present in one processing element. Trees should not be shared otherwise ghost cell filter output can be incorrect.
  • Orientation support has been added to vtkImageData, as well as several IO classes and isocontour filters. These new changes use a direction matrix in the image data class and the vtkImageTransform helper class to efficiently transform the output of image filters.

  • Data interoperability between VTK and VTK-m has been improved at both the DataSet and Field levels.

Python Features

  • With v9.0.0, VTK now offers built-in support for the generation of Python wheels.
  • VTK’s python bindings now work properly when VTK is built statically.

New and Improved Filters

  • vtkAppendDataSets has been added to enable appending vtkUnstructuredGrid and vtkPolyData datasets. In the latter case, the output can optionally be set to a vtkPolyData instead of a vtkUnstructuredGrid, removing the need to extract polygonal data from an unstructured grid via a separate filter.
  • The new filter vtkAppendLocationAttributes optionally adds point and cell data arrays that contain the point locations and cell centers, respectively, to its output.
  • vtkLagrangianParticleTracker now has an SMP implementation.
  • Given a planar polygon as input, the new vtkImplicitProjectOnPlaneDistance allows for any point to compute the distance between its projection on the polygon plane and the polygon itself.
  • vtkBandedPolyDataContourFilter has been updated to properly clip a polygon’s edges when values do not increase monotonically when traversing the edges from the lowest value point.
  • Many filters have been converted to use vtkArrayDispatch, which is the replacement for the VTK_TT macro.

IO

  • vtkOpenFoamReader has been updated to fix errors reading certain OpenFOAM multi-region cases in binary format.
  • vtkPNGReader has been updated to accept binary buffers as input.
  • vtkGLTFReader and vtkGLTFImporter have been added to read and import glTF 2.0 models, respectively. The reader supports animations, skinning and morphing, and the importer supports glTF materials using VTK’s new PBR features.
  • Multiple enhancements to the vtkGLTFExporter were made to correctly import VTK exported glTF files into the Unity game engine.
  • vtkTemporalDelimitedTextReader can read a CSV file as a temporal dataset. Time steps are created by aggregating the values using a user-specified numerical column.
  • Support has been added for reading polygonal, polyhedral datasets from Tecplot data files.
  • vtkPIOReader can load xRage dump files. xRage is a multi-physics code used at Los Alamos National Laboratory (LANL). PIO stands for Parallel Input/Output, a library used at LANL for writing files.
  • VTK now has a raw reader for directly reading AMReX plotfiles grid data without the third-party boxlib or AMReX libraries. The reader allows for the processing of a time series of AMReX data sets.
  • vtkOMETIFFReader can be used to read OME-TIFF files. These are TIFF files with OME meta-data that helps interpret the contents of the TIFF file. The OME-TIFF specification is available here.

Web and Mobile

  • There is a new exporter for the creation of *.vtkjs archives that provides the full definition of a scene.

Interaction

  • Support for Drag and Drop has been added to vtkRenderWindow and all OS specific implementations. It is now possible to get the file paths dropped in a VTK window and the drop location in the window coordinate.

VR

  • vtkAvatar is the upper body geometry of a robotic stand-in for a user in VR. Instances can be placed to match other users’ positions in a collaborative VR application, so multiple users can see and interact with each other. The avatar’s arms and torso are positioned automatically based on the head and hand positions; this information is typically generated by a user wearing a VR headset like the HTC Vive or Oculus Rift.

The latest source code, data, documentation and Python wheels can be downloaded from VTK’s download page.

11 Likes

That dragon statue rendering looks awesome!

1 Like

Nice new features! Thanks for all the effort.

Are there any breaking changes relative to 8.2.0?
And will the conda package (https://anaconda.org/anaconda/vtk) be updated to 9.0.0 as well?

Yep, documented here. Though that was run on rc1; there were a few other minor changes after that. @TJ_Corona We should regenerate that page for the final release.

The build system was also reworked quite a bit. You can see documentation for it here.

Those are managed externally, but we can prod to have them bumped.

I wouldn’t say that:

https://vtk.org/Wiki/VTK/API_Changes_8_2_0_to_9_0_0

Counts as a porting guide. Is there anything I can point upstreams (such as FreeCAD) to in order to ease the transition? Also, not all distos update at the same time so ways to maintain compatibility with 8.x and 9.x would be good as well.

This page may be of more help for the module system update. The VTKExamples site also supports both at once.

Unfortunately, the old and new CMake APIs are “allergic” to each other and neither backwards nor forwards compat was possible (the old one doesn’t like targets because it does that stuff manually and the new one doesn’t like paths because it wants to keep its install tree relocatable). I think every exposed function got renamed though, so if (COMMAND) could be a sufficient detection mechanism (though version checking is the more robust route overall).