New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External Workaround for Converting 3D VTK Image Data to OpenVDB for Volumetric Rendering #25
Comments
- VTK To OpenVBD Exporter allows conversion of 3D VTK image data to OpenVDB file format, so that data can be imported into Blender as Volume Object, for use in volumetric rendering. This is essentially a workaround needed until Blender Python includes pyopenvdb, so that VTK To Blender Volume node can be used with out-of-box Blender. - The new node exports density, color, flame and temperature fields into a JSON text file, which can be processed outside of Blender with an external Python installation (pyopenvdb is required) using script utils/convert_to_vdb.py.
VTK To OpenVDB Exporter node is now available, but conversion to OpenVDB requires access to external |
I am very interested in doing this. I need to convert my VTK field FEA data results to use as openVDB in Blender... I've tried a lot of things including building blender and trying custom blender build, but I'm having a lot of trouble and can't get it working (basically immediate crashing without error reports... etc.). I'm not that experienced at this so probably I'm doing something wrong, and I have to use visual studio and windows instead of linux for other reasons. |
Hi @tcdoe, I'll answer you here, but I see you've posted to many forums. I'm sorry, but since you're on Windows you don't have access to pyopenvdb (at least I do not know of any Windows package which would provide it), so you can't use VTK To OpenVDB Exporter route. I think by far easiest option for you is to use Paraview for visualization (or BVTKNodes without volumetric data). If you insist on OpenVDB, then other (harder) alternatives is to find (or build?) pyopenvdb for Windows, or to use and customize one of the C++ programs mentioned above to convert your data to OpenVDB. Building of custom Blender with pyopenvdb enabled is theoretically possible, but the patch I think is now out-of-date, so it's no longer working and would need to be fixed. No progress there I'm afraid. Please note: OpenVDB requires voxel data, so there is some block artefacts introduced by conversion from unstructured grids to OpenVDB voxels, as you have probably already seen in my trial in BVTKNodes gallery thread.. |
Hi @tkeskita, |
Hi, yes it looks like Blender now finally has integrated pyopenvdb out-of-box! This assumedly makes it possible to revive the VTK To Blender Volume node, to be used for direct volumetric rendering. Personally, I'm sticking with Blender LTS versions, so once the next LTS is released (which will hopefully also include pyopenvdb and a possibility to pip install vtk), I'll start thinking about upgrading. But, recently there has not been much activity on BVTKNodes. Maybe I'll then post an issue to collect some feedback, before starting on the upgrade work. BR, |
Hi, Tom |
Background
Since pyopenvdb is not part of Blender libs, currently it's not possible to use the new VTK To Blender Volume node without building custom Blender. It is currently unknown when pyopenvdb will be part of out-of-box Blender.
Meanwhile, there seems to be some interest in volumetric rendering of 3D image data in Blender, at least many people have opened issues about it. Currently alternatives to building custom Blender is to edit, compile and use external C++ programs (see e.g. this, or this) to convert data to openvdb, or to use tile mapping with a complex UV mapping scheme (see #19).
Proposal
Provide an exporter node similar to current VTK To Blender Volume node (with color, density, flame and temperature fields), which exports VTK image data into text files. Another external Python script using externally provided pyopenvdb (e.g. python3-openvdb package in Ubuntu) could then be used outside of Blender to convert those text files into openvdb files, which could be imported back to Blender for visualization.
Please like this post if you would benefit from this kind of a workaround. Comments are also welcome!
The text was updated successfully, but these errors were encountered: