3D interface color difference solution method, system, device and medium

By creating a temporary buffer to record the color and occlusion information of UI objects, the problem of color distortion in 3D interfaces was solved, achieving high-fidelity UI rendering and improving image quality and realism.

CN116957967BActive Publication Date: 2026-06-23SHANGHAI GRAPHIC DIGITAL INFORMATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI GRAPHIC DIGITAL INFORMATION CO LTD
Filing Date
2023-07-19
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

During the rendering of virtual scenes, color differences occur in 3D interfaces when converting from HDR to LDR, and existing technologies cannot effectively and faithfully reproduce the design effect.

Method used

Create temporary color buffers and temporary stencil buffers to record the color and occlusion information of UI objects. Use these buffers to update the pixels of UI objects after tone mapping to maintain their original colors.

Benefits of technology

It effectively solves the problem of color distortion in 3D interfaces, achieves high-fidelity UI rendering, and improves image quality and realism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116957967B_ABST
    Figure CN116957967B_ABST
Patent Text Reader

Abstract

The application provides a 3D interface color difference solution method, system, device and medium, wherein the method comprises creating a temporary color buffer and a temporary template buffer, the size of the temporary color buffer and the temporary template buffer is the same as the pixel size of the rendering screen; writing the pixel point color information of the UI object into the temporary color buffer; writing the pixel point occlusion information of the UI object into the temporary template buffer; after tone mapping the 3D picture, updating the pixel points of the UI object according to the temporary color buffer and the temporary template buffer. The application is used to solve the technical problem of poor 3D interface rendering effect in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D image processing, and in particular to a solution, system, device and medium for 3D interface color difference. Background Technology

[0002] With the development of modern shooting equipment, rendering methods, and display devices, HDR (High-Dynamic Range) technology has gradually become standard. HDR can display a wider range of brightness and contrast, making the picture more realistic and three-dimensional. However, if HDR images generated during virtual scene rendering need to be displayed on low dynamic range (LDR) devices (such as ordinary monitors and VR glasses), a calculation process called tone mapping is required to convert the HDR image to an LDR image. However, since 3D interfaces are usually elements placed in the virtual world, they also need to undergo tone mapping calculations. However, since the design of user interface (UI) images is based on the LDR color range, further tone mapping processing will cause color differences (darker or brighter), thus severely degrading the image quality.

[0003] In existing technologies, 3D interfaces are typically processed by pre-increasing the contrast of UI object pixels and pre-calculating tone mapping for UI object pixels. Pre-increasing the contrast of UI images significantly improves image clarity after tone mapping, but this only makes the UI image clearer and closer to the original design; it cannot completely reproduce the design with high fidelity. Pre-calculating tone mapping for UI object pixels and then performing forward tone mapping together with other objects cancels out the two operations. However, this method relies on the previous frame's overall brightness value as a reference when pre-calculating tone mapping because the overall brightness of the image is unknown beforehand. Since the overall brightness of the previous frame differs from that of the current frame, and this difference accumulates, it also cannot completely reproduce the design with high fidelity. Summary of the Invention

[0004] One objective of this application is to provide a solution, system, device, and medium for 3D interface color difference, at least to address the technical problem of poor 3D interface rendering effects in related technologies.

[0005] To achieve the above objectives, some embodiments of this application provide a solution for color difference in 3D interfaces. The method includes: creating a temporary color buffer and a temporary template buffer, wherein the size of the temporary color buffer and the temporary template buffer is the same as the pixel size of the rendering screen; writing the pixel color information of the UI object into the temporary color buffer; writing the pixel occlusion information of the UI object into the temporary template buffer; and after performing tone mapping on the 3D image, updating the pixels of the UI object according to the temporary color buffer and the temporary template buffer.

[0006] Furthermore, the rendering objects of the 3D image include: ordinary objects, semi-transparent objects, and UI objects.

