IP Library › Granted Patent US 12,561,882
Granted Patent B2
US 12,561,882 · App. 18/552,777 · Granted Feb 24, 2026

Image rendering method and apparatus

Inventors: Jinyuan Wu (Beijing, CN); Yi Guo (Beijing, CN)
Assignee: Beijing Zitiao Network Technology Co., Ltd.
G06T15/00G06T7/50G06V10/761
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,561,882
App. No.
18/552,777
Granted
Feb 24, 2026
Kind
B2
Abstract

This disclosure discloses an image rendering method and apparatus. The image rendering method includes: obtaining a first depth and a second depth corresponding to each pixel point in an image to be rendered, wherein the first depth is a depth of a real scene corresponding to the pixel point in a NDC system, and the second depth is a depth of a virtual scene corresponding to the pixel point in the NDC system; obtaining a depth difference between a depth of a real scene corresponding to the pixel point and a depth of a virtual scene corresponding to the pixel point in a camera coordinate system based on the first depth and the second depth; determining an opacity corresponding to the each pixel point according to the depth difference; and rendering a layer corresponding to the virtual scene to generate the image to be rendered based on the opacity.

Claims (85)

1 . An image rendering method, comprising:

obtaining a first depth and a second depth corresponding to each pixel point of pixel points in an image to be rendered, wherein the first depth corresponding to the pixel point is a depth of a real scene corresponding to the pixel point in a Normalized Device Coordinate system, and the second depth corresponding to the pixel point is a depth of a virtual scene corresponding to the pixel point in the Normalized Device Coordinate system;

obtaining a depth difference corresponding to the each pixel point based on the first depth and the second depth corresponding to the each pixel point, wherein the depth difference corresponding to the pixel point is a difference between a depth of a real scene corresponding to the pixel point and a depth of a virtual scene corresponding to the pixel point in a camera coordinate system;

determining an opacity corresponding to the each pixel point according to the depth difference corresponding to the each pixel point, wherein the depth difference corresponding to the each pixel point is positively correlated with the opacity corresponding to the each pixel point; and

rendering a layer corresponding to the virtual scene over a layer corresponding to the real scene to generate the image to be rendered based on the opacity corresponding to the each pixel point,

wherein the obtaining the depth difference corresponding to the each pixel point based on the first depth and the second depth corresponding to the each pixel point comprises:

converting the first depth corresponding to the each pixel point to a third depth corresponding to the each pixel point, wherein the third depth corresponding to the pixel point is the depth of the real scene corresponding to the pixel point in the camera coordinate system;

converting the second depth corresponding to the each pixel point to a fourth depth corresponding to the each pixel point, wherein the fourth depth corresponding to the pixel point is the depth of the virtual scene corresponding to the pixel point in the camera coordinate system; and

obtaining the depth difference corresponding to the each pixel point by subtracting the third depth from the fourth depth corresponding to the each pixel point.

2 . The image rendering method according to claim 1 , wherein the converting the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point comprises:

converting the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point based on a distance from a virtual camera to a far plane of a view frustum and a distance from the virtual camera to a near plane of the view frustum, wherein the first depth corresponding to the each pixel point is inversely proportional to the third depth corresponding to the each pixel point.

3 . The image rendering method according to claim 2 , wherein the converting the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point based on the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum comprises:

obtaining a first calculation value corresponding to the each pixel point, which is twice a product of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a second calculation value corresponding to the each pixel point, which is a difference between the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a third calculation value corresponding to the each pixel point, which is a product of the second calculation value and the first depth corresponding to the pixel point;

obtaining a fourth calculation value corresponding to the each pixel point, which is a sum of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a fifth calculation value corresponding to the each pixel point, which is a difference between the third calculation value and the fourth calculation value; and

obtaining a ratio of the first calculation value to the fifth calculation value corresponding to the each pixel point as the third depth corresponding to the each pixel point.

4 . The image rendering method according to claim 1 , wherein the converting the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point comprises:

converting the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point based on a distance from a virtual camera to a far plane of a view frustum and a distance from the virtual camera to a near plane of the view frustum, wherein the first depth corresponding to the each pixel point is negatively correlated with the third depth corresponding to the each pixel point.

5 . The image rendering method according to claim 4 , wherein the converting the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point based on the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum comprises:

obtaining a first calculation value corresponding to the each pixel point, which is twice a product of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a second calculation value corresponding to the each pixel point, which is a difference between the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a third calculation value corresponding to the each pixel point, which is a product of the second calculation value and the first depth corresponding to the pixel point;

