Closed dgriffiths3 closed 3 years ago
Hi!
I have a few questions. Is there a typo in your message? Do you mean that you are using the positions stored in camera_keyframe_positions.hdf5
? Where are you obtaining triangle meshes to render in Blender?
I'm not an expert with Blender. But our asset coordinates are simply the world coordinates defined by the artist when they originally created the scenes in 3ds Max. So, assuming that your Blender coordinate system is the same as the artist's original 3ds Max coordinate system, you should be able to set the camera position in Blender to be identical to the camera position defined in camera_keyframe_positions.hdf5
.
To help debug things, here are several places to look in our code.
code/python/tools/visualize_camera_trajectory.py
, we provide an interactive tool to visualize a mesh and camera trajectory together in the same viewer.code/python/tools/scene_generate_images_bounding_box.py
, we overlay 3D bounding boxes on an already rendered image, which requires rendering the bounding boxes with the same camera parameters as the original image.code/cpp/tools/scene_annotation_tool/main.cpp
, we have a "screenshot mode" that re-renders from the same camera parameters as an already rendered image (used to generate Figure 3 in our arXiv paper).I hope that helps. If you're still stuck, create a follow-up post in this thread with a bit more detail about what you want to do, why you think it should work, the investigation and debugging you've done so far, "everything is working until step X, but things are clearly not working at step Y", etc.
Hi, thanks for the quick reply!
Yes that was a typo indeed, I mean the positions file. Okay that clears things about a lot. I should be able to set the camera positions. I have access to the original assets, although they have been pre-prepared into .blend
files by a 3rd party. I wasn't sure if there was a world space and asset space and some transformation between them. But from what I gather now, the world space and asset space are the same thing.
My guess is that either blender has created its own fantasy units, or the 3rd party did some scaling / shifting.
Thanks!
I think your hypothesis is correct. Blender or this third party must be performing some kind of coordinate transformation (e.g., swapping the y and z coordinates or something).
Indeed, the kind of mystery conversion you're grappling with is exactly why we introduced the concept of asset coordinates in our documentation. Unfortunately, mystery conversions are so common when converting assets between 3D content creation tools, that we felt like the term world coordinates was too ambiguous. Do we mean world coordinates in 3ds Max? Or world coordinates in Blender? Do we mean world coordinates after scaling to meters? Or before scaling to meters? We wanted a name that means whatever the artist originally defined prior to any conversions, and we settled on asset coordinates. Maybe canonical artist-defined world coordinates would have been a better name 😅
Hi,
I am trying to render my own scenes in blender using the camera positions stored in
camera_keyframe_orientations.hdf5
. From my understanding these are in asset coordinates. So, for sceneai_002_002
the first camera position is[221.9, 75.0, 190.4]
.How I would convert this into the world coordinates blender is using? Is this even a known transform, or does blender make its own arbitrary coordinate system for its world space?