BVTKNodes gallery

I’m starting this thread in a hope to form a gallery for scientific visualization renderings which utilize BVTKNodes add-on (original repository by Silvano Imboden, and my fork repository). BVTKNodes is a Blender add-on which allows creation and execution of VTK pipelines in Blender Node Editor.

I hope that people will post and tell here how they have used BVTKNodes. Both renders and node tree images are welcome, since examples are the best way to learn. Feel free to post and also discuss! Are you using Blender and VTK?

Note: Kindly do not ask for help in this thread. Instead, please first read through the documentation, and if you don’t find an answer, please submit your request to https://github.com/tkeskita/BVtkNodes/issues preferably with a clear description, image of your node setup and small example data file. Thanks!

Here is head data show case example:

16 Likes

Kitchen flow example, stream tracer + tube filter, coloring by integration time.

7 Likes

Just added fin example to my fork. Domain outline with tubes, plane slice with density data, and arrows from momentum vectors. Tried two different lightings.

3 Likes

Ok, this one is more art than scientific visualization, but the stream tracer ribbons in pictures do originate from CFD simulation. This is the OpenFOAM motorbike tutorial case (laminar SIMPLE solution), including the motor bike model (triangulated model → reflections artefacts). The only thing I did was add smooth shading to faces, otherwise model is original.

This is a bit of a breakthrough for me, to get OpenFOAM data via BVTKNodes directly into Blender. Attached also image of node tree. Warning: Reading OpenFOAM cases with BVTKNodes like this has many many limitations. It took me quite some time to make this work.

5 Likes

Here is a visualization test of the computational hex-dominant volume mesh (created with SnappyHexMesh) for the same motorBike tutorial case, using latest add-on version. Color ramp (blue-to-red) goes from 3 to 6 refinement levels. 21 million verts in final Blender mesh, almost too large for my machine to render :slight_smile:.

3 Likes

Here is example of two overpressure isosurfaces (using two vtkContourFilter nodes) around a flying object. Smooth shading, no extra mesh manipulation.

2 Likes

Nice to see that this is actively developed.

Hi,
this looks promising. A way to bypass Paraview in order to get CFD data into Blender.
Currently trying to get it to run on Windows.

Thomas

And … giving up for now.
I get as far as getting VTK compiled against the python. But Blender does not recognize the installed VTK.

Thomas

Hi @pmn77,

Following discussion in How to install Python packages with "pip" (Blender 2.8) I tested in Windows that you can install VTK into Blender’s python like this:

run CMD.EXE as administrator
cd C:\Program Files\Blender Foundation\Blender\2.80\python\bin
python.exe -m ensurepip
python.exe -m pip install vtk

After that you can “import vtk” in Blender’s Python Console. Edit: Currently it seems to install VTK 8.1.2 so I downgraded the add-on to use VTK 8.1.2 (was previously 8.2.0), because of the easy pip installation.

There was a bug in BVTKNodes logfile path for Windows which I fixed, so you should install the updated add-on from github. Thanks for the bug report!

PS. You can report bugs in github using the Issues tab.

BR,
Tuomo

2 Likes

Thanks a lot for your work :slight_smile: Any chance you can share the Blender files for these pictures? Would be very greatful (I am using CFD and currently learning Blender - your HQ content is awesome!). Also have you been successful to create transient renderings inside of Blender?

Hi, thanks for feedback!

I’ve been thinking about creating a “Blender How-To for OpenFOAM users” to OpenFOAM wiki Blender page or somewhere over there, but have not yet done this. Maybe one day…

Meanwhile, to learn Blender I suggest you go through tutorials in Youtube and Blender Cloud. To learn about BVTKNodes, the best material now is the Blender Conference 2018 BVTKNodes presentation by Silvano and Lorenzo. After that you can try out some of the node setups shown in this thread. Beware: It is not as easy as Paraview. Also, I am still learning how to use VTK…

Edit: I have not animated transient data with BVTKNodes. There is currently bug in Blender 2.8 which makes it necessary to use cumbersome workarounds for changing time steps.

BR,
Tuomo

1 Like

Would really love to see that Tuomo and happy to learn from you :slight_smile:

Thanks a lot for your links. Please let me know once you decided to open a new thread or step-by-step instruction on Github or any other platform, would be happy to help you and supply you with some CFD simulations if necessary.

Here are some visualizations that I made with the help of BVTKNodes on Blender.
The snapshot shows a close-up view of a magnetic field bundle formed by plasma flows on the solar surface.

I also made a 360° video of flying around this magnetic field bundle here,
Solar Magnetic Fields 360°

The simulation was done using a 3D radiative-magnetohydrodynamics (RMHD) code. The output was converted to vtk and processed directly on Blender with the help of BVTKNodes. In my earlier days, I used Vapor and then moved to Paraview, but now I’m fully addicted to Blender. A big thanks to Silvano, Tuomo, Lorenzo, and others who worked on getting this awesome add-on for Blender.

2 Likes

The animated gif shows magnetoconvection on the surface of the Sun. The behaviour of magnetic field lines (green) in a small region is also shown.

solar_magneto_convection

Can anyone guide me how to create an animation like this? https://www.youtube.com/watch?v=qJNJZX2sLlU & https://www.youtube.com/watch?v=uRpI7s7aRDc

Hi, thanks for nice animation links! Those are possible to do in Blender, but not easy to describe how to do step by step (requires scripting, data generation, importing, setting of materials, lights, camera animation). Lots of things to learn, so I suggest to search for tutorials and examples in each. One old tutorial: https://www.youtube.com/watch?v=5-GtdRLfeFI

2 Likes

I’ve been trying to check some VTK data in BVTKNodes. Here is example of how to see VTK information in BVTKNodes. Especially Info node and operators in Inspect tab is useful for debugging. Here is OpenFOAM cavity tutorial example:

Hi @pmn77 and everyone,

FYI: I’ve updated my version of BVTKNodes. Now it has possibility to add/edit custom code in Blender Text Editor (‘BVTK’ text block) for VTK nodes. You find buttons for editing and saving custom code in Properties tab. This makes it possible to provide custom commands per node, which really is required for many VTK Nodes. This example uses vtkPassArrays to filter to a single point data array, which is processed further:

Another improvement I did is changing time steps. Now, if there is Time Selector node in BVTK Node tree, then the time step is updated for it when frame number is changed in Blender’s animation timeline. This makes it possible to make VTK to update it’s data according to time steps, so it is possible to render transient data into animation!

Here is animation video of OpenFOAM damBreak tutorial case (writeInterval 0.005;):
damBreak_tut_001_ani1.mkv (327.8 KB)

Edit: Full disclosure: Blender 2.82 crashed three times during rendering of 200 frames.

Here is one example still frame rendered:

I used this node setup:

As you can see, it is a bit complex and requires quite some custom code (thanks to Silvano Imboden for helping out to figure out those!).

Final tip: Translation, rotation and scaling of meshes produced by BVTKNodes is easiest to do afterwards in Blender by modification of object properties.

1 Like

Here is how to use vtkArrayCalculator to calculate magnitude array from vector array. Note that one needs to introduce variables to be handled with custom code. To extract first vector component, replace Function “mag(U)” with “iHat.U”. Other functions available are listed in vtkArrayCalculator documentation. This is getting more and more useful!