Is it possible to load obj file in SceneformMaintained ? #210
-
I would like to load an OBJ file in sceneform. Partly because, this obj file is created dynamically (text related). I've seen that it might be possible with sfa/sfb file with model defined, but the support has been dropped as I read in migration notes. The Mesh data is obtained dynamically, so if it's possible to directly load Mesh data to a modelRenderable. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Sceneform has no OBJ-Parser/Loader, but you could take a look into ShapeFactory how to build your own Renderable with just vertices, uvs and indices. I would say the makeCube function is the easiest one to understand the process. |
Beta Was this translation helpful? Give feedback.
-
As a workaround, I used obj-to-gltf java library for generating gltf file from obj and successfully loaded in sceneform. |
Beta Was this translation helpful? Give feedback.
Sceneform has no OBJ-Parser/Loader, but you could take a look into ShapeFactory how to build your own Renderable with just vertices, uvs and indices. I would say the makeCube function is the easiest one to understand the process.