playcanvas / playcanvas/engine

Implement USDZ exporter improvements

Open
#4,644 3 comments 0 reactions 1 assignee View on GitHub

@mvaligursky is already working on this.

Since Nov 10, 2022.

area: graphics enhancement
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

PR https://github.com/playcanvas/engine/pull/4638 implemented initial functionality of USDZ export, and these are additional bits that would improve it's quality:

  • scene hierarchy. At the moment, mesh instances are exported without a hierarchy, each directly with a world matrix. A hierarchy would be useful when animations are exported.

  • animation support

  • skinning / morphing support

  • precision - all mesh attributes (positions, uvs ..) are exported at full precision, and could be stored with lower precision to limit the size. Example:

point3f[] points = [(-33.66764831542969, 3.8385066986083984, 19.865646362304688) ...
  • additional vertex attributes (for example vertex colors)

  • additional texture formats. All textures are presently stored in .png format. We could add jpg format if alpha channel is not required.

  • texture transform
    There is partial support implemented, but does not work in many cases:

                    float inputs:rotation = ${rotation}
                    float2 inputs:scale = (${tiling.x}, ${tiling.y})
                    float2 inputs:translation = (${offset.x}, ${offset.y})
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md
https://graphics.pixar.com/usd/release/spec_usdpreviewsurface.html#transform2d
                    token inputs:wrapS = "repeat"
                    token inputs:wrapT = "repeat"
  • alpha testing - the code is there, see opacityThreshold, but using it seems to fail to load in the built in MacOS viewer. Needs further investigation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.