# US 2025/0166281 A1 · Rendering Method and Apparatus, Device, and Storage Medium

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

- Number: US 2025/0166281 A1
- Document ID: US20250166281A1
- Status: Published application
- Kind: A1
- Application number: 18/840,681
- Filed: 2023-05-22
- Published: 2025-05-22
- Earliest claimed: 2022-08-04
- Assignees: Honor Device Co., Ltd.
- Applicants: Honor Device Co., Ltd.
- Inventors: Zhichao Liu
- Web page: https://patentgrep.com/patent/US20250166281A1

## CPC

- G06T 15/06: Ray-tracing
- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 15/04: Texture mapping
- G06T 15/50: Lighting effects
- G06T 2210/36: Level of detail
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Embodiments of this application relate to the field of electronic technologies. Provided are a rendering method and apparatus, a device, and a storage medium. In a graphics rendering process, for a to-be-rendered model included in to-be-rendered data, when the to-be-rendered model meets a first condition, ray tracing rendering is performed on the to-be-rendered model based on first ray emission density; or when the to-be-rendered model meets a second condition, ray tracing rendering is performed on the to-be-rendered model based on second ray emission density. When the first condition is different from the second condition, the first ray emission density is different from the second ray emission density. In the technical solution, when a condition met by the to-be-rendered model changes, ray emission density for performing ray tracing rendering can be adaptively adjusted, which reduces power consumption during rendering and improves rendering efficiency while ensuring a rendering effect.

## Claims

### Claim 1

A method, comprising:
obtaining to-be-rendered data that comprises a to-be-rendered model;
performing ray tracing rendering on the to-be-rendered model based on first ray emission density when the to-be-rendered model meets a first condition, wherein the first condition comprises a visible range proportion of the to-be-rendered model in a to-be-rendered picture being a first visible range proportion, and a distance between the to-be-rendered model and a photographing apparatus being a first distance; and
performing ray tracing rendering on the to-be-rendered model based on second ray emission density when the to-be-rendered model meets a second condition, wherein the second condition comprises the visible range proportion of the to-be-rendered model in the to-be-rendered picture being a second visible range proportion, and the distance between the to-be-rendered model and the photographing apparatus being a second distance,
wherein the first visible range proportion is different from the second visible range proportion, and/or the first distance is different from the second distance, and
wherein the to-be-rendered picture is drawn through the photographing apparatus based on the to-be-rendered data in a rendering process, and the photographing apparatus is a virtual camera in an electronic device.

### Claim 2 (depends on 1)

The method of claim 1, wherein when the first visible range proportion is the same as the second visible range proportion, the first ray emission density is less than the second ray emission density if the first distance is greater than the second distance.

### Claim 3 (depends on 1)

The method of claim 1, wherein when the first distance is the same as the second distance, the first ray emission density is greater than the second ray emission density if the first visible range proportion is greater than the second visible range proportion.

### Claim 4 (depends on 1)

The method of claim 1, wherein the ray emission density of the to-be-rendered model is based on a condition met by the to-be-rendered model according to the visible range proportion of the to-be-rendered model in the to-be-rendered picture and the distance between the to-be-rendered model and the photographing apparatus, wherein the ray emission density is the first ray emission density when the condition met by the to-be-rendered model is the first condition, and wherein the ray emission density is the second ray emission density when the condition met by the to-be-rendered model is the second condition.

### Claim 5 (depends on 4)

The method of claim 4, further comprising performing, based on a preset first weight coefficient and second weight coefficient, weighted summation on the visible range proportion of the to-be-rendered model in the to-be-rendered picture and the distance between the to-be-rendered model and the photographing apparatus, to obtain a ray emission density coefficient of the to-be-rendered model, wherein the ray emission density of the to-be-rendered model is based on the ray emission density coefficient of the to-be-rendered model and a preset first relationship that indicates a correspondence between the ray emission density coefficient and the ray emission density.

### Claim 6 (depends on 1)

The method of claim 1, wherein performing ray tracing rendering on the to-be-rendered model based on the ray emission density comprises:
performing ray tracing rendering on the to-be-rendered model based on the ray emission density to obtain a ray tracing rendering result image of the to-be-rendered model, wherein the ray tracing rendering result image carries a hole pixel; and
performing color filling on the hole pixel in the ray tracing rendering result image according to a template value of each pixel of the to-be-rendered model during drawcall and a scene semantic image of the to-be-rendered model, wherein the scene semantic image is for identifying a model to which a pixel belongs.

### Claim 7 (depends on 6)

The method of claim 6, wherein a target pixel on which ray tracing rendering is to be performed in the to-be-rendered model is based on the ray emission density and a preset shaded pixel arrangement, wherein the shaded pixel arrangement indicates position arrangement information of a pixel rendered by using ray tracing, and wherein performing ray tracing rendering on the to-be-rendered model based on the ray emission density to obtain the ray tracing rendering result image of the to-be-rendered model comprises:
performing ray tracing rendering on the target pixel to obtain color data of the target pixel; and
outputting the color data to a position at which the target pixel is located to obtain the ray tracing rendering result image of the to-be-rendered model.

### Claim 8 (depends on 6)

The method of claim 6, wherein performing color filling on the hole pixel in the ray tracing rendering result image according to the template value of each pixel of the to-be-rendered model during drawcall and the scene semantic image of the to-be-rendered model comprises performing, when a current pixel that is sampled is a hole pixel, color filling on the hole pixel by using color data of a reference pixel, wherein the reference pixel is based on the template value of each pixel of the to-be-rendered model during drawcall and the scene semantic image, wherein the reference pixel has a same template value as the hole pixel on the ray tracing rendering result image, and wherein the reference pixel is a pixel that is on the ray tracing rendering result image and already has color data.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
obtaining, according to the scene semantic image of the to-be-rendered model, texture coordinates of the hole pixel and texture coordinates of a first pixel that is on the ray tracing rendering result image and already has color data; and
querying a template buffering position based on the texture coordinates of the hole pixel and the texture coordinates of the first pixel, wherein the template buffering position is for storing the template value of each pixel of the to-be-rendered model during drawcall,
wherein when a template value of the hole pixel is consistent with a template value of the first pixel, the first pixel is the reference pixel of the hole pixel, and
wherein when the template value of the hole pixel is inconsistent with the template value of the first pixel, the method further comprises traversing other pixels that are on the ray tracing rendering result image and already have color data until the reference pixel having the same template value as the hole pixel is identified.

### Claim 10 (depends on 1)

The method of claim 1, wherein performing ray tracing rendering on the to-be-rendered model comprises performing ray tracing rendering on the to-be-rendered model by using a bound vulkan ray tracing acceleration structure.

### Claim 11

(canceled)

### Claim 12

An electronic device, comprising:
one or more processors; and
a memory coupled to the one or more processors and configured to store instructions that, when executed by the one or more processors, cause the electronic device to be configured to:
obtain to-be-rendered data that comprises a to-be-rendered model;
perform ray tracing rendering on the to-be-rendered model based on first ray emission density when the to-be-rendered model meets a first condition, wherein the first condition comprises a visible range proportion of the to-be-rendered model in a to-be-rendered picture being a first visible range proportion, and a distance between the to-be-rendered model and a photographing apparatus being a first distance; and
perform ray tracing rendering on the to-be-rendered model based on second ray emission density when the to-be-rendered model meets a second condition, wherein the second condition comprises the visible range proportion of the to-be-rendered model in the to-be-rendered picture being a second visible range proportion, and the distance between the to-be-rendered model and the photographing apparatus being a second distance,
wherein the first visible range proportion is different from the second visible range proportion, and/or the first distance is different from the second distance, and
wherein the to-be-rendered picture is drawn through the photographing apparatus based on the to-be-rendered data in a rendering process, and the photographing apparatus is a virtual camera in an electronic device.

### Claim at position 13

13-14. (canceled)

### Claim 15 (depends on 12)

The electronic device of claim 12, wherein when the first visible range proportion is the same as the second visible range proportion, the first ray emission density is less than the second ray emission density if the first distance is greater than the second distance.

### Claim 16 (depends on 12)

The electronic device of claim 12, wherein when the first distance is the same as the second distance, the first ray emission density is greater than the second ray emission density if the first visible range proportion is greater than the second visible range proportion.

### Claim 17 (depends on 12)

The electronic device of claim 12, wherein the ray emission density of the to-be-rendered model is based on a condition met by the to-be-rendered model according to the visible range proportion of the to-be-rendered model in the to-be-rendered picture and the distance between the to-be-rendered model and the photographing apparatus, wherein the ray emission density is the first ray emission density when the condition met by the to-be-rendered model is the first condition, and wherein the ray emission density is the second ray emission density when the condition met by the to-be-rendered model is the second condition.

### Claim 18 (depends on 17)

The electronic device of claim 17, wherein the instructions, when executed by the one or more processors, further cause the electronic device to be configured to perform, based on a preset first weight coefficient and second weight coefficient, weighted summation on the visible range proportion of the to-be-rendered model in the to-be-rendered picture and the distance between the to-be-rendered model and the photographing apparatus, to obtain a ray emission density coefficient of the to-be-rendered model, wherein the ray emission density of the to-be-rendered model is based on the ray emission density coefficient of the to-be-rendered model and a preset first relationship that indicates a correspondence between the ray emission density coefficient and the ray emission density.

### Claim 19 (depends on 12)

The electronic device of claim 12, wherein performing ray tracing rendering on the to-be-rendered model based on the ray emission density comprises:
performing ray tracing rendering on the to-be-rendered model based on the ray emission density to obtain a ray tracing rendering result image of the to-be-rendered model, wherein the ray tracing rendering result image carries a hole pixel; and
performing color filling on the hole pixel in the ray tracing rendering result image according to a template value of each pixel of the to-be-rendered model during drawcall and a scene semantic image of the to-be-rendered model, wherein the scene semantic image is for identifying a model to which a pixel belongs.

### Claim 20 (depends on 19)

The electronic device of claim 19, wherein a target pixel on which ray tracing rendering is to be performed in the to-be-rendered model is based on the ray emission density and a preset shaded pixel arrangement, wherein the shaded pixel arrangement indicates position arrangement information of a pixel rendered by using ray tracing, and wherein performing ray tracing rendering on the to-be-rendered model based on the ray emission density to obtain a ray tracing rendering result image of the to-be-rendered model comprises:
performing ray tracing rendering on the target pixel to obtain color data of the target pixel; and
outputting the color data to a position at which the target pixel is located to obtain the ray tracing rendering result image of the to-be-rendered model.

### Claim 21 (depends on 19)

The electronic device of claim 19, wherein performing color filling on the hole pixel in the ray tracing rendering result image according to the template value of each pixel of the to-be-rendered model during drawcall and the scene semantic image of the to-be-rendered model comprises performing, when a current pixel that is sampled is a hole pixel, color filling on the hole pixel by using color data of a reference pixel, wherein the reference pixel is based on the template value of each pixel of the to-be-rendered model during drawcall and the scene semantic image, wherein the reference pixel has a same template value as the hole pixel on the ray tracing rendering result image, and wherein the reference pixel is a pixel that is on the ray tracing rendering result image and already has color data.

### Claim 22 (depends on 12)

The electronic device of claim 12, wherein performing ray tracing rendering on the to-be-rendered model comprises performing ray tracing rendering on the to-be-rendered model by using a bound vulkan ray tracing acceleration structure.

### Claim 23

A non-transitory computer-readable medium storing instructions that, when executed by one or more processors of an electronic device, cause the electronic device to be configured to:
obtain to-be-rendered data that comprises a to-be-rendered model;
perform ray tracing rendering on the to-be-rendered model based on first ray emission density when the to-be-rendered model meets a first condition, wherein the first condition comprises a visible range proportion of the to-be-rendered model in a to-be-rendered picture being a first visible range proportion, and a distance between the to-be-rendered model and a photographing apparatus being a first distance; and
perform ray tracing rendering on the to-be-rendered model based on second ray emission density when the to-be-rendered model meets a second condition, wherein the second condition comprises the visible range proportion of the to-be-rendered model in the to-be-rendered picture being a second visible range proportion, and the distance between the to-be-rendered model and the photographing apparatus being a second distance,
wherein the first visible range proportion is different from the second visible range proportion, and/or the first distance is different from the second distance, and
wherein the to-be-rendered picture is drawn through the photographing apparatus based on the to-be-rendered data in a rendering process, and the photographing apparatus is a virtual camera in an electronic device.
