BVTKNodes - photorealistic rendering of VTK data in Blender

Hello all scientific visualization people interested in photorealistic rendering!

I’ve been upgrading this amazing add-on for Blender >2.80 called BVTKNodes, originally created by Silvano Imboden and further developed by Lorenzo Celli for Blender 2.79. BVTKNodes makes it possible to create and execute VTK pipelines configured in Blender Node Editor, to produce surface mesh objects, which can be then visualized in Blender using it’s rendering engines. This makes it possible to create photorealistic images and animations of scientific data in Blender (provided that you know both Blender and VTK well enough!). For more information, have a look at https://bvtknodes.readthedocs.io

BR,
Tuomo


PS. More images at https://blenderartists.org/t/bvtknodes-gallery/1161079

8 Likes

That is very cool!

Thanks for sharing, this looks interesting. Can you send image data to Blender so that it can display it directly using volume rendering?

I must confess I don’t know too much about volumetrics in Blender. I know it can render volumes enclosed by surface meshes, and there are some interesting looking options like density in the Principled Volume shader, but I haven’t looked into that. Here is example for constant density emission:

I think volumetrics was part of Lorenzo’s work, but I haven’t had time to look into it: http://lorenzocelli.me/BVTK/presets/index.html

BR,
Tuomo

1 Like

Hi Andras, thanks for the question.
Last year Lorenzo Celli provided some support to volume rendering in BVTKNodes,
but we weren’t completely satisfied due to some limitations in
the blender python api giving access to the volume-data.
The good news is that from version 2.83 Blender support the openvdb data format,even for time-variant data.
The openvdb api are open source so you can easily write a vtkImageData to openvdb converter.
Support for openvdb in Paraview has already been requested here
Here are a couple of examples.


(rendered with eevee)
volume_rendering_cycles
(rendered with cycles)
Under Linux openvdb is supported by the debian packages libopenvdb-dev and python-openvdb,
but I didn’t found a corresponding packages for pip yet. When this will be available
we may integrate this feature in BVTKNodes
BR – Silvano

1 Like

Thanks for this additional information. All these volume renderings look like an isosurface is extracted from the volume and then rendered as a uniform material. However, this is not that useful for medical applications, because there the main advantage of volume rendering is that you don’t need to extract surfaces but you directly visualize the volume, by defining voxel value -> (opacity, color) transfer functions. Does Blender support volume rendering of semi-transparent clouds (where each voxel has different opacity and color value)?

The rendering looks like isosurfaces but they are not, here there is another image of the same data with different settings. If you will install Blender 2.83 you can try by yourself, you can get my data and blender file here

Thanks a lot, I will give this a try!

Hi @Silvano, Very interested in volume rendering applications with Blender! Could you share the volume data and Blender file for the full head? I’m not familiar enough with the Volume settings in Blender to figure out how you added the clipping plane. Thanks!

And nevermind, I figured out the camera clipping was the issue!

@Blezek if you manage to set up some nice volume renderings would you mind posting a few examples here?

Hi, here’s my quick test using Cycles (path tracing engine). Looks like volume also adsorbs light from light source nicely. Material and render settings have a large effect on results. Quite interesting. :slight_smile:

1 Like

nice work Tuomo

These examples are still not at the level what VTK’s plain volume raycast mapper can do.

For example, VTK can currently render a cardiac CT (CTA-cardio.nrrd) like this:

But instead we would like to see rendering with more realistic shadows and material appearance, like this (source: Siemens Healthcare):

It would be of course highly desirable if VTK could render such images directly, but in same cases it would be acceptable to export the scene to an external software, such as Blender, for photorealistic rendering or creating animations (with complex camera motion, lighting, etc.).

I’ll try to find time to experiment in Blender, but in the meantime it would be nice to see if anybody can make Blender render volumes with quality that surpasses VTK’s raycaster and approaches photorealistic rendering offered in commercial medical imaging software.

Hi,

OK here’s a more elaborate render. The trick is how to adjust color and opacities profile. Used 150 samples + denoising.

For more massive sciviz examples with Blender, see also this presentation: https://www.youtube.com/watch?v=eiRO6vqZRUA

PS. Since Cycles is also a stand-alone render engine, you could theoretically incorporate it into VTK/Paraview. That might require some serious work, though, I’m guessing.

BR,
Tuomo

Thank you Andras for the interesting challenge and for providing the sample data ( is this data free ? can I reuse it ? ).
Here follows the best result I achieved using your data and Paraview, probably it is possibile to do better but my knowledge of Paraview is limited


The next Image is my best result using volume rendering on Blender, with a very simple light setup
CTA-blender_01
This is the shader-network I used

and this is the same, with some tweaking from a friend of mine (thanks Daniele).

Here is the Blender file and the data converted in openvdb

My personal conclusions:

  • Matching the quality of the CTA-cardio-cinematic was not possible, but that image was created from a dataset of an higher quality (see for example the details on the surface of the bones ).
  • Using Paraview you can reach a very good level of quality in short time, even with a limited knowledge of the tool.
  • Using Blender you can probably go further, but you need a knowledge of the tool and is time consuming.

Beyond the challenge, we presented here VtkNodes not to compete against the Kitware tools, but to let you know that Blender and Vtk can play together nicely. Maybe a more interesting scenario for using VtkNodes is for people developing custom application requiring surface editing tools ( e.g. dental implant, ad-hoc prosthesis planning …) those tools are missing in Vtk by design, while there are a plenty of them in Blender. Using VtkNodes you can import your data in Blender, transform it in a blender mesh, use any of the tools provided, re-convert the data to VTK and export it, and all of this using only free applications and addons.

– Silvano

2 Likes

Nice work :+1: Thank you for reporting.

Yes, that’s Slicer sample data distributed under the terms of the Slicer license.

yes – that was a cheap trick — if you are still interested, in my latest post you can find a link to another example an data

Thank you, these are very nice renderings.

Did you use OptiX renderer in Paraview? Can you share the ParaView state file?

What was the rendering time in Paraview and Blender?

The Siemens example may use slightly higher resolution image, but probably the main difference is due to that Siemens uses some automatic segmentation to distinguish bone, vasculature, tools, etc. and render them with different material properties.

Maybe a more interesting scenario for using VtkNodes is for people developing custom application requiring surface editing tools ( e.g. dental implant, ad-hoc prosthesis planning …) those tools are missing in Vtk by design, while there are a plenty of them in Blender

Implant planning is more similar to CAD design and mostly done using parametric modeling, which Blender is probably not the best tool for. Also, implant planning does not require fancy rendering, but mostly relies on measurements on slice and projection views and simple 3D rendering.

But photorealistic rendering of a few nice images of the final plan could be useful for for communication with patients, training materials, and presentations.

1 Like

Hi Andras – I used the OSPRaycaster, and this is the link the statefile, not exaclty ‘that’ statefile, but the closest I have. About rendering time it is near real time in Paraview (seconds) and about 15 minutes for Cycles. You can have real time volume rendering in Blender by using EEVEE if sacrificing some quality. But I often spend much more time in tuning the visualization than in the rendering.
About your consideration on possible usage of VtkNodes I get your point, nevertheless at each Blender Conference there are at least a couple of talk about using Blender for research pourpose, and some of them were using vtk too. Time will show :slight_smile: – thank you – Silvano

1 Like