Variable Morton Code Encoding for 3D Primitive Clustering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for generating Morton codes for efficient ray tracing in computer graphics fail to effectively account for the varying sizes of primitives in a 3D scene, leading to suboptimal clustering and quality of bounding volume hierarchies (BVH) trees.

Innovation Solution

A variable Morton code encoding method that incorporates the size of primitives into the coding pattern, using a prefix and base pattern to normalize primitive sizes relative to the scene, allowing for improved clustering and faster generation of Morton codes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If traditional Morton code generation methods are used, then the coding process is simple, but the clustering quality of primitives is suboptimal due to not accounting for varying primitive sizes

Engineering Contradiction:
Improveclustering qualityVSAvoidcoding complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent changes the parameter representation by incorporating primitive size information into the Morton code structure. Instead of using only position coordinates (x, y, z), the encoding now includes size metrics, transforming the code from a 3D spatial representation to a 4D representation that accounts for both position and size. This parameter expansion enables size-aware clustering while maintaining the hierarchical sorting capability of Morton codes.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent adds an additional dimension to the traditional Morton code by incorporating primitive size as a fourth dimension. The extended Morton code interleaves not only the x, y, z position bits but also size-related bits, creating a multi-dimensional sorting key that simultaneously considers spatial location and primitive extent. This dimensional expansion resolves the contradiction by enabling size-aware clustering without fundamentally changing the Morton code generation approach.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Manufacturing precision

If primitive size is incorporated into Morton code, then clustering quality improves, but code generation time increases

Engineering Contradiction:
Improveclustering qualityVSAvoidcode generation time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-calculating and storing size metrics for each primitive before the Morton code generation process. The size information is computed once and reused during encoding, avoiding repeated size calculations. This preprocessing step separates the computationally expensive size analysis from the code generation phase, reducing the time penalty of incorporating size information into the Morton codes.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If variable coding patterns are used to normalize primitive sizes, then BVH tree quality improves, but the coding method becomes more complex

Engineering Contradiction:
ImproveBVH tree qualityVSAvoidcoding method complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality by using different coding patterns for different ranges or types of primitives. Instead of a single uniform normalization approach, the system selects specific prefix and base patterns based on the local characteristics of the primitive being encoded. This allows the coding method to adapt to local variations in primitive size distributions, improving BVH quality while keeping the complexity manageable through pattern selection rather than complete recalculation.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12062214B2Systems and method for generating Morton code
Publication Date: 2024.08.13 ADVANCED MICRO DEVICES INC
  • US12062214B2 patent drawing
  • US12062214B2 patent drawing
  • US12062214B2 patent drawing

AI summary

Methods and systems are disclosed for encoding a Morton code. Techniques disclosed comprise receiving location vectors associated with primitives, where the primitives are graphical elements spatially located within a three-dimensional scene. Techniques further comprise determining a code pattern comprising a prefix pattern and a base pattern, and, then, coding each of the location vectors according to the code pattern.