[0007] Furthermore, writing the pixel color information of the UI object into the temporary color buffer includes: when rendering the pixels of the UI object, writing the color information of all pixels of the UI object into the corresponding positions of the temporary color buffer.

[0008] Furthermore, writing the pixel occlusion information of the UI object into the temporary template buffer includes: when rendering UI object pixels, assigning the value of the corresponding UI object pixel in the temporary template buffer to 1; when rendering non-UI object pixels, checking the value of the corresponding non-UI object pixel in the temporary template buffer, and if the value of the corresponding non-UI object pixel is 1, updating the value of the corresponding non-UI object pixel in the temporary template buffer to 2.

[0009] Further, updating the pixel of the UI object according to the temporary color buffer and the temporary template buffer includes: checking the value of the corresponding pixel of the UI object in the temporary template buffer; if the value of the corresponding pixel of the UI object is 1, then updating the pixel of the UI object according to the color information of the corresponding pixel of the UI object in the temporary color buffer.

[0010] Furthermore, the method also includes: when rendering ordinary object pixels, checking the value of the temporary template buffer corresponding to the pixel of the UI object according to the position of the ordinary object pixel; if the value corresponding to the position of the ordinary object pixel is 2, then performing tone mapping on the 3D image according to the color information of the ordinary object pixel.

[0011] Furthermore, the method also includes: when rendering the semi-transparent object pixels, checking the value of the temporary template buffer corresponding to the pixel of the UI object according to the position of the semi-transparent object pixels; if the value corresponding to the position of the semi-transparent object pixel is 2, then mapping the 3D image according to the color information of the semi-transparent object pixels and the color information of the UI object pixels.

[0012] Some embodiments of this application also provide a 3D interface color difference resolution system, the system comprising: a first module, the first module being used to create a temporary color buffer and a temporary template buffer, the size of the temporary color buffer and the temporary template buffer being the same as the pixel size of the rendering screen; a second module, the second module being used to write the pixel color information of the UI object into the temporary color buffer; a third module, the third module being used to write the pixel occlusion information of the UI object into the temporary template buffer; and a fourth module, the fourth module being used to update the pixels of the UI object according to the temporary color buffer and the temporary template buffer after performing tone mapping on the 3D image.

[0013] Some embodiments of this application also provide a computer device, the device comprising: one or more processors; and a memory storing computer program instructions, which, when executed, cause the processor to perform the method described above.

[0014] Some embodiments of this application also provide a computer-readable medium having computer program instructions stored thereon, which can be executed by a processor to implement the methods described above.

[0015] Compared to existing technologies, the solution provided in this application, by backing up the pixel colors of UI objects and restoring their original colors in subsequent processing, can better maintain the design effect of the UI interface, avoid color difference problems, and thus achieve higher fidelity. This application is applicable to various rendering methods and display devices, including HDR and LDR devices. Whether it is a virtual scene rendered using HDR or a UI interface that needs to be displayed on an LDR device, color processing can be performed using this solution to ensure consistent image quality. This application divides rendering objects into ordinary objects, semi-transparent objects, and UI objects. Special processing methods are adopted for UI objects, while tone mapping is directly applied to other objects. This differentiated processing method can more accurately preserve the color effect of objects and improve the overall image quality. By creating temporary color buffers and temporary stencil buffers and performing corresponding processing during the rendering process, the color difference problem of the UI interface can be solved without introducing too much complexity, thus improving the rendering effect. In summary, compared to existing technologies, the solution provided in this application has better fidelity, compatibility, flexibility, and practicality, and can effectively solve the color difference problem of 3D interfaces, improve image quality, and maintain the original design effect. Attached Figure Description

[0016] Figure 1 An exemplary flowchart of a 3D interface color difference solution provided in this application embodiment;

