CN102737404A - Method for achieving rendering of transparent three-dimensional object - Google Patents

Method for achieving rendering of transparent three-dimensional object Download PDF

Info

Publication number
CN102737404A
CN102737404A CN2011101163619A CN201110116361A CN102737404A CN 102737404 A CN102737404 A CN 102737404A CN 2011101163619 A CN2011101163619 A CN 2011101163619A CN 201110116361 A CN201110116361 A CN 201110116361A CN 102737404 A CN102737404 A CN 102737404A
Authority
CN
China
Prior art keywords
color
value
depth
pixel
buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101163619A
Other languages
Chinese (zh)
Other versions
CN102737404B (en
Inventor
蔡欢
张君琦
郑培枫
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN201110116361.9A priority Critical patent/CN102737404B/en
Publication of CN102737404A publication Critical patent/CN102737404A/en
Application granted granted Critical
Publication of CN102737404B publication Critical patent/CN102737404B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for achieving rendering of a transparent three-dimensional object. The method comprises the steps of: judging whether triangular plates are dead against or back to an observer according to three vertex values and normal vectors of the triangular plates and by observing a matrix; calculating light color and depth values of vertexes back to the observer; performing rasterization on each triangular plate back to the observer, and storing back color values of the triangular plates; calculating light color and depth values of vertexes dead against the observer; performing the rasterization on each triangular plate dead against the observer, and storing front color values of the triangular plates; and mixing the stored back color values and front color values of the triangular plates to complete the rendering of the transparent three-dimensional object. According to the technical method, the three-dimensional object can be displayed well in a transparent mode, and the blank of the rendering of the transparent three-dimensional object is filled.

Description

A kind of method that realizes that the transparent three-dimensional object is played up
Technical field
The present invention relates to the television program designing field in broadcasting and TV field, relate in particular to a kind of method that realizes that the transparent three-dimensional object is played up.
Background technology
Along with the more and more faster development of video technique, people are also increasingly high for the requirement of video displaying contents, hope that especially the stereo display effect of video pictures is become better and better.
In the prior art the main employing of playing up of three-dimensional picture removed the method for hidden surface.From observation point, from the near slightly surperficial shield of observer the part of back.Usual way is; There is a depth buffer to write down the depth value of the pixel of having played up; When playing up current pixel, whether the depth value of judging this pixel in this way representes this pixel the pixel played up before greater than depth value (in the left-handed coordinate system) corresponding in the buffer zone; Can this pixel color be write corresponding color buffer district, and the analog value in the replacement depth buffer.For a three-dimensional body, the back side of object shows that never the observer can only see that part of object towards him.If but during this object transparent substance the time, we observer is the back side that object can be seen in the front of hoping to see through object.This time just can not be simple pass through the rejecting that depth value is done pixel.
The inventor finds the three-dimensional body that can not show transparency in the prior art in the process of embodiment of the present invention.
Summary of the invention
In order to solve the shortcoming of above-mentioned prior art, fundamental purpose of the present invention provides a kind of method that realizes that the transparent three-dimensional object is played up, to solve the problem that the prior art three-dimensional body can not transparent demonstration.
In order to achieve the above object, the invention provides a kind of method that realizes that the transparent three-dimensional object is played up, specifically comprise:
Judge that according to three summit values of triangular plate, normal vector and observation matrix triangular plate is viewed straight-on person or back to the observer;
Calculating is back to the illumination color and the depth value on observer's summit;
Each triangular plate to back to the observer carries out rasterisation, and storage triangular plate back side color value;
Calculate the illumination color and the depth value on viewed straight-on person's summit;
Each triangular plate to facing the observer carries out rasterisation, and storage triangular plate front color value;
The back side color value of triangular plate to storage mixes with the front color value, the playing up of completion transparent three-dimensional object.
Of the present invention a kind of realize method that the transparent three-dimensional object plays up through at first calculate face with back to the illumination color of each triangular plate of observer and be stored in corresponding front and back side color buffer district in; And the mode that the front color value that will store mixes with back side color value can realize playing up of transparent three-dimensional object; And adopt the application's technical method can reduce taking of a large amount of system resources; And can fill up the blank that the transparent three-dimensional object is played up well with the transparent demonstration of three-dimensional body.
Description of drawings
Technical scheme for the clearer explanation embodiment of the invention; The accompanying drawing of required use is done simple the introduction in will describing embodiment below; Conspicuous, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is a kind of rendering intent of realizing the transparent three-dimensional object of the present invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, complete description; Obvious described embodiment only is a part of embodiment of the present invention, is not whole embodiment, based on the embodiment among the present invention; Those of ordinary skills are not paying the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention provides a kind of method that realizes that the transparent three-dimensional object is played up on the one hand, and is as shown in Figure 1, is specially:
Before carrying out following calculating, need to prepare earlier two color buffer district front color buffer district bufferFront, back side color buffer district bufferBack and initialization.These two color buffer districts are used for storing the rendering result of front and back color respectively.Prepare the positive depth buffer depthBufferF of two depth buffer, back side depth buffer depthBufferB is used for when front and back is played up respectively, carrying out the degree of depth and judges.
Step S1:, calculate to judge that this triangular plate is viewed straight-on person or back to the observer according to three summit values, normal vector and observation matrixs of triangular plate.
Step S2: the triangular plate that the result who judges according to step S1 will constitute object is divided into two types.
Step S3: calculate back to the illumination color and the depth value on observer's summit.Because illumination sees through positive impinging upon back to the back side of observer's triangular plate, so need normal vector is reverse in the time of the illumination color of calculating back to observer's summit.
Step S4: each triangular plate to back to the observer carries out the rendering result that rasterisation obtains the back side; According to each color of pixel value and depth value in the information interpolation calculation triangular plate of step S1; The depth value of this pixel and the value among the depth buffer depthBufferB are done comparison; If greater than the value among the depthBufferB, then with the analog value among this depth value replacement depthBufferB.This color of pixel value is mixed with the respective color value among the color buffer district bufferBack, and with this color of pixel value as foreground and the look as a setting of the color in the buffer zone be stored among the color buffer district bufferBack.If the depth value of pixel is less than the value among the depthBufferB; This color of pixel value is mixed with the respective color value among the color buffer district bufferBack; Look and color in the buffer zone are stored among the color buffer district bufferBack as foreground as a setting with this color of pixel value.
Step S5: the illumination color and the depth value that calculate viewed straight-on person's summit.
Step S6: each triangular plate that faces the observer is carried out rasterisation obtain positive rendering result; According to each color of pixel value and depth value in the S1 information interpolation calculation triangular plate; The depth value of this pixel and the value among the depth buffer depthBufferF are done comparison; If greater than the value among the depthBufferF, then with the analog value among this depth value replacement depthBufferF.This color of pixel value is mixed with the respective color value among the color buffer district bufferFront, simultaneously with this color of pixel value as foreground and the look as a setting of the color in the buffer zone be stored among the color buffer district bufferFront.If the depth value of pixel is less than the value among the depthBufferF; This color of pixel value is mixed with the respective color value among the color buffer district bufferFront; Look and color in the buffer zone are stored among the color buffer district bufferFront as foreground as a setting with this color of pixel value simultaneously.
Step S7: the back side color value to being stored in the triangular plate among bufferBack and the bufferFront mixes with the front color value, obtains the rendering effect of transparent three-dimensional object.
Of the present inventionly a kind ofly realize that method that the transparent three-dimensional object plays up is through at first calculating the illumination color that faces with back to each triangular plate of observer; And the mode that the front color value that will store mixes with back side color value can realize playing up of transparent three-dimensional object; And employing the application's technical method can; And can well three-dimensional body be shown fully, filled up the blank that the transparent three-dimensional object is played up.
Through the description of above embodiment, those skilled in the art can be well understood to the present invention and can realize through software, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding; Technical scheme of the present invention can be come out with the embodied of software product, this software product can be stored in a non-volatile memory medium (can be CD-ROM, USB flash disk; Portable hard drive etc.) in; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; Be merely a best specific embodiment of the present invention, but characteristic of the present invention is not limited thereto, any people who is familiar with this technology is in field of the present invention; The variation that can expect easily or modification all should be encompassed in the following claim of the present invention.

Claims (7)

1. a method that realizes that the transparent three-dimensional object is played up is characterized in that, comprising:
Judge that according to three summit values of triangular plate, normal vector and observation matrix triangular plate is viewed straight-on person or back to the observer;
Calculating is back to the illumination color and the depth value on observer's summit;
Each triangular plate to back to the observer carries out rasterisation, and storage triangular plate back side color value;
Calculate the illumination color and the depth value on viewed straight-on person's summit;
Each triangular plate to facing the observer carries out rasterisation, and storage triangular plate front color value;
The back side color value of triangular plate to storage mixes with the front color value, the playing up of completion transparent three-dimensional object.
2. the method that realization transparent three-dimensional object as claimed in claim 1 is played up is characterized in that, before calculating, need prepare two color buffer districts in advance, front color buffer district bufferFront and back side color buffer district bufferBack and initialization; Prepare two depth buffer, positive depth buffer depthBufferF and back side depth buffer depthBufferB.
3. the method that realization transparent three-dimensional object as claimed in claim 1 is played up is characterized in that, said bufferFront and bufferBack are respectively applied for the rendering result of positive color of storage and back side color.
4. the method that realization transparent three-dimensional object as claimed in claim 1 is played up is characterized in that, said depthBufferF and epthBufferB are respectively applied for and when playing up the front and back three-dimensional body, carry out degree of depth judgement.
5. the method that realization transparent three-dimensional object as claimed in claim 1 is played up is characterized in that, said calculating is reverse with normal vector back to the illumination color on observer's summit the time.
6. the method that realization transparent three-dimensional object as claimed in claim 1 is played up is characterized in that, saidly each triangular plate back to the observer is carried out rasterisation is specially:
Calculate in the triangular plate each color of pixel value and depth value and the depth value of said pixel and the value among the depth buffer depthBufferB are done comparison;
If the depth value of said pixel is greater than the value among the depthBufferB; Then mix with the respective color value among the color buffer district bufferBack with the analog value among the depth value replacement depthBufferB of said pixel and with this color of pixel value; Simultaneously with this color of pixel value as foreground and the look as a setting of the color in the buffer zone be stored among the color buffer district bufferBack;
If the depth value of said pixel is less than the value among the depthBufferB; This color of pixel value is mixed with the respective color value among the color buffer district bufferBack; Look and color in the buffer zone are stored among the color buffer district bufferBack as foreground as a setting with this color of pixel value.
7. the method that realization transparent three-dimensional object as claimed in claim 1 is played up is characterized in that, saidly each triangular plate that faces the observer is carried out rasterisation is specially:
Calculate each color of pixel value and depth value in the triangular plate; The depth value of said pixel and the value among the depth buffer depthBufferF are done comparison; If greater than the value among the depthBufferF; Then mix with the respective color value among the color buffer district bufferFront with the analog value among the depth value replacement depthBufferF of said pixel and with said color of pixel value; Simultaneously with said color of pixel value as foreground and the look as a setting of the color in the buffer zone be stored among the color buffer district bufferFront;
If the depth value of said pixel is less than the value among the depthBufferF; Said color of pixel value is mixed with the respective color value among the color buffer district bufferFront; Look and color in the buffer zone are stored among the color buffer district bufferFront as foreground as a setting with this color of pixel value simultaneously.
CN201110116361.9A 2011-05-06 2011-05-06 A kind of realize the method that transparent three-dimensional object renders Expired - Fee Related CN102737404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110116361.9A CN102737404B (en) 2011-05-06 2011-05-06 A kind of realize the method that transparent three-dimensional object renders

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110116361.9A CN102737404B (en) 2011-05-06 2011-05-06 A kind of realize the method that transparent three-dimensional object renders

Publications (2)

Publication Number Publication Date
CN102737404A true CN102737404A (en) 2012-10-17
CN102737404B CN102737404B (en) 2017-03-01

Family

ID=46992825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110116361.9A Expired - Fee Related CN102737404B (en) 2011-05-06 2011-05-06 A kind of realize the method that transparent three-dimensional object renders

Country Status (1)

Country Link
CN (1) CN102737404B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574495A (en) * 2014-12-22 2015-04-29 北京像素软件科技股份有限公司 Method and device for rendering image
CN105825469A (en) * 2015-01-27 2016-08-03 想象技术有限公司 Processing primitives which have unresolved fragments in a graphics processing system
WO2023005757A1 (en) * 2021-07-30 2023-02-02 北京字跳网络技术有限公司 Transparent polyhedron rendering method and apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145246A (en) * 2006-09-14 2008-03-19 腾讯科技(深圳)有限公司 Method and system for producing volume shade
US20090184960A1 (en) * 2008-01-23 2009-07-23 Carr Nathan A System and Methods for Rendering Transparent Surfaces in High Depth Complexity Scenes Using Hybrid and Coherent Layer Peeling

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145246A (en) * 2006-09-14 2008-03-19 腾讯科技(深圳)有限公司 Method and system for producing volume shade
US20090184960A1 (en) * 2008-01-23 2009-07-23 Carr Nathan A System and Methods for Rendering Transparent Surfaces in High Depth Complexity Scenes Using Hybrid and Coherent Layer Peeling

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
阙恒: "嵌入式图形处理器设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 15 January 2008 (2008-01-15) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574495A (en) * 2014-12-22 2015-04-29 北京像素软件科技股份有限公司 Method and device for rendering image
CN104574495B (en) * 2014-12-22 2017-08-08 北京像素软件科技股份有限公司 A kind of image rendering method and device
CN105825469A (en) * 2015-01-27 2016-08-03 想象技术有限公司 Processing primitives which have unresolved fragments in a graphics processing system
US11176733B2 (en) 2015-01-27 2021-11-16 Imagination Technologies Limited Processing primitives which have unresolved fragments in a graphics processing system
US11928776B2 (en) 2015-01-27 2024-03-12 Imagination Technologies Limited Processing primitives which have unresolved fragments in a graphics processing system
WO2023005757A1 (en) * 2021-07-30 2023-02-02 北京字跳网络技术有限公司 Transparent polyhedron rendering method and apparatus

Also Published As

Publication number Publication date
CN102737404B (en) 2017-03-01

Similar Documents

Publication Publication Date Title
US10902663B2 (en) Method and apparatus for displaying 2D application interface in virtual reality device
ES2348853T3 (en) PROCEDURE AND SYSTEM THAT ALLOW A USER TO MIX IN REAL TIME SYNTHESIS IMAGES WITH VIDEO IMAGES.
CN102722861A (en) CPU-based graphic rendering engine and realization method
CN100403339C (en) Rasterization of three-dimension images
US20230039100A1 (en) Multi-layer reprojection techniques for augmented reality
US20050195276A1 (en) Hardware based interdigitation
US20090195643A1 (en) Medial axis decomposition of 2d objects to synthesize binocular depth
CN105209960A (en) System, method, and computer program product to produce images for a near-eye light field display
US20120236002A1 (en) 3d to stereoscopic 3d conversion
EP2329314A1 (en) Improvements in multi-layered displays
CN105704479A (en) Interpupillary distance measuring method and system for 3D display system and display device
CN102609971A (en) Quick rendering system using embedded GPU (Graphics Processing Unit) for realizing 3D-GIS (Three Dimensional-Geographic Information System)
CN112740278B (en) Method and apparatus for graphics processing
US20210312701A1 (en) Methods and apparatus for handling occlusions in split rendering
US20070057939A1 (en) 2D/3D combined rendering
CN102737404A (en) Method for achieving rendering of transparent three-dimensional object
US20140300713A1 (en) Stereoscopic three dimensional projection and display
CN105467603A (en) Three-dimensional display device
CN102739984A (en) Method and system for realizing high-definition virtual scenery
JP5016648B2 (en) Image processing method for 3D display device having multilayer structure
US20220383465A1 (en) Systems and methods of multiview style transfer
CN202948244U (en) 270-degree holographic phantom imaging structure
JP2009064355A (en) Program, information storage medium, and image producing system
US12039660B1 (en) Rendering three-dimensional content based on a viewport
CN102739998B (en) A kind of implementation method of space transformation in three-dimensional space

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170301

Termination date: 20200506