Check CN version: Catalog的Part ID分配方式推荐

According to the application scenario of the Catalog, a complete Catalog instance is composed of various parts. For a specific spatial coordinate position, multiple parts may fit, and only ONE Part at the spatial coordinate position is required to form an ideal instance.

Example: To form a Catalog instance of a human model, only ONE Part is required to fit the right leg position, and there may be various styles of right leg parts in the Catalog.

Therefore, it will be easier to sort out parts if we consciously classify each Part by allocating ID.

So, Lightm makes a recommendation on how to assign Part IDs.

Since Part ID is defined asuint64 in IRMRKCatalog, we also assign ID ranges and their corresponding functions on a 64-bit basis:

function Part classified Sub Part ID in some specific class Part type Reserved
range(bit) 0-15 16-47 48 49-63
description To classify Part, up to 2^16 Used to index a specific Part under a specific class. A specific class can hold a maximum of 2^32 parts Part type
0 - Fixed
1 - Slot Reserved bits

Lightm UI divides parts and displays based on this pattern.

You could specify in Catalog Metadata

"LIGHTM_CATALOG": true

to instructs Lightm to parse all the parts contained in the Catalog in Lightm recommended way.

In addition, to improve readability, you can specify in Catalog Metadata

"LIGHTM_CATALOG_PART_CLASS_NAMES": {"<PART_CLASS_ID>": "<PART_CLASS_NAME>"}

// Example
"LIGHTM_CATALOG_PART_CLASS_NAMES": {
    "1": "HAND WEAR",
    "2": "SHOES",
    "3": "PET"
  }

to give each Part class ID a name for semantic display in Lightm.

NOTE

As you may add new Part to Catalog in the future often so you also need to update LIGHTM_CATALOG_PART_CLASS_NAMES