[0017] Figure 2 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] With the continuous development of shooting equipment, rendering methods, and display devices, HDR (High-Dynamic Range) has become an increasingly common imaging technology. HDR can present a wider range of brightness and contrast, providing more realistic and richer picture effects and enhancing the viewing experience. However, in the process of rendering virtual scenes, because HDR rendering pixels are used, they need to be converted to LDR (Low-Dynamic Range) for display on ordinary monitors, VR glasses, and other devices. This conversion process is called Tone Mapping, and its purpose is to convert HDR images into images suitable for LDR display. When it comes to 3D scenes containing UI interfaces, problems arise. UI interface designs are usually based on LDR colors, and after tone mapping processing, the colors of the UI interface may show obvious color differences, resulting in a serious deterioration in image quality and an inability to reproduce the original design effect.

[0020] To address the aforementioned technical problems, embodiments of this application provide a solution for color difference in 3D interfaces, such as... Figure 1 As shown, the core of the embodiments of this application lies in:

[0021] Step S101: Create a temporary color buffer and a temporary template buffer, wherein the size of the temporary color buffer and the temporary template buffer is the same as the pixel size of the rendering screen;

[0022] Step S102: Write the pixel color information of the UI object into the temporary color buffer;

[0023] Step S103: Write the pixel occlusion information of the UI object into the temporary template buffer;

[0024] Step S104: After color mapping of the 3D image, update the pixels of the UI object according to the temporary color buffer and the temporary template buffer.

[0025] Specifically, regarding step S101, in some examples, when creating the temporary color buffer and temporary stencil buffer, it is ensured that their size is the same as the pixel size of the rendering screen. The initial value of the data content of the temporary color buffer and the temporary stencil buffer is 0, which indicates that no UI pixel has been rendered at that location. This ensures that each pixel has a corresponding buffer position, so as to correctly record and process the color information and occlusion information of the UI object. Obtain the pixel size of the rendering screen, including width and height. Based on the pixel size of the rendering screen, create the temporary color buffer and temporary stencil buffer, ensuring that their size is the same as the pixel size of the rendering screen. This can be achieved using a two-dimensional array or an image buffer. Determine the position of each pixel in the buffer. This can be done by using a double loop to traverse the x and y coordinates of the pixel and writing the pixel's color information and occlusion information to the corresponding buffer position. Ensure that the pixels in the buffer correspond one-to-one with the pixels of the UI object. The position in the buffer can be determined based on the coordinate position of the pixel; for example, the position of the pixel (x, y) corresponds to the position (x, y) in the buffer. This implementation ensures that the temporary color buffer and temporary stencil buffer match the pixel size of the rendering screen, so that subsequent pixel updates and processing steps can operate accurately on the pixels of the rendering screen.

[0026] Specifically, in step S102, in some examples, the pixel color information of the UI object is written to a temporary color buffer. This involves iterating through all pixels of the UI object; for each pixel, obtaining its position coordinates (x, y) and corresponding color value; writing the obtained color value to the corresponding position (x, y) in the temporary color buffer; continuing to iterate through all UI object pixels and repeating the above steps to write their color information sequentially to the temporary color buffer. Through this implementation, the color information of each UI object pixel is correctly written to the corresponding temporary color buffer. This allows subsequent processing to update the UI object pixels based on the information in the temporary color buffer while preserving their original color.

[0027] Specifically, in step S103, in some examples, the pixel occlusion information of the UI object is written into the temporary template buffer. The process involves iterating through all object pixels; for each pixel, its position coordinates (x, y) are obtained; if the currently iterated pixel belongs to a UI object, the value of the corresponding position (x, y) in the temporary template buffer is updated to 1, indicating that the pixel is occupied by the UI; if the currently iterated pixel belongs to a non-UI object and the current value of the corresponding position (x, y) in the temporary template buffer is 1, then the value of the corresponding position (x, y) in the temporary template buffer is updated to 2, indicating that the pixel was previously a UI pixel but is now occluded by other object pixels; this process continues, iterating through all object pixels and repeating the above steps to write their occlusion information into the temporary template buffer. Through this implementation, the temporary template buffer records the occlusion information of each UI object pixel. In subsequent pixel updates, the value in the temporary template buffer can be used to determine whether a pixel is occluded and processed accordingly to maintain the visibility of the UI object.

[0028] Specifically, regarding step S104, in some examples, after tone mapping of the 3D image, the UI object's pixels are updated according to the temporary color buffer and the temporary template buffer. The process involves iterating through all pixels of the UI object; for each pixel, obtaining its position coordinates (x, y); checking the value of the corresponding position (x, y) in the temporary template buffer; if the value is 0, it indicates that no UI pixel has been rendered at that position, and no update is performed. If the value is 1, it indicates that the UI pixel at that position is not occluded, and the UI object's pixels are updated according to the color information of the corresponding position (x, y) in the temporary color buffer; the color value in the temporary color buffer can be used to replace the current pixel's color, thus preserving the UI object's original color; if the value is 2, it indicates that the pixel is occluded by other objects, and no update is performed, or UI object pixels and semi-transparent object pixels can be mixed as needed; continuing to iterate through all UI object pixels and repeating the above steps to update each pixel. This implementation determines whether pixels of a UI object are occluded based on values ​​in a temporary template buffer, and only updates the color of unoccluded pixels to maintain the visibility and original color of the UI object. This effectively solves the color distortion problem in 3D interfaces, achieving high-fidelity rendering of the UI.

[0029] Through the above steps, the method of this application embodiment can effectively solve the color distortion problem in 3D interfaces and achieve high-fidelity rendering of UI objects, while ensuring the normal color effects of other 3D objects. This method, through the use of a temporary buffer and a specific processing flow, avoids the color distortion problem in the prior art, improving the overall image quality and realism. It should be noted that the UI object in the above examples refers to a UI interface in 3D space; the appropriate coordinate system can be selected according to the specific situation, and no special limitation is made here.

[0030] In some embodiments of this application, the rendering objects of the 3D image include: ordinary objects, semi-transparent objects, and UI objects.

[0031] Ordinary objects: These refer to opaque 3D objects in a virtual environment, such as environment models and character models. These objects typically have complex geometry and texture maps, and may be affected by effects such as lighting and shadows.

[0032] Semi-transparent objects: These are objects with a certain degree of transparency, such as glass or water surfaces. During rendering, the transparency and blending effects of these objects need to be considered to correctly present the visibility of objects behind them.

[0033] UI objects refer to user interface elements, such as buttons, text boxes, and icons. These objects are usually 2D planar elements, but can also be 3D model interfaces. They are designed using LDR colors, but color distortion issues need to be considered during the rendering process.

[0034] For these different types of rendering objects, embodiments of this application create temporary color buffers and temporary stencil buffers, and perform corresponding processing according to the characteristics of different objects to preserve the original colors of UI objects and ensure the overall image quality and realism. Meanwhile, for ordinary objects and semi-transparent objects, other rendering techniques may be applied to handle their lighting, shadows, and transparency effects to provide more realistic rendering results. By comprehensively processing different types of rendering objects, the method of embodiments of this application can effectively solve the color distortion problem in 3D interfaces and achieve high-fidelity rendering effects.

[0035] In some embodiments of this application, writing the pixel color information of the UI object into the temporary color buffer includes: when rendering the pixels of the UI object, writing the color information of all pixels of the UI object into the corresponding positions of the temporary color buffer.

[0036] When rendering the pixels of a UI object, each pixel is iterated over. For each pixel, its color information is extracted and written to the corresponding location in a temporary color buffer. This ensures that the original color information of each pixel of the UI object is preserved in the temporary color buffer. Specifically, the color value of each pixel can be obtained by reading the texture map or other color data of the UI object. Then, this color value is written to the corresponding location in the temporary color buffer to maintain the original color of the pixel. This process ensures that the color information of each pixel of the UI object is preserved in subsequent rendering processes. After tone mapping and other rendering processes are completed, the pixels of the UI object can be correctly updated with colors based on the data in the temporary color buffer to achieve high-fidelity rendering effects and avoid color distortion problems.

[0037] In some embodiments of this application, writing the pixel occlusion information of the UI object into the temporary template buffer includes: when rendering UI object pixels, assigning the value of the corresponding UI object pixel in the temporary template buffer to 1; when rendering non-UI object pixels, checking the value of the corresponding non-UI object pixel in the temporary template buffer, and if the value of the corresponding non-UI object pixel is 1, updating the value of the corresponding non-UI object pixel in the temporary template buffer to 2.

[0038] When rendering pixels of a UI object, the value of the corresponding UI object pixel in the temporary stencil buffer is set to 1, meaning that the pixel is occupied by the UI object and is not occluded by other objects. When rendering pixels of a non-UI object, the value of the corresponding non-UI object pixel in the temporary stencil buffer is checked. If the value is 0, it means that the pixel does not overlap with any UI object pixel. If the value is 1, it means that the pixel overlaps with a UI object pixel. In this case, the value of the corresponding non-UI object pixel in the temporary stencil buffer is updated to 2, indicating that the pixel is occluded by a non-UI object pixel. This process records which UI object pixels are occluded by other objects, allowing for appropriate handling in subsequent rendering processes. This occlusion information is crucial for preserving the original color of UI objects and avoiding color distortion. When processing non-UI object pixels, the value in the temporary stencil buffer can determine whether the pixel's color needs to be updated, thus maintaining the visual consistency and realism of the UI object.

[0039] In some embodiments of this application, updating the pixel of the UI object according to the temporary color buffer and the temporary template buffer includes: after rendering is completed, checking the value of the corresponding pixel of the UI object in the temporary template buffer; if the value of the corresponding pixel of the UI object is 1, then updating the pixel of the UI object according to the color information of the corresponding pixel of the UI object in the temporary color buffer.

[0040] The specific steps for updating UI object pixels based on the temporary color buffer and temporary stencil buffer are as follows: After rendering, iterate through all UI object pixels; for each UI object pixel, check the value at the corresponding position in the temporary stencil buffer; if the value at the corresponding position is 1, it means that the pixel is not occluded by other objects and is a valid pixel of the UI object; use the color information at the corresponding position in the temporary color buffer to replace the color value of the current pixel to preserve the original color of the UI object; the RGB value in the temporary color buffer can be directly assigned to the RGB value of the current pixel, or the color value can be calculated according to a certain blending algorithm; continue to iterate through the next UI object pixel until all UI object pixels have been updated.

[0041] This pixel-by-pixel update operation ensures that UI objects retain their original colors during rendering. The temporary stencil buffer records which UI pixels are occluded by other objects, allowing for identification during the update process. The temporary color buffer stores the original color information of the UI object's pixels and is used to update the pixel color values. This guarantees the color fidelity of the UI objects in the rendered result, improving the overall image quality and realism.

[0042] In some embodiments of this application, the method further includes: when rendering ordinary object pixels, checking the value of the temporary template buffer corresponding to the pixel of the UI object according to the position of the ordinary object pixel; if the value corresponding to the position of the ordinary object pixel is 2, then mapping the 3D image according to the color information of the ordinary object pixel.

[0043] After tone mapping of the 3D image, the rendered screen now includes UI object pixels, ordinary object pixels, and semi-transparent object pixels. Rendering is then performed according to the type of these pixels. When rendering ordinary object pixels, the position information of the current pixel is obtained. Based on the current pixel position, the position of the corresponding UI object pixel is checked, and the value of that position in the temporary template buffer is obtained. If the value at the corresponding position is 2, it indicates that the ordinary object pixel overlaps with the UI object pixel, and the UI object is occluded by the ordinary object. The entire 3D image is mapped based on the color information of the ordinary object pixels. Color adjustments can be made using a certain mapping algorithm based on the color values ​​and positions of the ordinary object pixels to ensure reasonable color representation of the ordinary objects. Through the above steps, the method of this application can handle the overlap between ordinary object pixels and UI object pixels. By checking the value of the temporary template buffer, it is determined whether a UI object pixel is occluded by an ordinary object. If occlusion occurs, mapping is performed based on the color information of the ordinary object pixel to ensure the consistency and color accuracy of the overall image. This effectively solves the color distortion problem caused by the overlap of ordinary objects and UI objects in 3D interface rendering, improving the realism and fidelity of the rendering effect. It should be noted that after tone mapping of the 3D image, the color information of ordinary object pixels is already presented in the final image. Therefore, further rendering processing of ordinary object pixels is not necessary, as they already have correct color effects. However, the step of rendering ordinary object pixels can be optional. This is to ensure that the color information of ordinary object pixels is not lost or modified in subsequent processing, thus maintaining the consistency of the rendering result. This processing may involve blending, adjusting transparency, or other corrections of ordinary object pixels. Therefore, in specific embodiments, whether to perform rendering processing of ordinary object pixels can be determined according to needs and specific scenarios. If the color effect of ordinary object pixels in the tone-mapped image already meets the requirements, this step can be omitted to improve rendering efficiency.

[0044] In some embodiments of this application, the method further includes: when rendering semi-transparent object pixels, checking the value of the temporary template buffer corresponding to the pixel of the UI object according to the position of the semi-transparent object pixel; if the value corresponding to the position of the semi-transparent object pixel is 2, then mapping the 3D image according to the color information of the semi-transparent object pixel and the color information of the UI object pixel.

[0045] After tone mapping of the 3D image, the rendered screen now includes UI object pixels, ordinary object pixels, and semi-transparent object pixels. Rendering is then performed according to the type of these pixels. When rendering a semi-transparent object pixel, the position information of the current pixel is obtained. Based on the current pixel position, the position of the corresponding UI object pixel is checked, and the value of that position in the temporary template buffer is obtained. If the value at the corresponding position is 2, it indicates that the UI object pixel is occluded by the semi-transparent object. The 3D image is mapped based on the color information of the semi-transparent object pixel and the UI object pixel. A blending method can be used to mix the colors of the semi-transparent object and the UI object to maintain the original color of the UI object and the color blending effect of the semi-transparent object. Through these steps, the method of this application can handle the situation where a semi-transparent object occludes a UI object. By checking the value of the temporary template buffer, it is determined whether a UI object pixel is occluded by a semi-transparent object. If occluded, mapping is performed based on the color information of the semi-transparent object pixel and the UI object pixel to maintain the original color of the UI object while considering the semi-transparency effect. This can further enhance the realism and fidelity of the rendering effect, ensuring that semi-transparent objects correctly occlude UI objects and that color representation is accurate in 3D interface rendering.

[0046] This application provides a 3D interface color difference resolution system. Specifically, the system may include: a first module, which creates a temporary color buffer and a temporary template buffer, the size of which is the same as the size of the UI object; a second module, which writes the pixel color information of the UI object into the temporary color buffer; a third module, which writes the pixel occlusion information of the UI object into the temporary template buffer; and a fourth module, which updates the pixels of the UI object according to the temporary color buffer and the temporary template buffer after performing tone mapping on the 3D image.

[0047] It is not difficult to see that the embodiments of this application are system embodiments corresponding to any one or more embodiments in the above embodiments. The technical implementation details of each embodiment in the above embodiments are applicable to this embodiment. To avoid repetition, they will not be repeated here.

[0048] This application also provides a computer device, the structure of which is as follows: Figure 2 As shown, the device includes a memory 11 for storing computer-readable instructions and a processor 12 for executing the computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the processor is triggered to execute the 3D interface color difference solution.

[0049] The methods and / or embodiments in this application can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by a processing unit, it performs the functions defined in the methods of this application.

[0050] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0051] In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0052] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0053] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0054] In another aspect, embodiments of this application also provide a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The aforementioned computer-readable medium carries one or more computer-readable instructions, which may be executed by a processor to implement the steps of the methods and / or technical solutions of the various embodiments of this application.