obtaining a fourth calculation value corresponding to the each pixel point, which is a sum of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a fifth calculation value corresponding to the each pixel point, which is a difference between the third calculation value and the fourth calculation value; and

obtaining a ratio of the first calculation value to the fifth calculation value corresponding to the each pixel point as the third depth corresponding to the each pixel point.

6 . The image rendering method according to claim 1 , wherein the converting the second depth corresponding to the each pixel point to the fourth depth corresponding to the each pixel point comprises:

converting the second depth corresponding to the each pixel point to the fourth depth corresponding to the each pixel point based on a distance from a virtual camera to a far plane of a view frustum and a distance from the virtual camera to a near plane of the view frustum, wherein the second depth corresponding to the each pixel point is inversely proportional to the fourth depth corresponding to the each pixel point.

7 . The image rendering method according to claim 6 , wherein the converting the second depth corresponding to the each pixel point to the fourth depth corresponding to the each pixel point based on the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum comprises:

obtaining a sixth calculation value corresponding to the each pixel point, which is twice a product of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a seventh calculation value corresponding to the each pixel point, which is a difference between the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining an eighth calculation value corresponding to the each pixel point, which is a product of the seventh calculation value and the second depth corresponding to the each pixel point;

obtaining a ninth calculation value corresponding to the each pixel point, which is a sum of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a tenth calculation value corresponding to the each pixel point, which is a difference between the eighth calculation value and the ninth calculation value; and

obtaining a ratio of the sixth calculation value to the tenth calculation value corresponding to the each pixel point as the fourth depth corresponding to the each pixel point.

8 . The image rendering method according to claim 1 , wherein the converting the second depth corresponding to the each pixel point to the fourth depth corresponding to the each pixel point comprises:

converting the second depth corresponding to the each pixel point to the fourth depth corresponding to the each pixel point based on a distance from a virtual camera to a far plane of a view frustum and a distance from the virtual camera to a near plane of the view frustum, wherein the second depth corresponding to the each pixel point is negatively correlated with the fourth depth corresponding to the each pixel point.

9 . The image rendering method according to claim 8 , wherein the converting the second depth corresponding to the each pixel point to the fourth depth corresponding to the each pixel point based on the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum comprises:

obtaining a sixth calculation value corresponding to the each pixel point, which is twice a product of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a seventh calculation value corresponding to the each pixel point, which is a difference between the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining an eighth calculation value corresponding to the each pixel point, which is a product of the seventh calculation value and the second depth corresponding to the each pixel point;

obtaining a ninth calculation value corresponding to the each pixel point, which is a sum of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtaining a tenth calculation value corresponding to the each pixel point, which is a difference between the eighth calculation value and the ninth calculation value; and

obtaining a ratio of the sixth calculation value to the tenth calculation value corresponding to the each pixel point as the fourth depth corresponding to the each pixel point.

10 . The image rendering method according to claim 1 , wherein the determining the opacity corresponding to the each pixel point according to the depth difference corresponding to the each pixel point comprises:

determining that an opacity corresponding to a first pixel point is 0 in a case where a depth difference corresponding to the first pixel point is less than or equal to 0.

11 . The image rendering method according to claim 1 , wherein the determining the opacity corresponding to the each pixel point according to the depth difference corresponding to the each pixel point comprises:

determining that an opacity corresponding to a second pixel point is a ratio of a depth difference corresponding to the second pixel point to a preset threshold in a case where a depth difference corresponding to the second pixel point is greater than 0 and less than the preset threshold.

12 . The image rendering method according to claim 1 , wherein the determining the opacity corresponding to the each pixel point according to the depth difference corresponding to the each pixel point comprises:

determining that an opacity corresponding to a third pixel point is 100% in a case where a depth difference corresponding to the third pixel point is greater than or equal to a preset threshold.

13 . The image rendering method according to claim 1 , further comprising:

collecting images of a preset scene to obtain image data corresponding to the preset scene before the obtaining the first depth and the second depth corresponding to the each pixel point of the pixel points in the image to be rendered; and

performing three dimensional reconstruction of the preset scene according to the image data to obtain the real scene.

14 . An electronic device, comprising:

a memory for storing a computer program; and

a processor that, when executing the computer program, causes the electronic device to implement an image rendering method comprising:

obtaining a first depth and a second depth corresponding to each pixel point of pixel points in an image to be rendered, wherein the first depth corresponding to the pixel point is a depth of a real scene corresponding to the pixel point in a Normalized Device Coordinate system, and the second depth corresponding to the pixel point is a depth of a virtual scene corresponding to the pixel point in the Normalized Device Coordinate system;

obtaining a depth difference corresponding to the each pixel point based on the first depth and the second depth corresponding to the each pixel point, wherein the depth difference corresponding to the pixel point is a difference between a depth of a real scene corresponding to the pixel point and a depth of a virtual scene corresponding to the pixel point in a camera coordinate system;

determining an opacity corresponding to the each pixel point according to the depth difference corresponding to the each pixel point, wherein the depth difference corresponding to the each pixel point is positively correlated with the opacity corresponding to the each pixel point; and

rendering a layer corresponding to the virtual scene over a layer corresponding to the real scene to generate the image to be rendered based on the opacity corresponding to the each pixel point,

the obtaining the depth difference corresponding to the each pixel point based on the first depth and the second depth corresponding to the each pixel point comprises

converting the first depth corresponding to the each pixel point to a third depth corresponding to the each pixel point, wherein the third depth corresponding to the pixel point is the depth of the real scene corresponding to the pixel point in the camera coordinate system;

converting the second depth corresponding to the each pixel point to a fourth depth corresponding to the each pixel point, wherein the fourth depth corresponding to the pixel point is the depth of the virtual scene corresponding to the pixel point in the camera coordinate system; and

obtaining the depth difference corresponding to the each pixel point by subtracting the third depth from the fourth depth corresponding to the each pixel point.

15 . The electronic device according to claim 14 , wherein the processor is configured to:

convert the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point based on a distance from a virtual camera to a far plane of a view frustum and a distance from the virtual camera to a near plane of the view frustum, wherein the first depth corresponding to the each pixel point is inversely proportional to the third depth corresponding to the each pixel point.

16 . The electronic device according to claim 15 , wherein the processor is configured to:

obtain a first calculation value corresponding to the each pixel point, which is twice a product of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtain a second calculation value corresponding to the each pixel point, which is a difference between the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtain a third calculation value corresponding to the each pixel point, which is a product of the second calculation value and the first depth corresponding to the pixel point;

obtain a fourth calculation value corresponding to the each pixel point, which is a sum of the distance from the virtual camera to the far plane of the view frustum and the distance from the virtual camera to the near plane of the view frustum;

obtain a fifth calculation value corresponding to the each pixel point, which is a difference between the third calculation value and the fourth calculation value; and

obtain a ratio of the first calculation value to the fifth calculation value corresponding to the each pixel point as the third depth corresponding to the each pixel point.

17 . The electronic device according to claim 14 , wherein the processor is configured to:

convert the first depth corresponding to the each pixel point to the third depth corresponding to the each pixel point based on a distance from a virtual camera to a far plane of a view frustum and a distance from the virtual camera to a near plane of the view frustum, wherein the first depth corresponding to the each pixel point is negatively correlated with the third depth corresponding to the each pixel point.

18 . A non-transitory computer-readable storage medium stored thereon a computer program that, when executed by a computing device, causes the computing device to implement an image rendering method comprising:

obtaining a first depth and a second depth corresponding to each pixel point of pixel points in an image to be rendered, wherein the first depth corresponding to the pixel point is a depth of a real scene corresponding to the pixel point in a Normalized Device Coordinate system, and the second depth corresponding to the pixel point is a depth of a virtual scene corresponding to the pixel point in the Normalized Device Coordinate system;

obtaining a depth difference corresponding to the each pixel point based on the first depth and the second depth corresponding to the each pixel point, wherein the depth difference corresponding to the pixel point is a difference between a depth of a real scene corresponding to the pixel point and a depth of a virtual scene corresponding to the pixel point in a camera coordinate system;

determining an opacity corresponding to the each pixel point according to the depth difference corresponding to the each pixel point, wherein the depth difference corresponding to the each pixel point is positively correlated with the opacity corresponding to the each pixel point; and

rendering a layer corresponding to the virtual scene over a layer corresponding to the real scene to generate the image to be rendered based on the opacity corresponding to the each pixel point;

the obtaining the depth difference corresponding to the each pixel point based on the first depth and the second depth corresponding to the each pixel point comprises:

converting the first depth corresponding to the each pixel point to a third depth corresponding to the each pixel point, wherein the third depth corresponding to the pixel point is the depth of the real scene corresponding to the pixel point in the camera coordinate system;

