Skip to content

Upgrade to Blender 2.8 and VTK 8.2.0#4

Open
tkeskita wants to merge 395 commits intosimboden:masterfrom
tkeskita:master
Open

Upgrade to Blender 2.8 and VTK 8.2.0#4
tkeskita wants to merge 395 commits intosimboden:masterfrom
tkeskita:master

Conversation

@tkeskita
Copy link
Copy Markdown

Silvano: here is the result of my current clean-up and upgrade work of BVTKNodes to Blender 2.80 beta and VTK 8.2.0. Please consider to pull my fork to master, when you have time to review! Meanwhile, I continue to develop my fork.

tkeskita and others added 29 commits July 19, 2020 14:52
- This custom node allows creation of a new 3D vtkImageData object.
  This can be used as an input for mapping of e.g. unstructured grid
  data into 3D image data (using vtkProbeFilter), before application
  of VTK To Blender Volume node.
- Extended create_grid_from_data_array() to handle also
  vector data arrays, which can be saved to the color OpenVDB grid.
- Added customized VTKBoxClipDataSet which includes BoxClip property.
  Thanks to @vigeesh!
- Export File Sequence option in VTK To Blender Volume
  node adds frame number to exported OpenVDB file names. Such file
  sequence can be imported as a single Volume Object into Blender.
- Small bugfix in material name handling
- Face vertex list from GetNumberOfPoints() can sometimes list
  first vertex index also as an additional final vertex, which
  causes bm.faces.new() to fail, and face is not created.
  Now the additional entry is removed.
- Improvings on the docs. Added addon Removal and Upgrading
  instructions, VTK Nodes, much needed Custom Code section
  and Debug Messages section.
- Other small improvements to docs.
- Ref: #20
  Current VTK To Blender node (with vtkGeometryFilter) fails
  to export VTK polylines and VTK triangle strips correctly.
  This new VTK To Blender Mesh node aims to provide correct
  boundary exports without need for vtkGeometryFilter.
- Base framework is in place, but currently only lines, polylines
  and tetrahedrons get processed.
- VTK To Blender Mesh can now convert all linear VTK cell types
  (3-16) + polyhedron type (42) into boundary face mesh.
- unwrap_and_color_the_mesh() now includes the UV unwrapping,
  color texture and material generation, which are used by
  VTK To Blender and now also VTK To Blender Mesh nodes.
- Moved recalculating face normals as a separate option in
  VTK To Blender Mesh node, since it affects the result so
  different from Smooth option.
tkeskita and others added 30 commits January 20, 2023 11:46
- Run generate/populatedb.py and generate/generate.py with
  Blender 3.3 LTS python3.10, so this commit contains the raw
  class changes between VTK 9.1.0 and 9.2.2.
- Something has changed in vtkOpenFOAMReader in VTK 9.2.2,
  which causes boundary patches not to be read on first
  Update(). Implemented a workaround by adding custom code
  to first disable and then enable all patch arrays.
- Toning of node background colors has been changed in Blender,
  so decreased RGB values to get better readability.
- Added to test more nodes in custom_nodes/VTKFilters.py (#94).
- Example shows how to use Blender Scripting Workspace to drive
  BVTKNodes, add Blender camera and lights, and render an image.
  Hope this helps to get people started!
- New way in Blender to show buttons in console header
  using bpy.types.CONSOLE_HT_header.append().
  Found an example in the Icon Viewer add-on.
  Seems to work on Blender 2.93 and 3.3.
- There were numerous "Triggered oudate_vtk_status" debug messages
  in JSON import due to communication of changes downstream.
  Changed debug message locations to avoid message repetitions.
- Improved also other debug messages.
- VTK To Blender Particles is really sensitive to work flow.
  It fails if you don't do everything in exactly right order,
  so added this example, and updated docs to clarify how I
  managed to make it work.
- There was a bug in calculation of scalar data values for
  UV point and face unvwapping and Color Map range calculation,
  where negative scalar values were converted into positive
  values by magnitude calculation. Due to this bug, negative scalar
  data values were shown with a wrong color.
- This upgrade was easy, no functional changes. Python version
  remained at 3.10, and VTK version was upgraded from 9.2.2 to 9.2.6.
- Blender 3.6 ships with pyopenvdb by default, so it is once again
  possible to convert 3D VTK Image Data directly into Blender
  Volume Object! Not necessary to use the VTK To OpenVDB Exporter node
  any more!
- Added VTK Linux installation workaround tip for Blender 3.3
  and newer.
Consider to add path before, or in some case CMD.exe will use system default python instead of the one required by Blender
Update pip_install_vtk.md
- Vector component can no longer be extracted with Function
  U.iHat in vtkArrayCalculator, must use dot(U,iHat).
- Doc building at readthedocs have been failing for a few months due
  to their change in configuration:
  readthedocs/readthedocs.org#10626
  Now trying to set up readthedocs building similar to:
  https://github.com/readthedocs/tutorial-template
- Thanks to Dominik Werner (dwerner95) for looking up this
  Shape Key animation technique and the initial implementation (#108)!
- Motion Blur option is available in the VTK To Blender Mesh node.
  You need to specify a point vector array name applied for
  motion blur, as well as a time step between frames for
  calculating blur length. Motion blur is calculated for forward
  linear transformation.
- Added optional motion blur to example tree cubeflow_vector_glyphs.
  Enable motion blur for particles mesh to see the effect.
- Bumped version number to 0.11 to mark this new feature.
- Got this error, apparently something has changed in pyvista:
  AttributeError: module 'pyvista' has no attribute 'UniformGrid'
  Force to install previous pyvista version as a fix.
  Now testing is done with numpy vtk==9.2.6 pyvista==0.42.3
- Keyframing for mesh motion blud with shape keys is now set for
  current frame and next frame. Found out a way to change shape key
  fcurve interpolation to linear type, to get rid of the default
  bezier interpolation causing initial location "burning" in the image.
- Added a guard variable volume_import_is_running to detect a
  special case in VTK to Blender Volume node, where deletion
  of old volume object triggers a depsgraph update in the middle
  of the update process. This caused infinite loop in frame change
  when Update All Automatically Update Mode was applied.
- Added also a guard variable on_depsgraph_update_is_running,
  although currently it seems not necessary. Consider it as a
  kind of extra safety feature for now. The Blender update handlers
  seem to be called often, and sometimes in quite surprising cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants