Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GLTF/GLB instead of JSON object scene in format 4 in demos/threejs/glassesVTO/JeelizThreeGlassesCreator #310

Open
resun-c opened this issue Sep 21, 2024 · 10 comments

Comments

@resun-c
Copy link

resun-c commented Sep 21, 2024

I was wondering if it is possible to use GLTF/GLB with JeelizThreeGlassesCreator instead of using JSON object scene in format 4 as they don't have much support accorse tools like Blender.

Thanks!

@hharshas
Copy link

I may find this interesting and wanna try out to do changes cause glb and gltf are easier to load with threejs using the GLTFLoader and hooks like useLoader, making the process seamless.

@xavierjs
Copy link
Member

Hi @resun-c @hharshas
Sure, it would be a good idea. You are welcome to submit a PR for this.

@resun-c
Copy link
Author

resun-c commented Sep 23, 2024

I don't have much experience with Three.js. So, I would request your assistance.

Thanks!

@xavierjs
Copy link
Member

xavierjs commented Sep 23, 2024

You can find all the documents, tutorials, and examples online, especially at http://webglacademy.com (I created this interactive tutorial platform for my teaching of 3D programming ).

@resun-c
Copy link
Author

resun-c commented Sep 23, 2024

It shows "Page Not Found bro".

@xavierjs
Copy link
Member

Oops sorry I fixed the link in my previous post (I put HTTPS:// instead of HTTP:// )

@resun-c
Copy link
Author

resun-c commented Sep 24, 2024

the link is still incorrect; you have only changed the text.

@resun-c
Copy link
Author

resun-c commented Sep 24, 2024

@resun-c
Copy link
Author

resun-c commented Sep 27, 2024

I tried to tweak it a bit and I was able to use a gltf file as the source of the glass. But there's an issue! The glass doesn't properly fit on the face and the glass is moving on the opposite direction when the head move around.

Here's a demo version: https://arfilter-7a618.web.app

All the demo under /demo has multiple JSON files for lense, branch and frame and they are using the JSON data to feed THREE.BufferGeometryLoader() and creating a mesh along with some textures. Then those meshes are put into a Object3D which is then added to the face. Seemingly, those meshes perfectly fit the face. However, the glass I am using is a single mesh. Is it the main issue?

Thanks!

@xavierjs
Copy link
Member

xavierjs commented Oct 4, 2024

Hello @resun-c

Please submit a PR with your code in the newly created /demos/threejs/glassesVTOJSON/ folder, I will take a look.

Best,
Xavier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants