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

USDZExporter: Add anchoring support. #22854

Merged
merged 6 commits into from
Oct 28, 2022

Conversation

aleneum
Copy link
Contributor

@aleneum aleneum commented Nov 17, 2021

This is basically the same as #21997 by @ThorstenBux but with fixed white spaces.
The problem wasn't too few tabs but too many in strings.

Original description:

Fixed #21995

Description

Until these changes, it wasn't possible to tell AR Quicklook that a USDZ file should be attached to a wall target as opposed to a horizontal surface.

Reference: https://developer.apple.com/documentation/arkit/usdz_schemas_for_ar/preliminary_anchoringapi

This contribution is funded by Tripod Digital.

ThorstenBux and others added 6 commits June 16, 2021 14:24
…l-placement-usdz

* commit 'd0340e3a147e290fa86d14bc3ed97d8e1c20602e': (79 commits)
  r130 (bis)
  Revert "Update revision (mrdoob#22087)" (mrdoob#22090)
  Update WebXR Layers example to compare quality. (mrdoob#22083)
  Update revision (mrdoob#22087)
  Updated examples builds
  Updated builds
  USDZExporter: Added map transparency support (mrdoob#22086)
  DragControls: added onPointerDown parameters (mrdoob#22084)
  Examples: Clean up.
  FBXLoader: Matrix4 code clean up.
  USDZExporter: Log a warning when matrixWorld has a negative scale.
  Docs: Improved AnimationMixer page. (mrdoob#22076)
  WebGLTextures: Fix mips gen for 3D render targets. (mrdoob#22072)
  Fix regression in WebXR (mrdoob#22074)
  Revert "TransformControls: Clean up."
  r130
  Examples: Clean up
  Editor: Cache network responses in sw.js.
  Updated builds
  Updated examples builds
  ...

# Conflicts:
#	examples/jsm/exporters/USDZExporter.js
@aleneum aleneum force-pushed the feat/wall-placement-usdz branch from b4945b3 to e6e72d1 Compare November 18, 2021 08:37
@aleneum
Copy link
Contributor Author

aleneum commented Nov 18, 2021

I just realized that the added strings also contained tabs. I fixed that (I hope the indent is correct). I decided to squash this into one commit (and force push) to not inflate the commit history any further.

@donmccurdy
Copy link
Collaborator

@elalish curious on your thoughts here? If this anchoring data came with a glTF file via KHR_xmp_json_ld, would it be straightforward for model-viewer to adjust the generated USDZ to pass the anchoring data along?

@elalish
Copy link
Contributor

elalish commented Feb 28, 2022

@donmccurdy yes, I think so. We actually have our own API to specify wall-placement, so that will be our normal route. We would definitely use this feature in combination with our USDZ auto-generation.

@aleneum
Copy link
Contributor Author

aleneum commented Sep 8, 2022

Hello again, since there hasn't been activity for 6 month and I am doing some 'repo cleaning' right now: Is this still a PR you are considering merging? Let me know if I could do something to make hitting that merge button easier for you. If this PR is not valid anymore I'd close this and delete my fork of three.js.

Cheers

@milesgreen
Copy link

+1 for this feature. Ability to specify floor or wall anchor when exporting USDZ would be great.

@elalish
Copy link
Contributor

elalish commented Oct 6, 2022

@mrdoob Any reason we can't merge this?

@WestLangley WestLangley added this to the r146 milestone Oct 6, 2022
@mrdoob mrdoob modified the milestones: r146, r147 Oct 27, 2022
@Mugen87 Mugen87 merged commit 868aee4 into mrdoob:dev Oct 28, 2022
@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 28, 2022

The API has slightly changed according to other exporters, see #24865. options is now a parameter of the parse() method.

@Mugen87 Mugen87 changed the title USDZExporter: Anchoring support USDZExporter: Add anchoring support. Oct 28, 2022
hybridherbst added a commit to needle-tools/three.js that referenced this pull request Nov 24, 2022
@0b5vr 0b5vr mentioned this pull request Dec 7, 2022
12 tasks
hybridherbst pushed a commit to needle-tools/three.js that referenced this pull request Mar 28, 2023
lint

minor fix lint extension error

cherry-pick changes done to USDZExporter in the meantime

USDZExporter: Add camera support. (mrdoob#24854)

USDZExporter: Anchoring support (mrdoob#22854)

clean up camera exporting, set default plane to horizontal

USDZExporter: add desktop download button to sample

fix: don't export opacity if model is opaque, leads to incorrect rendering effects

feat: add uv2 support, make sure TextureTransform is only written when needed, use uv2 for occlusion

simplify st / st2 access

USDZExporter: fix exception when trying to process render targets

fix: pass writer into onAfterHierarchy callback, move onAfterHierarchy callback after scene hierarchy write

pass options and extensions correctly
hybridherbst pushed a commit to needle-tools/three.js that referenced this pull request Mar 28, 2023
lint

minor fix lint extension error

cherry-pick changes done to USDZExporter in the meantime

USDZExporter: Add camera support. (mrdoob#24854)

USDZExporter: Anchoring support (mrdoob#22854)

clean up camera exporting, set default plane to horizontal

USDZExporter: add desktop download button to sample

fix: don't export opacity if model is opaque, leads to incorrect rendering effects

feat: add uv2 support, make sure TextureTransform is only written when needed, use uv2 for occlusion

simplify st / st2 access

USDZExporter: fix exception when trying to process render targets

fix: pass writer into onAfterHierarchy callback, move onAfterHierarchy callback after scene hierarchy write

pass options and extensions correctly

Only print usdz in debug mode

# Conflicts:
#	examples/jsm/exporters/USDZExporter.js
hybridherbst pushed a commit to needle-tools/three.js that referenced this pull request Mar 30, 2023
lint

minor fix lint extension error

cherry-pick changes done to USDZExporter in the meantime

USDZExporter: Add camera support. (mrdoob#24854)

USDZExporter: Anchoring support (mrdoob#22854)

clean up camera exporting, set default plane to horizontal

USDZExporter: add desktop download button to sample

fix: don't export opacity if model is opaque, leads to incorrect rendering effects

feat: add uv2 support, make sure TextureTransform is only written when needed, use uv2 for occlusion

simplify st / st2 access

USDZExporter: fix exception when trying to process render targets

fix: pass writer into onAfterHierarchy callback, move onAfterHierarchy callback after scene hierarchy write

pass options and extensions correctly

Only print usdz in debug mode

# Conflicts:
#	examples/jsm/exporters/USDZExporter.js
hybridherbst pushed a commit to needle-tools/three.js that referenced this pull request Apr 22, 2023
lint

minor fix lint extension error

cherry-pick changes done to USDZExporter in the meantime

USDZExporter: Add camera support. (mrdoob#24854)

USDZExporter: Anchoring support (mrdoob#22854)

clean up camera exporting, set default plane to horizontal

USDZExporter: add desktop download button to sample

fix: don't export opacity if model is opaque, leads to incorrect rendering effects

feat: add uv2 support, make sure TextureTransform is only written when needed, use uv2 for occlusion

simplify st / st2 access

USDZExporter: fix exception when trying to process render targets

fix: pass writer into onAfterHierarchy callback, move onAfterHierarchy callback after scene hierarchy write

pass options and extensions correctly

Only print usdz in debug mode

# Conflicts:
#	examples/jsm/exporters/USDZExporter.js
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.

USDZ exporter with target wall placement
8 participants