react-three-arjs icon indicating copy to clipboard operation
react-three-arjs copied to clipboard

Render model without resizing according to marker.

Open HarshDivecha opened this issue 2 years ago • 3 comments

I want to load the model in a way that it isn't resize according to the marker. How can i do that ? When i open a marker on my tab, it's huge, resulting in model to render twice the size and out of canvas.

HarshDivecha avatar Apr 10 '22 04:04 HarshDivecha

Hi @HarshDivecha, the model size is always relative to the marker size in the camera view. If you want to change the relative size you could provide an additional parameter size (see https://ar-js-org.github.io/AR.js-Docs/marker-based/) e.g.:

<ARMarker params={{size: 2, ...}} ... >

j-era avatar Apr 12 '22 15:04 j-era

@j-era any tips on how to stabilize the model on the marker ? it keeps moving in the opposite direction of the camera on the marker. Let's say if i am travelling to the right of camera the model is moving towards left and vice versa.

HarshDivecha avatar Apr 14 '22 17:04 HarshDivecha

@j-era any tips on how to stabilize the model on the marker ? it keeps moving in the opposite direction of the camera on the marker. Let's say if i am travelling to the right of camera the model is moving towards left and vice versa.

Try with changing the smooth options, maybe you have a high smoothcount number? You can compare your results with the defaults here: https://github.com/artcom/react-three-arjs#demo This lib is all based on ar.js/artoolkit5. Questions concerning optimizations should be asked here https://github.com/AR-js-org/AR.js

j-era avatar May 02 '22 13:05 j-era