# US 2023/0267650 A1 · Data compression

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0267650 A1
- Document ID: US20230267650A1
- Status: Published application
- Kind: A1
- Application number: 17/676,706
- Filed: 2022-02-21
- Published: 2023-08-24
- Earliest claimed: 2022-02-21
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Tad Douglas SWIFT; Adam James MILES
- Web page: https://patentgrep.com/patent/US20230267650A1

## CPC

- G06T 9/40: Tree coding, e.g. quadtree, octree
- H03M 7/30: Compression (speech analysis-synthesis for redundancy reduction G10L19/00; for image communication H04N); Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06T 9/001: {Model-based coding, e.g. wire frame}
- G06T 15/06: Ray-tracing
- G06T 17/10: Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
- H03M 7/70: {Type of the data to be coded, other than image and sound}
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

The present concepts relate to lossless data compression techniques for reducing the size of a data structure. Certain data in the data structure that can be either recovered from another source or rebuilt from other available information may be removed from the data structure. To further reduce data size, the retained data in the data structure may be packed into a smaller-bit encoding data type. Additionally, to reduce the data size even more, the packed data may be zipped using a lossless data compression algorithm. To regain the original data structure, the process may be reversed. The zipped data may be unzipped using a lossless data decompression algorithm. The packed data may be unpacked into the original bit-sized data encoding. The removed data may be restored by either recovering it from another source or rebuilding it from other available information.

## Claims

### Claim 1

A method, comprising:
receiving a request for a compressed bounding volume hierarchy (BVH) structure for a model;
generating an uncompressed BVH structure for the model, the uncompressed BVH structure including leaf data and hierarchy data;
generating packed leaf data by omitting triangle data in the leaf data that exists in the model and packing retained leaf data in the leaf data;
generating packed hierarchy data by omitting default bounding volume data in the hierarchy data that can be recreated based on the triangle data and packing retained hierarchy data in the hierarchy data; and
outputting the compressed BVH structure including the packed leaf data and the packed hierarchy data, a compressed size of the compressed BVH structure being smaller than an uncompressed size of the uncompressed BVH structure.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating modified header data by changing a compression flag in header data of the uncompressed BVH structure;
wherein the compressed BVH structure includes the modified header data.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
compressing the packed leaf data and the packed hierarchy data using a lossless compression algorithm.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
excluding parent data from the compressed BVH structure,
wherein the uncompressed BVH structure includes the parent data.

### Claim 5

A device, comprising:
a processor; and
a storage for storing instructions which, when executed by the processor, cause the processor to:
generate an uncompressed data structure for a model, the uncompressed data structure including header data, leaf data, and hierarchy data;
generate packed leaf data based on the leaf data of the uncompressed data structure;
generate packed hierarchy data based on the hierarchy data of the uncompressed data structure;
generate a compressed data structure for the model, the compressed data structure including the packed leaf data and the packed hierarchy data; and
output the compressed data structure for packaging with the model, a compressed size of the compressed data structure being smaller than an uncompressed size of the uncompressed data structure.

### Claim 6 (depends on 5)

The device of claim 5, wherein the packed leaf data excludes triangle data in the leaf data.

### Claim 7 (depends on 5)

The device of claim 5, wherein the packed hierarchy data excludes default bounding volumes in the hierarchy data.

### Claim 8 (depends on 5)

The device of claim 5, wherein the instructions further cause the processor to:
generate modified header data based on the header data of the uncompressed data structure;
wherein the compressed data structure includes the modified header data.

### Claim 9

A computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to:
receive a request for a compressed data structure associated with a model;
generate an uncompressed data structure for the model, the uncompressed data structure including leaf data and hierarchy data;
generate the compressed data structure by:
removing restorable leaf data in the leaf data and keeping retained leaf data in the leaf data; and
removing rebuildable hierarchy data in the hierarchy data and keeping retained hierarchy data in the hierarchy data; and
output the compressed data structure, a compressed size of the compressed data structure being smaller than an uncompressed size of the uncompressed data structure.

### Claim 10 (depends on 9)

The computer-readable storage medium of claim 9, wherein the instructions further cause the processor to:
generate packed leaf data by packing the retained leaf data; and
generate packed hierarchy data by packing the retained hierarchy data,
wherein the compressed data structure includes the packed leaf data and the packed hierarchy data.

### Claim 11 (depends on 9)

The computer-readable storage medium of claim 9, wherein the restorable leaf data includes triangle data that is included in the model.

### Claim 12 (depends on 9)

The computer-readable storage medium of claim 9, wherein the rebuildable hierarchy data includes bounding volume data.

### Claim 13 (depends on 9)

The computer-readable storage medium of claim 9, wherein removing the rebuildable hierarchy data comprises:
calculating a check bounding volume based on a triangle;
comparing a bounding volume of the triangle in the hierarchy data with the check bounding volume; and
in response to determining that the bounding volume does not match the check bounding volume, generating variance data based on the bounding volume,
wherein the compressed data structure includes the variance data.

### Claim 14 (depends on 9)

The computer-readable storage medium of claim 9, wherein the instructions further cause the processor to:
generate modified header data based on header data of the uncompressed data structure;
wherein the compressed data structure includes the modified header data.

### Claim 15

A computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to:
generate leaf data based on packed leaf data in a compressed data structure associated with a model and triangle data in the model;
generate hierarchy data based on packed hierarchy data and variance data in the compressed data structure;
generate parent data based on the packed hierarchy data;
generate an uncompressed data structure including the parent data, the leaf data, and the hierarchy data; and
output the uncompressed data structure for use by a graphics processing unit (GPU) in raytracing involving the model, a compressed size of the compressed data structure being smaller than an uncompressed size of the uncompressed data structure.

### Claim 16 (depends on 15)

The computer-readable storage medium of claim 15, wherein generating the leaf data comprises:
unpacking the packed leaf data; and
restoring the triangle data from the model into the leaf data.

### Claim 17 (depends on 15)

The computer-readable storage medium of claim 15, wherein generating the hierarchy data comprises:
unpacking the packed hierarchy data;
calculating a default bounding volume for a node based on a triangle;
determining whether the variance data exists for the node; and
in response to determining that the variance data does not exist for the node, adding the default bounding volume for the node into the hierarchy data.

### Claim 18 (depends on 17)

The computer-readable storage medium of claim 17, wherein generating the hierarchy data further comprises:
in response to determining that the variance data exists for the node:
calculating a varied bounding volume for the node based on the default bounding volume and the variance data; and
adding the varied bounding volume for the node into the hierarchy data.

### Claim 19 (depends on 15)

The computer-readable storage medium of claim 15, wherein the instructions further cause the processor to:
generate modified header data by changing a compression flag in header data of the compressed data structure,
wherein the uncompressed data structure includes the modified header data.

### Claim 20 (depends on 15)

The computer-readable storage medium of claim 15, wherein the uncompressed data structure is compatible with the GPU.
