Google Model Viewer AR- How to have "View in AR" button with out having poster or object preview

Is it possible to view my GLTF and USDZ file in AR from clicking a button. I do not want to have a background poster or object preview just a button.


Solution 1:

Maybe you already solved this long ago.

But here: https://modelviewer.dev/examples/model-formats.html

You can see "With only a USDZ model" it should be possible. You could make the poster an empty/transparent image.

Then edit the button ui and make the model-viewer as big as your button. https://modelviewer.dev/examples/customizing-ui.html

From what I can see that is the best thing you can do right now.

EDIT:

Whoops, actually you can just call an intent to Scene Viewer in a link then style it as a button. Or a button with some js.

https://developers.google.com/ar/develop/java/scene-viewer#3d-or-ar