[0055] In a typical configuration of this application, the terminal and the service network devices each include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0056] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0057] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0058] Furthermore, this application also provides a computer program stored in a computer device, which causes the computer device to execute the method for executing the control code.

[0059] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0060] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

Claims

1. A solution for color difference in 3D interfaces, characterized in that, The method includes: Create a temporary color buffer and a temporary stencil buffer, the size of which is the same as the pixel size of the rendering screen; Write the pixel color information of the UI object into the temporary color buffer; Writing the pixel occlusion information of the UI object into the temporary template buffer includes: when rendering UI object pixels, assigning the value of the corresponding UI object pixel in the temporary template buffer to 1; when rendering non-UI object pixels, checking the value of the corresponding non-UI object pixel in the temporary template buffer, and if the value of the corresponding non-UI object pixel is 1, updating the value of the corresponding non-UI object pixel in the temporary template buffer to 2. After color mapping of the 3D image, the UI object is updated pixel by pixel according to the temporary color buffer and the temporary template buffer, including: after rendering, checking the value of the corresponding UI object pixel in the temporary template buffer; if the value of the corresponding UI object pixel is 1, then updating the UI object pixel according to the color information of the corresponding UI object pixel in the temporary color buffer.

2. The method according to claim 1, characterized in that, The rendering objects of the 3D image include: ordinary objects, semi-transparent objects, and UI objects.

3. The 3D interface color difference solution according to claim 1, characterized in that, The step of writing the pixel color information of the UI object into the temporary color buffer includes: When rendering the pixels of a UI object, the color information of all the pixels of the UI object is written to the corresponding position in the temporary color buffer.

4. The 3D interface color difference solution according to claim 2, characterized in that, The method further includes: When rendering pixels of ordinary objects, the value of the temporary template buffer corresponding to the pixel of the UI object is checked according to the position of the ordinary object pixel. If the value corresponding to the position of the ordinary object pixel is 2, then the 3D image is tone mapped according to the color information of the ordinary object pixel.

5. The 3D interface color difference solution according to claim 2, characterized in that, The method further includes: When rendering the pixels of a semi-transparent object, the value of the temporary template buffer corresponding to the pixel of the UI object is checked according to the position of the semi-transparent object pixel. If the value corresponding to the position of the semi-transparent object pixel is 2, the 3D image is mapped according to the color information of the semi-transparent object pixel and the color information of the UI object pixel.

6. A 3D interface color difference resolution system, characterized in that, The system includes: The first module is used to create a temporary color buffer and a temporary template buffer, the size of which is the same as the pixel size of the rendering screen; The second module is used to write the pixel color information of the UI object into the temporary color buffer. The third module is used to write the pixel occlusion information of the UI object into the temporary template buffer, and specifically performs the following operations: when rendering UI object pixels, the value of the corresponding UI object pixel in the temporary template buffer is assigned to 1; when rendering non-UI object pixels, the value of the corresponding non-UI object pixel in the temporary template buffer is checked, and if the value of the corresponding non-UI object pixel is 1, the value of the corresponding non-UI object pixel in the temporary template buffer is updated to 2. The fourth module is used to perform tone mapping on the 3D image and update the pixel of the UI object according to the temporary color buffer and the temporary template buffer. Specifically, it performs the following operations: After rendering is completed, it checks the value of the corresponding UI object pixel in the temporary template buffer. If the value of the corresponding UI object pixel is 1, it updates the UI object pixel according to the color information of the corresponding UI object pixel in the temporary color buffer.

7. A computer device, characterized in that, The device includes: One or more processors; and A memory storing computer program instructions, which, when executed, cause the processor to perform the method as described in any one of claims 1 to 5.

8. A computer-readable medium having stored thereon computer program instructions that can be executed by a processor to implement the method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Region-dependent color mapping for reducing visible artifacts on halftoned displays

    WO2015053997A1

  • A rendering process and system

    WO2018076038A1