Closed zoeyliu1999 closed 2 months ago
Hey @zoeyliu1999,
I agree this looks like a simple axis alignment issue. Habitat is Y-up and -Z forward. When I open your .glb asset in Blender, I see it is aligned with Zup. If I re-export from Blender with the "+Y up" flag unchecked I get a glb which will load into Habitat correctly by default. (correct_mesh.zip)
Alternatively, you could also fix this by using the "up" and "front" vector fields of a stage config if, for example, you could not modify the asset itself for some reason.
Hey @aclegg3, thank you for your kind reply!
Regarding the "up" and "front" vector fields of a stage config, do I need to construct an entire dataset with all json
file equipped for this? As you can see, I currently only generate a single scene .glb
file without any config file.
I kind of prefer not to modify the asset, as importing it into Blender for rotation may cause some furniture textures to go missing, and I am unsure if I can correct this error. However, I am also concerned that constructing a complete dataset with all necessary json
files might require more effort. Could you please provide some advice? Thanks!
Hey @zoeyliu1999 you don't need to construct a complete dataset. For this use case, you should be able to get away with only the stage_config.json file. Just set the scene_id
or settings["scene"]
to point to that config file instead of the .glb.
The minimal contents of a stage config include only the render asset path (relative to the stage config file). Then the "up" and "front" can be adjusted.
This one works to re-orient the scene for me (in the same directory): bedroom_w_light.stage_config.json
Contents for reference:
{
"render_asset": "bedroom_w_light.glb",
"up":[0,1,0],
"front":[0,0,-1],
"requires_lighting":true
}
Hey hero @aclegg3, it works for me! Thank you so much.
Although I still need to reset the position of the humanoid and scene, the rotation problem is happily solved. Really appreciate your help!
No problem, glad it's working for you. Feel free to open new issues if you encounter other challenges and best of luck on your goals.
Habitat-Sim version
v0.3.1
Habitat is under active development, and we advise users to restrict themselves to stable releases. Are you using the latest release version of Habitat-Sim? Your question may already be addressed in the latest version. We may also not be able to help with problems in earlier versions because they sometimes lack the more verbose logging needed for debugging.
Main branch contains 'bleeding edge' code and should be used at your own risk.
Docs and Tutorials
Did you read the docs? https://aihabitat.org/docs/habitat-sim/
Did you check out the tutorials? https://aihabitat.org/tutorial/2020/
Perhaps your question is answered there. If not, carry on!
❓ Questions and Help
Hi, thank you for your excellent work! I am trying to import my own scene(bedroom_w_light.glb.zip) into Habitat 3.0, but the scene appears rotated incorrectly (please see the image below).
Based on previous issues, I suspect this might be related to the gravity axis. To address this, I tried rotating the entire scene by 90 degrees along the x-axis in Unity, but unfortunately, this did not resolve the issue.
Below is the script I used for adapting my own scene. Could you please provide some advice on how to fix this rotation problem? Thank you!