0

I'm working on an app that downloads and processes an .obj extraction from Forge to a Unity client, but not all models will have the same world axes and thus will be oriented improperly for models with different axes than Unity's world space.

My current solution has been to use the metadata generated by the Forge viewer to get the world axes (via a custom extension) so I can translate the .obj data into Unity space, but I would like to be able to do this without requiring the user to open the Forge viewer first.

My question is whether there is some other place in the Forge API I can look to get this information or if there's some way to generate these values from the .obj data itself that I'm not aware of.

byhag
  • 5
  • 2

1 Answers1

1

Unfortunately the viewing metadata (incl. the world axis) is part of the Forge Viewer file format, and is not available via other APIs.

The world axes can be found in the metadata.json file that can be retrieved by unzipping the .svf.

John Montgomery
  • 6,739
  • 9
  • 52
  • 68
Petr Broz
  • 8,891
  • 2
  • 15
  • 24
  • Do you know if there are any plans for that data to be made available via another avenue like included in the `data` object of the model properties after generating the .svf? – byhag Oct 31 '18 at 13:57
  • As far as I know there are no plans to make the viewing metadata available outside of the Forge Viewer. You _could_ parse the SVF file yourself (it's just a zip file with a couple of files in it, incl. _metadata.json_, where the viewing configuration like world-up-axis is stored). – Petr Broz Oct 31 '18 at 14:46