Objloader with facetracking

Hi, can anyone please help?! I’m trying to add a parallax head tracker (via webcam) so that users can look around a 3D object. I’m trying to stitch together two scripts the OBJ MTL loader example and Parallax camera example

Here’s my code currently:

test

Any ideas what I’m doing wrong? I can’t seem to add the camera to the OBJLoader or alternatively change the material loader in the GLTF example. Really struggling despite watching numerous tutorials and reading and learning for the past few weeks, I just can’t seem to get it right…
Sorry for being annoying, please, any help would be greatly appreciated!

I guess this topic did not get any response so far since it’s not possible to run and thus debug your code. You’ve just shared your HTML file without any dependencies and assets.

It’s actually best if you share your app in a way so users can download the repository and use npm i && npm start to install all dependencies and locally host the application. To achieve this, you have to manage your app as an npm package.

In any event, can you please ensure first if the plain OBJ actually loads correctly? You can easily verify this by drag’n’drop the asset into the editor.

Hey @Mugen87 thank you for explaining that!

I was using the threejs_master example which was too large to upload to GitHub, so perhaps it’d be easier to try to stick with the GLTF version by @munrocket ?

HERE is a link to my version of this with this being the html file I want to run.

I want to be able to load one 3D file with mapped/baked texture which I know works in the gltf editor.

Sorry, I can’t answer, but better later than never.

Basically OBJLoader doesn’t have any major difference than GLTFLoader, you can check official three.js example and just change some code.

If you have any issue with parallax-effect please open issue on my github.