Unable to reduce the size of the custom 3D model in three-js-example-face-tracking

Hi! I had been trying the following example locally on my system

Although, I am able to get it running with the default 3d helmet provided in glb, I cannot seem to get any third party 3d model (also in glb) to render in the appropriate size.

Can anyone tell how will I be able to manipulate the size of a large 3D object (inside of a GLB file) ?

Currently, it looks something like this with the same code:

In contrast, the default GLB model provided in the code example renders like this (and is appropriate)

1 Like

Hi @sujit.psxt2021,

Firstly, Welcome to ZapWorks! :tada:

As the Universal AR SDKs are our best-in-class computer vision libraries - the added benefit of having an AR camera and tracker - you should be able to manipulate the size of your content in the usual Three.js way.

For example, in the example shared, we set the scale of the object within the gltfLoader method as such:

gltf.scene.scale.set(1.1, 1.1, 1.1);

You can find this here in the source. :zap:

Iā€™d recommend the use of GUI tools (such as sliders) to make things like this easier to do, as it can be difficult to judge the size or position needed depending on your content. GUI tools can save you from having to manually guess. My personal favourite is dat.GUI, but others are available online! :muscle:

Have a lovely day,
Francesca :blush: