playcanvas / playcanvas/engine

Additional morph target functionality

Open
#2,126 5 comments 0 reactions 1 assignee View on GitHub

@mvaligursky is already working on this.

Since Jun 4, 2020.

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

Description

There is a need currently to call user callbacks during glb loading, to allow users to access custom glb data.

When this is implemented, implement these addition features for morph targets:

  • before glb-parser creates new pc.Morph(), we should execute user callback and allow:
    • user to specify morph preference (attribute based vs texture based) - perhaps by indicating how many concurrent morph targets should be supported, or by directly selecting the rendering path. - Non longer relevant as vertex attribute based solution was removed in engine V2 https://github.com/playcanvas/engine/pull/6319
    • allow user to specify precision of storage of morph targets (could be used for both attributes and textures if supported). Currently it's all stored as floats, but we could consider using half / short / byte storage. We have an option for this when the glb is loaded dynamically: morphPreferHighPrecision
  • considering storing vertex_ids (see Morph class) using uint format (webgl2 only) instead of current float format, allowing larger texture limits (currently 4kx4k). Done https://github.com/playcanvas/engine/pull/6319
  • we prefer half float texture format currently, to minimise memory and GPU use, but this forces CPU to convert data to half-float format. We need to profile this cost and perhaps prefer float format if this is unacceptably high.

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.