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

Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel. #25013

Merged
merged 2 commits into from
Nov 25, 2022

Conversation

hybridherbst
Copy link
Contributor

Related issue: #24857

Description

For Monster Hands, we needed to be able to load custom hand models, and since these can be rather complex we wanted to compress them as usual with etc1s+draco. The embedded GLTFLoader inside XRHandMeshModel doesn't have the relevant components for loading compressed meshes, so this PR allows passing an existing / externally created loader in.

If that externally created loader should load the default hand models, users need to set the DEFAULT_HAND_PROFILE_PATH in their code, otherwise it's confusing when explicitly no path is wanted (loading local relative models).

cc @cabanier

This contribution is funded by Needle

@Mugen87 Mugen87 added this to the r147 milestone Nov 25, 2022
@Mugen87 Mugen87 merged commit 08b7401 into mrdoob:dev Nov 25, 2022
@Mugen87 Mugen87 changed the title [XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel. Nov 25, 2022
@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 25, 2022

Minor clean up 8422f32

@hybridherbst
Copy link
Contributor Author

My bad – thanks for cleaning it up!

@hybridherbst hybridherbst deleted the feat-oculus-hand-model-gltfloader branch November 26, 2022 02:18
hybridherbst added a commit to needle-tools/three.js that referenced this pull request Mar 27, 2023
… proper disposal, and animation

* added webgl_loader_multiple as example of how to load multiple files one after each other
* added bounds fitting
* added FBX import as second file type example
* added material upgrade of FBX materials to MeshStandardMaterial to receive IBL
* fix minDistance possibly being greater than maxDistance, fix animation loading and playback
* switched to animationLoop

workaround for having a nicely blurred background from the environment

alternative blur approach: use texture mipmaps directly. less pretty

clean up, add link to PR that will introduce background bluriness

fix env bluriness (harder with mipmaps), fix HDRI Haven url

update screenshot

replace blurred background hack with new backgroundBlurriness

feat: add USDZ loading, glTF export and USDZ export, FBX material conversion

USDZExporter: fix default plane anchoring orientation and add precision specifiers (mrdoob#25012)

Fixes mrdoob#25011

[XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel (mrdoob#25013)

* feat: allow passing GLTFLoader into OculusHandModel/XRHandMeshModel

* apply review feedback

USDZExporter: guard against missing image data in textures

USDZLoader: add hierarchy support and fix loading files exported with USDZExporter

GLTFExporter: guard against missing image data in textures

simplify null check

cleanup child name and add example for texture traversal after loading

added file input button, added download button for OBJ
hybridherbst added a commit to needle-tools/three.js that referenced this pull request Mar 30, 2023
… proper disposal, and animation

* added webgl_loader_multiple as example of how to load multiple files one after each other
* added bounds fitting
* added FBX import as second file type example
* added material upgrade of FBX materials to MeshStandardMaterial to receive IBL
* fix minDistance possibly being greater than maxDistance, fix animation loading and playback
* switched to animationLoop

workaround for having a nicely blurred background from the environment

alternative blur approach: use texture mipmaps directly. less pretty

clean up, add link to PR that will introduce background bluriness

fix env bluriness (harder with mipmaps), fix HDRI Haven url

update screenshot

replace blurred background hack with new backgroundBlurriness

feat: add USDZ loading, glTF export and USDZ export, FBX material conversion

USDZExporter: fix default plane anchoring orientation and add precision specifiers (mrdoob#25012)

Fixes mrdoob#25011

[XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel (mrdoob#25013)

* feat: allow passing GLTFLoader into OculusHandModel/XRHandMeshModel

* apply review feedback

USDZExporter: guard against missing image data in textures

USDZLoader: add hierarchy support and fix loading files exported with USDZExporter

GLTFExporter: guard against missing image data in textures

simplify null check

cleanup child name and add example for texture traversal after loading

added file input button, added download button for OBJ
hybridherbst added a commit to needle-tools/three.js that referenced this pull request May 23, 2023
… proper disposal, and animation

* added webgl_loader_multiple as example of how to load multiple files one after each other
* added bounds fitting
* added FBX import as second file type example
* added material upgrade of FBX materials to MeshStandardMaterial to receive IBL
* fix minDistance possibly being greater than maxDistance, fix animation loading and playback
* switched to animationLoop

workaround for having a nicely blurred background from the environment

alternative blur approach: use texture mipmaps directly. less pretty

clean up, add link to PR that will introduce background bluriness

fix env bluriness (harder with mipmaps), fix HDRI Haven url

update screenshot

replace blurred background hack with new backgroundBlurriness

feat: add USDZ loading, glTF export and USDZ export, FBX material conversion

USDZExporter: fix default plane anchoring orientation and add precision specifiers (mrdoob#25012)

Fixes mrdoob#25011

[XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel (mrdoob#25013)

* feat: allow passing GLTFLoader into OculusHandModel/XRHandMeshModel

* apply review feedback

USDZExporter: guard against missing image data in textures

USDZLoader: add hierarchy support and fix loading files exported with USDZExporter

GLTFExporter: guard against missing image data in textures

simplify null check

cleanup child name and add example for texture traversal after loading

added file input button, added download button for OBJ
hybridherbst added a commit to needle-tools/three.js that referenced this pull request Jun 10, 2023
… proper disposal, and animation

* added webgl_loader_multiple as example of how to load multiple files one after each other
* added bounds fitting
* added FBX import as second file type example
* added material upgrade of FBX materials to MeshStandardMaterial to receive IBL
* fix minDistance possibly being greater than maxDistance, fix animation loading and playback
* switched to animationLoop

workaround for having a nicely blurred background from the environment

alternative blur approach: use texture mipmaps directly. less pretty

clean up, add link to PR that will introduce background bluriness

fix env bluriness (harder with mipmaps), fix HDRI Haven url

update screenshot

replace blurred background hack with new backgroundBlurriness

feat: add USDZ loading, glTF export and USDZ export, FBX material conversion

USDZExporter: fix default plane anchoring orientation and add precision specifiers (mrdoob#25012)

Fixes mrdoob#25011

[XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel (mrdoob#25013)

* feat: allow passing GLTFLoader into OculusHandModel/XRHandMeshModel

* apply review feedback

USDZExporter: guard against missing image data in textures

USDZLoader: add hierarchy support and fix loading files exported with USDZExporter

GLTFExporter: guard against missing image data in textures

simplify null check

cleanup child name and add example for texture traversal after loading

added file input button, added download button for OBJ
hybridherbst added a commit to needle-tools/three.js that referenced this pull request Jul 6, 2023
… proper disposal, and animation

* added webgl_loader_multiple as example of how to load multiple files one after each other
* added bounds fitting
* added FBX import as second file type example
* added material upgrade of FBX materials to MeshStandardMaterial to receive IBL
* fix minDistance possibly being greater than maxDistance, fix animation loading and playback
* switched to animationLoop

workaround for having a nicely blurred background from the environment

alternative blur approach: use texture mipmaps directly. less pretty

clean up, add link to PR that will introduce background bluriness

fix env bluriness (harder with mipmaps), fix HDRI Haven url

update screenshot

replace blurred background hack with new backgroundBlurriness

feat: add USDZ loading, glTF export and USDZ export, FBX material conversion

USDZExporter: fix default plane anchoring orientation and add precision specifiers (mrdoob#25012)

Fixes mrdoob#25011

[XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel (mrdoob#25013)

* feat: allow passing GLTFLoader into OculusHandModel/XRHandMeshModel

* apply review feedback

USDZExporter: guard against missing image data in textures

USDZLoader: add hierarchy support and fix loading files exported with USDZExporter

GLTFExporter: guard against missing image data in textures

simplify null check

cleanup child name and add example for texture traversal after loading

added file input button, added download button for OBJ

fix: GLTF and USDZ exporters break with missing images in textures

adjust title and description, convert OBJ mats to MeshStandardMaterial so they use IBL

updated screenshot
hybridherbst added a commit to needle-tools/three.js that referenced this pull request Sep 7, 2023
… proper disposal, and animation

* added webgl_loader_multiple as example of how to load multiple files one after each other
* added bounds fitting
* added FBX import as second file type example
* added material upgrade of FBX materials to MeshStandardMaterial to receive IBL
* fix minDistance possibly being greater than maxDistance, fix animation loading and playback
* switched to animationLoop

workaround for having a nicely blurred background from the environment

alternative blur approach: use texture mipmaps directly. less pretty

clean up, add link to PR that will introduce background bluriness

fix env bluriness (harder with mipmaps), fix HDRI Haven url

update screenshot

replace blurred background hack with new backgroundBlurriness

feat: add USDZ loading, glTF export and USDZ export, FBX material conversion

USDZExporter: fix default plane anchoring orientation and add precision specifiers (mrdoob#25012)

Fixes mrdoob#25011

[XR] Feat: Allow passing GLTFLoader into OculusHandModel/XRHandMeshModel (mrdoob#25013)

* feat: allow passing GLTFLoader into OculusHandModel/XRHandMeshModel

* apply review feedback

USDZExporter: guard against missing image data in textures

USDZLoader: add hierarchy support and fix loading files exported with USDZExporter

GLTFExporter: guard against missing image data in textures

simplify null check

cleanup child name and add example for texture traversal after loading

added file input button, added download button for OBJ

fix: GLTF and USDZ exporters break with missing images in textures

adjust title and description, convert OBJ mats to MeshStandardMaterial so they use IBL

updated screenshot
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

Successfully merging this pull request may close these issues.

2 participants