xavierpuigf / virtualhome

API to run VirtualHome, a Multi-Agent Household Simulator
http://virtual-home.org
MIT License
405 stars 65 forks source link

How to get character camera's poses or parameters? #106

Closed jaewonbae closed 4 months ago

jaewonbae commented 9 months ago

Hi, thank you for providing such a great tool. I'm trying to extract the camera poses for each frame. But cam_data() fucntion is only supports static cameras, not character cameras. Is there a solution to get the parameters of the character camera or extract the camera pose for every frame? Thanks!

YuechengLiu commented 4 months ago

Hi, thank you for providing such a great tool. I'm trying to extract the camera poses for each frame. But cam_data() fucntion is only supports static cameras, not character cameras. Is there a solution to get the parameters of the character camera or extract the camera pose for every frame? Thanks!

Hi, did you find a solution to do that? thanks!

jaewonbae commented 4 months ago

Hi, thank you for providing such a great tool. I'm trying to extract the camera poses for each frame. But cam_data() fucntion is only supports static cameras, not character cameras. Is there a solution to get the parameters of the character camera or extract the camera pose for every frame? Thanks!

Hi, did you find a solution to do that? thanks!

Yes, I did! You have to download the virtualhome_unity repository, modify the corresponding source code, and then build a new executable. Open the virtualhome_unity\Assets\Story Generator\Scripts\Recorder.cs file and uncomment line 278, which will save the camera pose for every frame. Please refer to the virtualhome_unity repository for how to build executable. Good luck! :)