converting the second depth corresponding to the each pixel point to a fourth depth corresponding to the each pixel point, wherein the fourth depth corresponding to the pixel point is the depth of the virtual scene corresponding to the pixel point in the camera coordinate system; and

obtaining the depth difference corresponding to the each pixel point by subtracting the third depth from the fourth depth corresponding to the each pixel point.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2026
From: WU, JINYUAN
To: SHANGHAI SUIXUNTONG ELECTRONIC TECHNOLOGY CO., LTD .
Reel/Frame 073576/0014 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2026
From: GUO, YI
To: HANGZHOU OCEAN ENGINE NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 073576/0106 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2026
From: HANGZHOU OCEAN ENGINE NETWORK TECHNOLOGY CO., LTD.; SHANGHAI SUIXUNTONG ELECTRONIC TECHNOLOGY CO., LTD.
To: BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 073576/0194 →
Priority Claims (1)
CN 202110602652.2 · May 31, 2021 · national
Continuity (1)
Related Publication 20240185500A1 · Jun 6, 2024
References Cited (36)
US 6744430B1 · Shimizu · 2004 [cited by applicant]
US 7692647B2 · Lin et al. · 2010 [cited by applicant]
US 10926176B1 · Snyder et al. · 2021 [cited by applicant]
US 20030179203A1 · Bruderlin et al. · 2003 [cited by applicant]
US 20080184124A1 · Agarwal · 2008 [cited by examiner]
US 20090083015A1 · McDaniel · 2009 [cited by applicant]
US 20090111579A1 · Komatsumoto · 2009 [cited by applicant]
US 20180182066A1 · Saleh et al. · 2018 [cited by applicant]
US 20180249144A1 · Feng · 2018 [cited by examiner]
US 20200279438A1 · Ohashi · 2020 [cited by examiner]
US 20210142497A1 · Pugh et al. · 2021 [cited by applicant]
US 20210385321A1 · Tran et al. · 2021 [cited by applicant]
US 20230061935A1 · Benedicto · 2023 [cited by examiner]
CN 104778737A · 2015 [cited by applicant]
CN 106354251A · 2017 [cited by applicant]
CN 107315915A · 2017 [cited by applicant]
CN 107886574A · 2018 [cited by applicant]
CN 108398787A · 2018 [cited by applicant]
CN 109191556A · 2019 [cited by applicant]
CN 110717269A · 2020 [cited by applicant]
CN 111127609A · 2020 [cited by applicant]
CN 111540035A · 2020 [cited by applicant]
CN 111667393A · 2020 [cited by applicant]
CN 111670464A · 2020 [cited by applicant]
CN 112233214A · 2021 [cited by applicant]
CN 112258658A · 2021 [cited by applicant]
CN 112652044A · 2021 [cited by applicant]
International Search Report and Written Opinion for International Application No. PCT/CN2022/086353, mailed Jun. 29, 2022, 12 pages. [cited by applicant]
International Search Report and Written Opinion for International Application No. PCT/CN2022/086528, mailed Jun. 22, 2022, 16 pages. [cited by applicant]
International Search Report and Written Opinion for International Application No. PCT/CN2022/086561, mailed Jun. 30, 2022, 14 pages. [cited by applicant]
Shader, Jun. 10, 2022, pp. 1-6 (9 Pages), Retrieved from URL: https://zhuanlan.zhihu.com/p/9594344408.12J=I2019. [cited by applicant]
Shadertoy: “Starry Sky,” Views: 1878, Tags: Star, Sky, Dec. 7, 2019, 2 Pages, [Retrieved on Dec. 20, 2023] Retrieved from URL: https://www.shadertoy.com/view/tdKSWy. [cited by applicant]
Office action received from Chinese patent application No. 202110602652.2 mailed on Jul. 23, 2025, 18 pages (9 pages English Translation and 9 pages Original Copy). [cited by applicant]
Non-Final Office Action mailed on Jun. 26, 2025, for U.S. Appl. No. 18/551,738, pp. 42. [cited by applicant]
Tan et al., “Particle System Based Snow Simulating in Real Time”, SciVerse ScienceDirect, vol. 10, No. 1, 2011, pp. 1244-1249. [cited by applicant]
Notice of Allowance mailed on Oct. 29, 2025, for U.S. Appl. No. 18/551,738, pp. 16. [cited by applicant]