I have set of files named CoordinatelogMass_1, CoordinatelogMass_2, CoordinatelogMass_3 which represent mass. Now I have created an animation that shows the change in mass because of these three files.
Now I want to display a variable say NUMBER which varies as the mass varies ( i.e change in files )
Say during first 10seconds NUMBER = 1 for next 10sec NUMBER = 2 and for next 10seconds NUMBER =3.
How can I do it?
I have attached the file here.
https://drive.google.com/open?id=1YOs8aSCQRQGgB-svjDfsVkW1wiHN0jhK
Create a .pvd file like this one :
<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<Collection>
<DataSet timestep="0" group="" part="0" file="dualSphereAnimation/dualSphereAnimation_P00T0000.vtp"/>
<DataSet timestep="0" group="" part="1" file="dualSphereAnimation/dualSphereAnimation_P01T0000.vtp"/>
<DataSet timestep="1" group="" part="0" file="dualSphereAnimation/dualSphereAnimation_P00T0001.vtp"/>
<DataSet timestep="1" group="" part="1" file="dualSphereAnimation/dualSphereAnimation_P01T0001.vtp"/>
<DataSet timestep="2" group="" part="0" file="dualSphereAnimation/dualSphereAnimation_P00T0002.vtp"/>
<DataSet timestep="2" group="" part="1" file="dualSphereAnimation/dualSphereAnimation_P01T0002.vtp"/>
<DataSet timestep="3" group="" part="0" file="dualSphereAnimation/dualSphereAnimation_P00T0003.vtp"/>
<DataSet timestep="3" group="" part="1" file="dualSphereAnimation/dualSphereAnimation_P01T0003.vtp"/>
<DataSet timestep="4" group="" part="0" file="dualSphereAnimation/dualSphereAnimation_P00T0004.vtp"/>
<DataSet timestep="4" group="" part="1" file="dualSphereAnimation/dualSphereAnimation_P01T0004.vtp"/>
</Collection>
</VTKFile>
Mathieu, Nice example!
I have created the files as you suggested. But every time I load the file, the ParaView is getting closed automatically.
Here is the file
trans.pvd (424 Bytes)
Save your file as .vtp file, not .vtk.
please share hI_1/2/3.vtp here.
<?xml version="1.0"?>
<VTKFile type="Collection" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<Collection>
<DataSet timestep="0" group="" part="0" file="hI_1.vtp"/>
<DataSet timestep="2" group="" part="0" file="hI_2.vtp"/>
<DataSet timestep="4" group="" part="1" file="hI_3.vtp"/>
</Collection>
</VTKFile>
This works for me
There are two things I want to point out.
- The transition from 1st file to 2nd file is too fast. Why is it so? ( This when animation is in sequence mode)
- I want a variable to be displayed in the animation that changes as the file changes.
as i said before, when the first file is active, NUMBER =1, while the 2nd file is active NUMBER =2 and so on. These things should be displayed in the animation
Not sure what you mean, you will find all the tools in the View -> Animation View panel.
How do I display variable values ( that changes) in the animation ?