Hello,
Working on a project in Unity and looking to be able to read and visualize VTU files that are compressed with “vtkZLibDataCompressor” and use a binary format for the byte information.
Currently I can read and visualize VTU uncompressed files with raw formatting.
There are a couple of things I’m stuck on.
-
Installing VTK and using its libraries with Unity and C#. I went through the steps here: https://vtk.org/Wiki/VTK/Configure_and_Build#On_Unix-like_systems
Built the libraries within my unity project, but now trying to use them and I cant seem to use like how the examples for C# do. Basically trying to import like thisusing Kitware.VTK
. The folder I built in to in the unity project is called Kitware. Could be something super simple I’m missing but if there is another way to follow the install process or video of some sort that would be great. -
From what I can tell ActiViz is the main way VTK is used with unity. However its libraries are built for windows and there does not seem to be Mac OS support. My understanding is though this is purely the code for rendering and visualization. I do not need that code I only need the code to read through this compressed type of VTU file. So basically I want to read and store the data from the file and use that to build gameobjects to visualize myself. Is that possible or do I have to use ActiViz to access the VTK libraries in unity? This also goes back to installing as I’m sure Im probably installing everything wrong in the first place. lol
For compression sake, here is the current format of VTUi can read and visualize vs the format I want to be able to read and visualize.
What i can read:
<VTKFile type="UnstructuredGrid" byte_order="LittleEndian">
<UnstructuredGrid>
<Piece NumberOfPoints="#### NumberOfCells="####">
<PointData>
</PointData>
<CellData Scalars="Pressure" Vectors="Velocity">
<DataArray Name="Pressure" type="Float32" format="appended" offset="#" />
<DataArray Name="WSS" type="Float32" format="appended" offset="#" />
</CellData>
<Points>
</Points>
</Piece>
</UnstructuredGrid>
<AppendedData encoding="raw">
"Bytes here"
What I want to read:
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="#" NumberOfCells="#">
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3" format="binary">
"byte information here"
</DataArray>
Any help would be great! Cheers!