tkeskita / BVtkNodes

Create and execute VTK pipelines in Blender Node Editor
GNU General Public License v3.0
121 stars 20 forks source link

Importing VTK file into blender with this addon? #92

Closed m3dus444 closed 2 years ago

m3dus444 commented 2 years ago

Hi, tkeskita. I'm working on a project and i'm looking for a way to automate post processing scientist data/models from paraview into Blender for a better rendering and presentations etc. I had in my mind a workflow like this : source file .vtk ▶️ import into Blender with python script ▶️ adjust cameras, lights, colors etc with python script again ▶️ Render from the right angles ▶️ labs scientist don't get tricked by simulation angles that often skew the lab experiment (wich is the problem we try to solve here)

I landed on this addon, but it doesn't seem to have the feature to import directly .vtk files into blender, i assume it is more about creating vtk nodes into blender (with the layouts setup and everything). I found this addon of yours : https://github.com/tkeskita/io_mesh_vtk And this one allows us to import directly .vtk files into Blender but it wont do the job because the blender version related is outdated (for my team) and it states that " Import supports currently only one set of color scalars" wich might be a problem for many simulations we have . I was wondering, does this addon include the same feature as io_metsh_vtk and it is not explicitly mentionned or it simply does not at all ? Do I completly missunderstand something about vtk integration in Blender ?

Thanks, m3dus4.

tkeskita commented 2 years ago

Hi, quick reply: yes BVTKNodes can do what you need. Please go through docs and example trees in Tree tab --> Examples.

m3dus444 commented 2 years ago

So tell me if i'm wrong : I have to create a " Special Nodes" either "VTK To Blender " or "VTK To Blender Mesh" etc at least related to VTK to Blender whatever

And then inside the node i import my .vtk file data ?

tkeskita commented 2 years ago

Hi, in BVTK Node Tree, you first add vtkPolyDataReader node, which reads the .vtk file data, and plug it to VTK To Blender Mesh node, which creates the Blender mesh objects. Whether it's as simple as that depends on what kind of data your VTK file contains.

PS. Most likely all data processing you do in Paraview can be done also in BVTKNodes, it's just more complicated and requires some VTK knowledge.

BR, Tuomo

m3dus444 commented 2 years ago

Hi, sorry for the late answer. I did some research yeah, i think i have to create a template for each use case, and a python script that will automatically modify the properties of the nodes in them. Thanks you for all the support and help you gave me, appreciate that. Best regards, Medusa.