InteractiveComputerGraphics / SPlisHSPlasH

SPlisHSPlasH is an open-source library for the physically-based simulation of fluids.

Home Page:https://splishsplash.physics-simulation.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example on how to read rigid body bin files

arjun-mani opened this issue · comments

Hello,

Thank you for this wonderful simulator. I used it copiously in our work "SurfsUp: Learning Fluid Simulation from Novel Surfaces" (https://surfsup.cs.columbia.edu/), published at ICCV 2023. I'm very grateful for your help with Github issues I raised, and for building and maintaining Splishsplash. Thanks very much.

I had a quick question about reading rigid body files exported during a simulation. I'm trying to read the .bin files that are exported, to get the rotation and translation attributes of the rigid body. However, I'm not able to read the bin files in Python. I can try to read the VTK files, but I think it is harder to extract the rotation and translation from those. I've realized some people have asked about the .bin files in the past. Could you provide a minimal Python example of how one could read these .bin files? That would be super helpful if possible.

If there's another simple way to get the rotation and translation of the rigid body during the simulation, that would also work. I'd prefer not to write my own exporter, unless it has to come to doing that. Would greatly appreciate any help. Thanks very much.