BVtkNodes
BVtkNodes copied to clipboard
Time Selector for PartFluid.vtk Data
Hello,
When I select the first file of my partfluid in the vtkPolyDataReader node, the time selector node is not reading the time steps. The file names are in the form PartFluid_0100.vtk, PartFluid_0101.vtk etc.
Does anyone know how I can get the node to properly read the file names? Either by changing the names of the files or editing the code for the time selector node?
Thank you
Hi, did you try to change frame number on Blender Timeline Editor to 100, 101 etc.?
Yes, whenever I change the time step on the time selector node it reverts to the configuration shown in this image.
Don't change time on the Time Selector node, but on the Blender Timeline Editor.
The blender timeline editor shows no changes in my simulation when I change from frame 100 to 101 either.
Hmm, it works OK for me. Your FileName looks like windows path format, that may be the issue. Did you get that FileName by using the folder icon? Try that. Time Selector should say "No time data on input" upon update.
You could also try to save .blend file to location of your data, so you can set FileName to "//PartFluid_0100.vtk".
Blender 2.83 latest LTS version?
Yes, I'm using the latest version. Would I be able to send you some example files to test out? Sorry for the inconvenience, and I greatly appreciate your active support. Example PartFluid.zip
Hi, I checked with your data, this seems to be working for me:
Are you able to play the sequence of files as an animation? Using the exact same node setup I'm still getting different results.
First, let's rule out the path issue which I mentioned above. Please save .blend file to folder of your data, then set FileName to "//PartFluid_0100.vtk". Does that change anything? Does the number part in the FileName change if you change frame number in Timeline Editor?
I wonder why your Time Selector is showing numbers, since vtkPolyDataReader should not be time aware in VTK 8.1.2. Or are you using VTK 9? I haven't upgraded BVTKNodes to that yet.
I tried saving the .blend file in the same folder as my data, and the following happens. The time selector node initally shows the 'index error' flag, then when changing the timestep in the timeline editor, the time selector node shows 'Time Value: 0.0'.
As for my VTK version, I'm unsure. I'm using the newest version of DualSPHysics to generate these files, which was released after VTK version 9 was, so it's possible I'm on VTK 9.0.
You can see VTK version in Blender Python Console (by default located in the Scripting workspace) with commands
import vtk
vtk.vtkVersion().GetVTKVersion()
It appears I'm on version 9.0.1, perhaps that's the issue.
Maybe. Theoretically the code should work, but there might be something in VTK 9 which causes issues. I hope to upgrade VTK in BVTKNodes to version 9 this spring, but I don't know when exactly I will have time. Meanwhile you could maybe downgrade your VTK to 8.1.2, it should work.
Update: I'm on a new machine and switching to VTK version 8.1.2 worked! Thank you.
When rendering an animation, the video produced only shows the first frame. I have auto update on and the frame interval set from 100-110. Do you know how I can render the time sequence as an animation?
No. Animation update problems between frames can be a mystery (see #31). If I have time I can try to see to this later on.
Hi, I tested this an found out that I'd forgot to add frame update commands for VTK To Blender Mesh. Fixed in latest commit, animation should work now. Thanks for reporting this issue!
Thank you, this is a huge help. With the updated version, rendering an image either crashes blender, or resets the material properties of the mesh to a standard principled BDSF shader.
Is there a way to keep the shader properties for the first time step and apply them to the rest when rendering an animation?
Yes, should work if you just disable Generate Material setting in the VTK To Blender Mesh node before rendering animation..?
Hello, I have kind of the same problem.
My problem right now is that the scene is not updated when playing the animation. Only a manual update with the update button recreates the scene with the current timeline- timestep.
Are there any settings in Blender I need to change? I saw that you in the meantime upgraded to vtk 9- so i guess this shouldn't be a vtk-version problem anymore?
Hello D werner,
If I remember correctly, make sure your .blend file is saved to the same folder as your VTK data. Then change the path in the PolyDataReader node to //drum_0005.vtk
If this doesn't work, I can send you the .blend file that I created, though you may have to make sure you're using the correct version of VTK (I think 8.1.2 unless the author has updated the code).
Chandler
Hey ChandlerJH,
Thanks for that quick reply! I changed the .blend directory without success. I use vtk version 9 but i can not switch to 8.1.2 as it is not available for python version 3.8 > And i have no idea how i would downgrade the python version in Blender.
Also the Author mentioned in #16 that the BVTKNodes are now upgraded to VTK 9. Best wishes, Dominik
Hi @D-werner-bham ,
yes we're now at VTK 9.0.1. The vtkPolyDataReader
in VTK 9 seems to be now time aware, but for some reason it is not detecting different time points correctly. Need to test and dig deeper..
I couldn't coerce vtkPolyDataReader
into reading time steps, maybe it is still not time aware after all? I committed a workaround to code, please remove old version of addon, download and install latest version and try again.
That works like a charm! Thanks @tkeskita !
Hi, I think I have a similar problem with XMLRectilinearGridReader. When I change the frame from Blender Timeline, I need to press Update Node in order for the new time step to be loaded.
Hi, that is intended behavior when you use "No Automatic Updates" for the Update Mode (setting located in the Inspect Panel).
Hi, that is intended behavior when you use "No Automatic Updates" for the Update Mode (setting located in the Inspect Panel).
thanks indeed I had "Update Current Automatically" changed it to "All" and it works now!