glTF glitching and degradation in AR

gltf_gif

A glTF model that was working and looking great on desktop started to show pretty serious glitching and degradation when loaded into AR.

I have used dae/collada files for this in the past for AR with good results. Sadly this animated model was not super keen to be dae.

Curious why glTF is having issues like this? (I am using this format for the first time so don’t know much about it).

Thanks!

I believe this is a bug in AR.js, which has more to do with the scale of the scene and camera configuration than the particular model format. If the glTF model looks OK with a properly chosen camera near/far parameters (try: http://gltf-viewer.donmccurdy.com/) then AR.js just needs the right camera configuration to work. See https://github.com/jeromeetienne/AR.js/issues/146. If the workarounds described there are not working, I’d suggest commenting or filing a new issue.

1 Like

yay!

renderer = new THREE.WebGLRenderer({ antialias:true, logarithmicDepthBuffer:true, alpha:true, preserveDrawingBuffer:true });

^ did that, as outlined on ar.js issues, and switched to perspective camera.

looks great now! thanks!