jsartoolkit5
jsartoolkit5 copied to clipboard
ntf examples when size is fullscreen, fps drops very low
When the container variable is not resized to fit the resolution of the webcam video, then the fps drop to very low, you can just comment this 2 lines:
https://github.com/artoolkitx/jsartoolkit5/blob/4a2fd7b1ed803c5d24e36b97156bcc8c5e1306e7/examples/nft_improved_worker/threejs_wasm_worker.js#L104-L105
I also changed the lines in css of the size of the canvas where everything is draw, and it affected the fps! https://github.com/artoolkitx/jsartoolkit5/blob/4a2fd7b1ed803c5d24e36b97156bcc8c5e1306e7/examples/css/video-style.css#L82-L83 to:
width: 800px;
height: 800px;
I also need a better understand of the canvas_process and the pscale and sscale and why the projection matrix is being multiplied by this ratio.. looks so complicated the way its done.. is this ratioW, ratioH just the ratio between the size of the image of the camera, and the output of the canvas?
Ok, let me bump this... with another question.. what is ratioW and ratioH ? it seems that this values are calculated in a very "hardcoded" way.. with 4/3 ratios and with 320
thanks in advance :)
@albjeremias You should read carefully this PR https://github.com/kalwalt/jsartoolkit5/pull/3 in particular see this comment https://github.com/kalwalt/jsartoolkit5/pull/3#issuecomment-562524949 and the main PR with all discussion https://github.com/kalwalt/jsartoolkit5/pull/1, Plus i think you will found other useful infos in other PR's in my repository. Hope that this will help you...
it also affects this: https://github.com/kalwalt/jsartoolkit5/issues/39 if i find more stuff.. i will edit this reply. it seems to be solved on arjs... i can see the nft tracking in fullscreen..
https://github.com/AR-js-org/AR.js/blob/master/three.js/src/threex/threex-armarkercontrols-nft-start.js#L287
ox, oy, pscale & sscale:

ratioW & ratioH:

thats so cool! <3 thanks