Effect rendering method and device, equipment, medium and program product
By determining transparent areas and distributing molecular areas based on perspective information in a virtual scene, the problem that existing rendering technology is difficult to achieve high-quality transparent material rendering is solved, real-time and smooth rendering effects are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411925022.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-25
AI Technical Summary
Existing rendering technologies are difficult to achieve real-time and high-quality rendering effects in the presence of a mixture of transparent and opaque materials, resulting in poor user experience and increased waiting time.
By based on the perspective information of the current perspective, a transparent area is determined in the target virtual scene, and the target sub-region that is not blocked by the non-transparent model and the obstructed occlusion sub-region are distinguished in the transparent area. Render non-transparent models in the occlusion sub-region and render preset effects in the target sub-region.
Real-time, high-quality transparent material area rendering effect in the case of complex materials mixing, reduces additional waiting time, improves user experience and interaction fluency, and enhances visual reality and user creativity.
Smart Images

Figure CN119693528A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of rendering technology, and in particular to an effect rendering method, device, equipment, medium and program product. Background Art
[0002] In fields such as virtual reality, game development, and simulation training, realistic environment rendering technology is playing an increasingly important role.
[0003] To distinguish between indoor and outdoor scenes, existing rendering solutions usually rely on fixed-position post-effect processing, texture overlay and other methods to determine which areas of the room should be processed with specific special effects and which should be rendered normally. However, when transparent and opaque materials are mixed in the same room, existing technologies have difficulty in achieving real-time and high-quality rendering effects, resulting in a poor user experience and possibly introducing additional waiting time, limiting user creativity and interactivity. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides an effect rendering method. One or more embodiments of the present invention also relate to an effect rendering device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of the present invention, there is provided an effect rendering method, comprising: Based on the perspective information of the current perspective, determining a transparent area in the target virtual scene, wherein the transparent area is an area of the transparent model in the target virtual scene in the current perspective; In the transparent area, determining a target sub-area that is not blocked by the non-transparent model and a blocked sub-area that is blocked by the non-transparent model; Render the non-transparent model in the occluded sub-region and render the preset effect in the target sub-region.
[0006] According to a second aspect of an embodiment of the present invention, there is provided an effect rendering device, comprising: A first determination module is configured to determine a transparent area in the target virtual scene based on the perspective information of the current perspective, wherein the transparent area is an area of the transparent model in the target virtual scene in the current perspective; A second determination module is configured to determine, in the transparent area, a target sub-area that is not blocked by the non-transparent model and a blocked sub-area that is blocked by the non-transparent model; The rendering module is configured to render a non-transparent model in the occluded sub-area and render a preset effect in the target sub-area.
[0007] According to a third aspect of an embodiment of the present invention, there is provided a computing device, including: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned effect rendering method are implemented.
[0008] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned effect rendering method are implemented.
[0009] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program / instruction, which implements the steps of the above-mentioned effect rendering method when executed by a processor.
[0010] An embodiment of the present invention implements the determination of transparent areas in a target virtual scene based on the perspective information of the current perspective, wherein the transparent area is the area of the transparent model in the target virtual scene in the current perspective; in the transparent area, the target sub-area that is not blocked by the non-transparent model and the blocked sub-area that is blocked by the non-transparent model are determined; the non-transparent model is rendered in the blocked sub-area, and the preset effect is rendered in the target sub-area. The transparent area in the target virtual scene is accurately determined based on the current perspective information, and the target sub-area that is not blocked by the non-transparent model is further identified, and the preset special effects processing is applied only in these target sub-areas. The limitations of traditional fixed-position post-effect processing and texture overlay are avoided, ensuring that real-time, high-quality rendering effects in transparent material areas can be achieved even in the presence of complex material mixtures, reducing additional waiting time, improving user experience and interactive fluency, and enhancing visual realism and user creativity. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a schematic diagram of the interaction structure of an effect rendering system provided by an embodiment of the present invention; Figure 2 is a flow chart of an effect rendering method provided by an embodiment of the present invention; Figure 3 is a processing flow chart of an effect rendering method provided by an embodiment of the present invention; Figure 4 It is a structural schematic diagram of an effect rendering device provided by an embodiment of the present invention; Figure 5 It is a structural block diagram of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0012] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.
[0013] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.
[0014] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present invention, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0015] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0016] First, the terms involved in one or more embodiments of the present invention are explained.
[0017] RGB channels: RGB channels refer to the three basic color components used to represent colors in an image or display: red, green, and blue. The color of each pixel is a combination of the different intensities of these three channels, where the value of each channel usually ranges from 0 to 255. By adjusting the values of these three channels, almost all colors can be produced, because most colors perceived by the human eye can be reproduced by mixing red, green, and blue in different proportions. This color model based on the principle of additive color mixing is widely used in digital image processing, photography, video editing, and computer graphics.
[0018] Mask image: In the present invention, a mask image is an auxiliary image that corresponds to the image seen by the user pixel by pixel, and is used to specify which areas of the image need to be applied with special effects or processing. By using different values in the mask image (such as binary 0 and 255, or multi-level grayscale values), the processing method of the corresponding position of the original image can be accurately controlled, such as separating the foreground and background, applying special effects, adjusting transparency, etc., which is an important tool for achieving fine control in the field of image processing and computer vision.
[0019] In the fields of virtual reality, game development, and simulation training, realistic environment rendering technology is playing an increasingly important role. As the pursuit of realism in these fields continues to increase, how to accurately distinguish between indoor and outdoor scenes and provide appropriate visual effects for different materials has become one of the key challenges to improving user experience. Existing rendering schemes usually rely on fixed-position post-effect processing, texture overlays, and other methods to determine which areas apply specific special effects and which remain normal rendering. However, when faced with a mixture of transparent and opaque materials, existing technologies find it difficult to achieve real-time and high-quality rendering effects, which not only affects the user's immersive experience, but may also introduce additional waiting time, limiting the user's creativity and interactivity.
[0020] Taking underwater buildings as an example, the rendering of indoor and outdoor is particularly complex. Underwater indoor and outdoor rendering can be achieved by two scene switching or preprocessing methods. The above solutions all rely on fixed scenes and house objects, and scene switching will introduce more waiting time. Therefore, neither of these two methods can well support players to build and DIY indoor and outdoor objects underwater during runtime, especially when dealing with the coexistence of transparent and opaque materials, the problem is more prominent.
[0021] In order to improve this situation, a related technology uses mask map technology. This method is to set the mask map as the rendering target after rendering the object normally. For opaque objects, the corresponding pixel R channel is assigned a value of +1; the mask map is set as the rendering target again, and for transparent objects (such as glass), the corresponding pixel is assigned a value of -1 in the mask G channel; finally, the mask map is generated, and the R and G channel values of the mask are added. Logical judgment is performed based on the mask map: when the value in the mask map is less than or equal to 0, it is regarded as outdoor and no additional processing is performed; when the value is greater than 0, the post-processing effect of removing the underwater is performed, and the object is regarded as being indoors.
[0022] Although this method can improve the rendering accuracy to a certain extent, in practical applications, when the exterior wall is blocked by internal obstacles or exceeds the far clipping plane, it may cause the mask value to be 0 and be mistakenly marked as outdoor. In addition, all opaque and transparent objects need to be drawn twice, which increases the computational burden. In particular, if the window is blocked by an opaque object, the current scene may be misjudged as a closed underwater interior, thereby removing all underwater processing effects. In fact, the window is transparent and the underwater processing effect should be rendered from the window. Since the camera has a maximum rendering distance, that is, the far clipping plane; when the window is too far away from the camera and exceeds this far clipping plane, such a misjudgment will occur.
[0023] In view of the above problems, the present invention provides an effect rendering system and an effect rendering method. The present invention also relates to an effect rendering device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0024] See also Figure 1 , Figure 1 It is a schematic diagram of the interaction of the structure of an effect rendering system provided by an embodiment of the present invention. The effect rendering system includes a user end, a server end and a rendering end. The user end is used to respond to the user's operation and trigger a rendering event; the server end is used to determine a transparent area in the target virtual scene based on the perspective information of the current perspective when detecting the triggering of the rendering event, wherein the transparent area is the area of the transparent model in the target virtual scene in the current perspective, and in the transparent area, the target sub-area that is not blocked by the non-transparent model and the blocked sub-area blocked by the non-transparent model are determined; the rendering end is used to render the non-transparent model in the blocked sub-area and render the preset effect in the target sub-area.
[0025] Applied to the effect rendering system, the user end responds to the user's operation and triggers a rendering event; after the server detects this event, it analyzes the target virtual scene according to the current perspective information, accurately locates the transparent area where the transparent model is located, and distinguishes the target sub-area that is not blocked by the non-transparent model and the blocked sub-area; the rendering end renders the non-transparent model normally in the blocked sub-area according to the information provided by the server, and applies the preset effect in the target sub-area. This method avoids the limitations of traditional fixed-position post-effect processing and texture coverage, ensuring real-time, high-quality rendering effects of transparent material areas even in the presence of complex material mixtures, reducing additional waiting time, improving user experience and interactive fluency, and enhancing visual realism and user creativity. The division of labor and cooperation between the various ends makes the entire rendering process more intelligent and efficient, providing users with an interactive environment that is both realistic and responsive.
[0026] See also Figure 2 , Figure 2 It is a flow chart of an effect rendering method provided by an embodiment of the present invention, which specifically includes the following steps.
[0027] Step 202: when a rendering event is detected, a transparent area is determined in the target virtual scene based on the perspective information of the current perspective, wherein the transparent area is the area of the transparent model in the target virtual scene in the current perspective.
[0028] The transparent area refers to the area in the target virtual scene that is formed by transparent models (such as windows, glass doors, etc.) and is visible from the current perspective. The perspective information includes parameters such as the camera's position, direction, and field of view, which determine how the system observes the virtual scene from a specific angle.
[0029] The target virtual scene refers to a virtual environment in which different scene effects can be rendered and can be connected with areas representing other types of scenes (such as indoors, outdoors, on the ground, in the sky, etc.) to achieve diverse visual performance.
[0030] In actual applications, when the system detects a rendering event trigger, such as a player entering a new room or changing the perspective, a series of processes will be initiated to ensure the accuracy of scene rendering. First, the system evaluates the entire target virtual scene based on the current perspective information, especially those parts containing transparent materials. In order to accurately identify transparent areas, the system needs to consider factors such as the position, direction, and field of view of the camera. Through these perspective parameters, the system can simulate the actual scene seen by the player and locate which parts are made up of transparent objects. Next, the system traverses all objects in the scene and looks for models with transparent properties. For each transparent model, the system calculates its visibility under the current perspective and records the spatial range occupied by these transparent models. This process involves not only geometric judgments, but also the simulation of visual effects such as lighting and shadows to ensure the correct identification of transparent areas. For the implementation of the steps, one method is to use ray tracing technology to directly detect transparent objects; another method is to pre-mark all transparent objects and dynamically update their status during the rendering process to efficiently determine transparent areas.
[0031] In a specific embodiment of the present invention, it is assumed that a player enters an underwater building with a large floor-to-ceiling window in the game. After receiving the rendering event trigger signal, the system begins to re-evaluate the scene based on the player's current perspective information. Based on the player's perspective (i.e., the camera position and direction), the system analyzes the layout of the entire room and identifies that there is a large transparent glass wall in the room as part of the exterior wall. Through the perspective information, the system accurately calculates the visible area of this part of the glass wall under the current perspective and defines it as a transparent area. Then, the system further refines and checks whether other non-transparent objects (such as furniture and decorations) block part of the glass wall. For the unblocked parts, the system clearly marks them for subsequent processing; for the blocked parts, the system also records them in detail to ensure that they can be correctly distinguished during rendering. Finally, the system generates a mask map to guide the subsequent special effects processing. This mask map clearly marks which areas belong to the transparent glass wall and are not blocked by other objects, providing an important reference for the subsequent rendering operation.
[0032] In another specific embodiment of the present invention, assume that the player enters a viewing platform on the top of a mountain in the game. The platform has a huge translucent dome, which allows the player to overlook the ground landscape below and look up at the sky at the same time. When the system receives a rendering event trigger signal, it begins to re-evaluate the scene based on the player's current perspective information. Based on the player's perspective (i.e., the camera position and direction), the system analyzes the layout of the entire viewing platform and identifies the dome as an important transparent element in the environment.
[0033] Through the viewing angle information, the system accurately calculates the visible area of the translucent dome under the current viewing angle and defines it as a transparent area. Then, the system further refines and checks whether other non-transparent objects (such as railings, decorations, etc.) block part of the dome. For the unobstructed parts, the system clearly marks them for subsequent processing; for the obstructed parts, the system also records them in detail to ensure that they can be correctly distinguished during rendering. Finally, the system generates a mask map to guide subsequent special effects processing. This mask map clearly marks which areas belong to the transparent dome and are not obscured by other objects, providing an important reference for subsequent rendering operations.
[0034] Step 204: In the transparent area, determine the target sub-area that is not blocked by the non-transparent model and the blocked sub-area that is blocked by the non-transparent model.
[0035] The target sub-region refers to the part in the transparent area that is not blocked by any non-transparent model, and these parts can directly see the outdoors or the background. The blocked sub-region refers to the part in the transparent area that is partially or completely blocked by non-transparent models (such as furniture, walls, etc.), and these parts cannot directly see the outdoors or the background.
[0036] In actual applications, after the system has determined the transparent areas in the target virtual scene, it is necessary to further analyze which parts of these areas are fully visible and which parts are blocked by other objects. To achieve this, the system first uses depth testing technology to evaluate the depth information of each pixel. By comparing the relative positions between transparent models and non-transparent models, the system can determine whether a pixel in a transparent area is blocked by a non-transparent object closer to the camera. Specifically, for each pixel of a transparent model, the system checks its depth value and compares it with the depth values of all non-transparent models under the current perspective. If the depth value of the transparent model is greater than or equal to the depth value of a non-transparent model, the pixel is considered to be blocked; otherwise, it is considered to be an unobstructed target sub-area. This process can be completed through graphics hardware acceleration to ensure real-time and efficiency. For the implementation of the steps, one method is to use a depth buffer, which records the shortest distance of each pixel in the scene. Another method is to dynamically calculate the visibility of each transparent model during the rendering process, and simulate the light path through ray tracing or other advanced algorithms to accurately determine the occlusion situation.
[0037] In a specific embodiment of the present invention, it is assumed that the player enters an underwater building, which has a large transparent glass wall as part of the exterior wall. The system has determined the transparent area where the glass wall is located based on the player's perspective information. Next, the system begins to analyze the details in this transparent area. For example, on one side of the room, there is a table and several chairs placed in front of the glass wall. The system uses depth testing technology to check each point on the glass wall pixel by pixel to determine whether they are blocked by the table and chairs. For those parts of the glass wall that are not blocked, the system marks them as target sub-areas, which means that the outdoor underwater scene can be seen from these places. For the parts of the glass wall that are blocked by the table and chairs, the system marks them as blocked sub-areas, which means that the outdoor scenery cannot be seen from these places. Finally, the system generates a detailed mask map that clearly marks which parts are unblocked target sub-areas and which parts are blocked sub-areas, which provides an important basis for subsequent special effects processing.
[0038] In another specific embodiment of the present invention, the system has determined the transparent area where the dome is located based on the player's perspective information. Next, the system begins to analyze the details in this transparent area. For example, on one side of the platform, there are several supporting columns and some tourists are walking. The system uses depth testing technology to check each point on the dome pixel by pixel to determine whether they are blocked by supporting columns or tourists. For those parts of the dome that are not blocked, the system marks them as target sub-areas, which means that the sky or the scenery below can be directly seen from these places. For the parts of the dome that are blocked by supporting columns or tourists, the system marks them as blocked sub-areas, which means that the line of sight in these places is obstructed. Finally, the system generates a detailed mask map that clearly marks which parts are unblocked target sub-areas and which parts are blocked sub-areas, which provides an important basis for subsequent special effects processing.
[0039] Furthermore, a target sub-region that is not occluded by the non-transparent model and an occluded sub-region that is occluded by the non-transparent model are determined, including: performing a depth test on a target position in the transparent area to obtain a depth test result, wherein the target position is any position in the transparent area; when the depth test result indicates that the target position is not occluded by the non-transparent model, determining the target position as a rendering position; and determining the target sub-region based on each rendering position corresponding to the transparent area.
[0040] Among them, depth testing is a graphics rendering technology used to determine the relative distance of each pixel in the scene to decide which pixels should be displayed in front and which should be blocked.
[0041] In actual applications, the system first performs a depth test on each target position in the transparent area to obtain its depth test result. The "target position" here refers to any pixel in the transparent area. The depth test determines whether the position is blocked by comparing the depth value of each target position with the depth values of all non-transparent models under the current perspective. Specifically, for each pixel of the transparent model, the system checks its depth value and compares it with the depth value of the non-transparent model. If the depth value of the transparent model is greater than the depth value of a non-transparent model, it means that the pixel is blocked; conversely, if the depth value of the transparent model is smaller, the pixel is considered to be unblocked. This process can be completed through graphics hardware acceleration to ensure real-time and high efficiency.
[0042] When the depth test result shows that the target position is not blocked by the non-transparent model, the system determines the target position as the rendering position. This means that the position belongs to the target sub-region, that is, the part that can directly see the outdoors or the background. Based on the various rendering positions corresponding to the transparent area, the system further determines the range of the entire target sub-region. The system collects all unobstructed target positions and combines them into a continuous area as the final target sub-region. For those obscured positions, they are marked as obscured sub-regions, indicating that these positions cannot directly see the outdoors or the background.
[0043] In a specific embodiment of the present invention, it is assumed that the player enters an underwater building with a large transparent glass wall. The system has determined the transparent area where the glass wall is located based on the player's perspective information. Next, the system begins to analyze each position in the transparent area pixel by pixel. For example, on one side of the room, there is a table and several chairs placed in front of the glass wall. The system uses depth testing technology to evaluate each pixel on the glass wall to determine whether they are blocked by the table and chairs. For those pixels that are not blocked, the system marks them as rendering positions and classifies them into the target sub-area. For pixels blocked by the table and chairs, the system marks them as blocked sub-areas. Finally, the system generates a detailed mask map that clearly marks which parts are unblocked target sub-areas and which parts are blocked sub-areas, which provides an important basis for subsequent special effects processing.
[0044] Based on this, by performing a depth test on each target position in the transparent area, the system can accurately distinguish between the target sub-area that is not blocked by the non-transparent model and the blocked sub-area that is blocked. This method not only improves rendering accuracy, but also optimizes performance and reduces unnecessary calculations.
[0045] Furthermore, a depth test is performed on the target position in the transparent area to obtain a depth test result, including: determining a first depth value of the transparent area based on the viewing angle information; obtaining the position information of each non-transparent model in the target virtual scene, and determining a second depth value of each non-transparent model based on the position information and the viewing angle information; determining the occlusion relationship between the transparent area and each non-transparent model based on the first depth value and the second depth value, and generating a depth test result based on the occlusion relationship.
[0046] The first depth value refers to the distance of the target position in the transparent area relative to the camera (i.e., the viewing angle); the second depth value refers to the distance of each non-transparent model in the target virtual scene relative to the same camera. The occlusion relationship is determined by comparing these two depth values to determine whether the transparent area is occluded by the non-transparent model.
[0047] In actual applications, when the system needs to determine whether the target position in the transparent area is blocked, a series of depth test steps are performed. First, based on the current viewing angle information, the system calculates the first depth value of each target position in the transparent area. This step involves taking into account the position and direction of the camera to accurately measure the actual distance from the camera to each pixel in the transparent area. Next, the system obtains the position information of all non-transparent models in the target virtual scene, and calculates the second depth value of each non-transparent model relative to the camera based on this position information and viewing angle information. This process ensures that the system can accurately understand the exact position of each non-transparent model in three-dimensional space and its distance from the camera.
[0048] Subsequently, the system compares the first depth value of the transparent area with the second depth value of each non-transparent model to determine the occlusion relationship. Specifically, for each target position of the transparent area, if the first depth value of the position is greater than or equal to the second depth value of a non-transparent model, it means that the position is occluded by the non-transparent model; conversely, if the first depth value is smaller, the position is considered to be unobstructed. In this way, the system can generate detailed depth test results, clearly identifying which parts of the transparent area are visible (i.e., not obstructed) and which parts are invisible (i.e., obstructed). In order to improve efficiency, this process is usually accelerated by graphics hardware to ensure real-time and high efficiency.
[0049] In a specific embodiment of the present invention, it is assumed that the player enters an underwater building with a large transparent glass wall. The system has determined the transparent area where the glass wall is located based on the player's perspective information. Next, the system begins to analyze each position in the transparent area pixel by pixel. For example, on one side of the room, there is a table and several chairs placed in front of the glass wall. The system first calculates the first depth value of each pixel on the glass wall, that is, the distance from the player's perspective to these pixels. Then, the system obtains the position information of the table and chairs and calculates their second depth values relative to the player's perspective. Next, the system compares the first depth value of each glass wall pixel with the second depth value of the table and chairs. For those pixels whose first depth value is less than the second depth value, the system marks them as unobstructed and classifies them into the target sub-area; for pixels whose first depth value is greater than or equal to the second depth value, the system marks them as obstructed and classifies them into the obstructed sub-area. Finally, the system generates a detailed mask map that clearly marks which parts are unobstructed target sub-areas and which parts are obstructed sub-areas, which provides an important basis for subsequent special effects processing.
[0050] Based on this, by performing a depth test on each target position in the transparent area, the system can accurately distinguish the target sub-area that is not blocked by the non-transparent model and the blocked sub-area that is blocked. This method not only improves rendering accuracy, but also optimizes performance and reduces unnecessary calculations.
[0051] Furthermore, when the depth test result indicates that the target position is not obscured by the non-transparent model, the target position is determined as the rendering position, including: generating a mask map based on the viewing angle information, wherein the pixels of the mask map correspond one-to-one to the pixels of the picture to be rendered, and the picture to be rendered is the picture of the target virtual scene in the current viewing angle; when the depth test result indicates that the target position is not obscured by the non-transparent model, determining the rendering position in the mask map based on the target position, and recording the mask information at the rendering position.
[0052] The mask image is an auxiliary image that corresponds to the image to be rendered, and is used to record which locations need to be applied with special effects or processing. The mask information is the information that marks each pixel in the mask image, indicating whether the location needs to be applied with special effects.
[0053] In actual applications, when the depth test results show that the target positions are not blocked by non-transparent models, the system will determine these target positions as rendering positions, and further generate mask maps to record the mask information of these positions. First, based on the current perspective information, the system generates a mask map. Each pixel of this mask map corresponds one-to-one to each pixel in the image to be rendered (that is, the image of the target virtual scene in the current perspective). This means that the mask map and the image finally displayed to the user have the same resolution and size, ensuring an exact match between the two.
[0054] Next, when the depth test result indicates that the target position is not obscured by the non-transparent model, the system determines the corresponding rendering position in the mask map based on the target position. Specifically, for each unobstructed target position, the system will find the corresponding position in the mask map and record the mask information here. This mask information can be a simple binary value (such as 0 for no processing, 1 for special effects to be applied), or it can be a more complex data structure to record more details about the position, such as what type of special effects to apply, the intensity of the special effects, etc. In this way, the system can apply preset effects only to those pixels marked as needing to be processed in the subsequent rendering process, while ignoring other parts, thereby improving rendering efficiency and reducing unnecessary calculations.
[0055] In a specific embodiment of the present invention, it is assumed that the player enters an underwater building with a large transparent glass wall. The system has completed the depth test in the transparent area and determined which positions are not blocked. Next, the system generates a mask map based on the current perspective information, and this mask map corresponds to the entire indoor scene from the player's perspective. For those unobstructed target positions, the system finds the corresponding position in the mask map and marks the mask information here, for example, using 1 to indicate that the position needs to apply underwater special effects. For the obscured position, the default value of 0 is maintained, indicating that no special processing is required. In this way, the system generates a detailed mask map that clearly marks which parts are unobstructed target sub-areas and which parts are obscured sub-areas. This provides an important basis for subsequent special effects processing. For example, when rendering underwater special effects, the system only needs to check the value of the corresponding position in the mask map. If it is 1, the underwater special effects are applied; if it is 0, it is rendered in the conventional way.
[0056] Based on this, by marking the unobstructed target positions, the system can accurately determine the rendering positions and efficiently record the mask information of these positions through the mask map. This method not only improves rendering accuracy, but also optimizes performance and reduces unnecessary calculations and misjudgments.
[0057] Further, rendering a preset effect in the target sub-region includes: acquiring a mask map corresponding to the viewing angle information, and analyzing to obtain the mask information; and rendering the preset effect in the target sub-region corresponding to the mask information.
[0058] In actual applications, the system first creates a mask map based on the current viewing angle information. This mask map corresponds to the scene to be rendered one by one, and each pixel indicates whether the location is blocked by a non-transparent object. Subsequently, the system analyzes this mask map to determine which areas are marked as requiring special effects rendering. For those locations with recorded mask information, that is, the target sub-areas, the system will perform rendering operations according to the pre-set effect rules. For example, if an area is marked as requiring underwater special effects, the system will enhance the color shift, light refraction and other properties of the area during rendering. For those places where no mask information is recorded, they are rendered in the usual way to ensure that the non-transparent model maintains its original appearance without any special processing. In this way, the system only needs to perform special effects rendering in places where mask information is recorded according to the mask map, and render the non-transparent model normally in other places, thereby improving rendering efficiency and reducing unnecessary computational burden.
[0059] In a specific embodiment of the present invention, it is assumed that the player enters the interior of an underwater building with a large transparent glass wall. The system generates a mask map based on the current perspective information. This mask map accurately maps each pixel in the target virtual scene and marks which areas belong to the unobstructed target sub-areas. For the parts in front of the glass wall that are not blocked by furniture or other obstacles, the system records special mask information in the mask map, indicating that these locations need to apply underwater special effects. When performing actual rendering, the system only applies underwater special effects to these specific locations, such as simulating the refraction and scattering effects of light passing through the water, as well as color changes. At the same time, non-transparent models such as walls and furniture in the room maintain the original visual performance without applying any additional special effects. In this way, the system can not only accurately present the outdoor underwater scene seen through the glass wall, but also ensure that the objects in the room look natural and realistic without any unnecessary rendering overhead.
[0060] Based on this, by applying targeted rendering effects to specific areas, the system can significantly improve rendering efficiency because there is no need to apply complex effects indiscriminately to the entire scene. In addition, this approach can also improve the quality of the final rendering results because it allows more fine-grained control over the application range of special effects, ensuring that only necessary parts are enhanced, thereby creating a more realistic and immersive visual experience. The system can precisely control the application of special effects, which not only ensures rendering quality but also optimizes performance.
[0061] Step 206: Render a non-transparent model in the occluded sub-region, and render a preset effect in the target sub-region.
[0062] Among them, the preset effects are determined according to the environment of the indoor scene, such as underwater special effects, aerial special effects, flame special effects, etc., which are used to enhance the realism of a specific environment.
[0063] In actual applications, after the system has determined the occluded sub-regions and target sub-regions within the transparent area, the next task is to render non-transparent models in the occluded sub-regions and apply preset effects in the target sub-regions. For the occluded sub-regions, the system renders the non-transparent models normally to ensure that these objects are displayed in the usual way and are not affected by special effects. For the target sub-regions, the system selects and applies the corresponding preset effects according to the environment in which the current scene is located. For example, in an underwater environment, the target sub-region will apply underwater special effects to simulate the refraction, scattering and color changes of light when passing through the water; in an aerial environment, aerial special effects such as fog and sunlight can be applied; if it is in a flame environment, the target sub-region will present the effect of flame burning, including heat ripples and flickering fire. To achieve this, the system first prepares a set of parameters for each preset effect, such as color adjustment, light and shadow effects, particle systems, etc. Then, during the rendering process, the system accurately applies these effects according to the position and size of the target sub-region while maintaining consistency and coherence with the entire scene. As for the implementation of the steps, one method is to use shader technology to dynamically adjust the color and lighting properties of pixels; another method is to use post-processing technology to adjust the image as a whole after rendering is completed to achieve the desired effect.
[0064] In a specific embodiment of the present invention, it is assumed that the player enters an underwater building, which has a large transparent glass wall as part of the exterior wall. The system has determined the transparent area where the glass wall is located based on the player's perspective information, and further distinguished the unobstructed target sub-area and the obstructed obstructed sub-area. During the rendering process, the system first processes the obstructed sub-area, where a table and several chairs are placed. The system renders these non-transparent models in a conventional manner to ensure that they look natural and conform to the laws of physics. Next, for the unobstructed target sub-area, the system applies underwater special effects. These special effects include simulating the refraction and scattering effects of water bodies, so that the outdoor scene seen from the indoor through the glass wall presents a real underwater visual experience. The underwater special effects may also include slight color shifts to imitate the blue-green hue in the water, as well as some floating particle effects to simulate plankton or bubbles in the water. In addition, if the scene is switched to a room with a fire special effect, the system will also apply the effect of burning fire in the target sub-area, including air fluctuations and jumping firelight caused by heat. Ultimately, in this way, the system can not only accurately render the non-transparent models in the occluded sub-area, but also add rich environmental effects to the target sub-area, greatly enhancing the realism and immersion of the scene.
[0065] In another specific embodiment of the present invention, the system has determined the transparent area where the dome is located based on the player's perspective information, and further distinguished the unobstructed target sub-area and the obstructed obstructed sub-area. During the rendering process, the system first processes the obstructed sub-area, which includes support columns and other non-transparent models. The system renders these models in a conventional manner to ensure that they look natural and conform to physical laws. Next, for the unobstructed target sub-area, the system applies special effects of the sky and ground landscape. These special effects may include simulating atmospheric scattering effects so that the sky seen through the dome presents real sunlight, sunset or starry sky scenes; for the ground landscape, the terrain undulations, vegetation distribution, and distant city lights or river reflections are simulated. In addition, if the scene contains weather changes (such as rain or snow), the system will also apply corresponding weather special effects in the target sub-area, such as the refraction effect of raindrops falling on the dome or the animation of snowflakes falling. Finally, in this way, the system can not only accurately render the non-transparent models in the obstructed sub-area, but also add rich environmental special effects to the target sub-area, greatly enhancing the realism and immersion of the scene.
[0066] Furthermore, before determining the transparent area in the target virtual scene based on the perspective information of the current perspective, it also includes: adding annotation information to the non-transparent model in response to the annotation operation of the front-end user; determining the transparent area in the target virtual scene based on the perspective information of the current perspective, including: when the annotation information is detected in the target virtual scene, determining the position information of the non-transparent model corresponding to the annotation information; determining the transparent area in the target virtual scene based on the position information and the perspective information of the current perspective.
[0067] The annotation information refers to the mark added by the user to the non-transparent model through the front-end interface, indicating whether the model should be considered transparent. The position information refers to the specific coordinates and bounding box of the non-transparent model in the three-dimensional space and other geometric data.
[0068] In actual applications, the system first responds to the annotation operation of the front-end user and adds annotation information to the non-transparent model. The user can select one or more non-transparent models through the interactive interface and set the transparent or not annotation for them. This annotation operation can be a simple check box, button click or other intuitive methods. The system receives and processes these annotation requests, associates the annotation information with the selected non-transparent model, and updates the model's data structure to reflect the new transparent attribute.
[0069] Next, the system begins to determine the transparent area based on the current perspective information. When annotation information is detected in the target virtual scene, the system determines the position information of the non-transparent model corresponding to the annotation information. Combining this position information with the perspective information of the current perspective, the system calculates which parts should be rendered transparent. Specifically, the system traverses all models with annotation information and checks whether they are marked as transparent. For those models marked as transparent, the system accurately determines the transparent areas formed by these models under the current perspective based on their position information and current perspective information. For the step of determining the position information of the non-transparent model corresponding to the annotation information, one implementation method is to directly read the data structure of the model to obtain its coordinates; another implementation method is to use a collision detection algorithm to locate the exact position of the model. Subsequently, the system uses this position information and perspective information to accurately determine the transparent area to ensure that the annotation information is clearly visible and not affected by the transparent effect.
[0070] In a specific embodiment of the present invention, it is assumed that the developer is building a room scene inside a virtual building, which contains a variety of non-transparent models, such as walls, furniture and decorations. In order to optimize the player experience, the developer hopes to set transparent properties for certain specific items so that the indoor and outdoor scenes can be seen more clearly. The developer uses the development tool to mark the glass display cabinet in the room, marks it as transparent, and saves this setting. When the player enters the room and triggers the rendering event, the system automatically detects these marking information. The system first traverses all models with marking information to check whether they are marked as transparent. After finding the marking on the glass display cabinet, the system determines the location information of the display cabinet and calculates the transparent area in combination with the current viewing angle information. For example, when observed from a certain angle, the items in the glass display cabinet should be clearly visible through the display cabinet, and the outdoor scenery can also be seen through the display cabinet. In this way, even if observed from different angles, the player can clearly see the transparent effect set by himself, and it will not be blocked by other non-transparent objects. In addition, if there are windows in the room, the developer can also mark them transparently during the development stage to ensure that the player can see the outdoor underwater scene or other environmental special effects through the window, which enhances the visual realism and immersion.
[0071] Based on this, pre-marking transparent and opaque models simplifies the development process. Developers can determine which objects should have transparent properties during the design phase and embed this information into the model data. This not only reduces the workload of later debugging, but also ensures the consistency and accuracy of the transparency effect.
[0072] An embodiment of the present invention implements the determination of transparent areas in a target virtual scene based on the perspective information of the current perspective, wherein the transparent area is the area of the transparent model in the target virtual scene in the current perspective; in the transparent area, the target sub-area that is not blocked by the non-transparent model and the blocked sub-area that is blocked by the non-transparent model are determined; the non-transparent model is rendered in the blocked sub-area, and the preset effect is rendered in the target sub-area. The transparent area in the target virtual scene is accurately determined based on the current perspective information, and the target sub-area that is not blocked by the non-transparent model is further identified, and the preset special effects processing is applied only in these target sub-areas. The limitations of traditional fixed-position post-effect processing and texture overlay are avoided, ensuring that real-time, high-quality rendering effects in transparent material areas can be achieved even in the presence of complex material mixtures, reducing additional waiting time, improving user experience and interactive fluency, and enhancing visual realism and user creativity.
[0073] The following combination Figure 3 Taking the application of the effect rendering method provided by the present invention in the rendering of an underwater building interior in a game scene as an example, the effect rendering method is further described. Figure 3 It is a processing flow chart of an effect rendering method provided by an embodiment of the present invention, which specifically includes the following steps.
[0074] Step 302: Pre-mark the transparent parts of the outer walls of underwater building components (such as windows) and set them to a special layer: T.
[0075] Specifically, all transparent parts of the exterior walls of underwater building components, such as windows, are pre-marked and assigned to a special layer: T. This step ensures that the system can identify which transparent objects are located at the junction of indoor and outdoor areas, so that these key areas can be accurately processed in the subsequent rendering process. Through this pre-marking method, the system can simplify the logic of mask map generation and focus only on key transparent elements that may affect the distinction between indoor and outdoor areas, improving the efficiency and flexibility of the system.
[0076] Step 304: Detect that the player enters indoors from outdoors, and turn off all underwater post-processing effects.
[0077] Specifically, when the player enters the room from outside, the system will automatically detect this change and immediately turn off all underwater post-processing effects. This is to ensure the normal rendering of the indoor environment and avoid unnecessary special effects interference. By monitoring the player's position changes in real time, the system can dynamically adjust the rendering strategy to ensure that users can get the most appropriate visual experience whether indoors or outdoors. This mechanism not only improves the user experience, but also reduces the waste of computing resources, making scene switching smoother and more natural.
[0078] Step 306: Render all opaque objects normally and write depth values.
[0079] Specifically, the system starts to render all opaque objects in the scene normally and writes depth values in the process. Depth values are important data used to determine the relative position of objects in three-dimensional space. It helps the system correctly determine which objects are in the foreground and which are in the background in subsequent steps. By rendering opaque objects first and recording their depth information, the system lays a solid foundation for the subsequent transparent object processing, ensuring the correct interaction between transparent and opaque objects, and also provides the necessary basis for subsequent depth testing.
[0080] Step 308: Create a mask map M according to the camera perspective, set the mask map M as the rendering target, perform a depth test when rendering a transparent object whose layer is T, and write 1 to the mask map R channel for the part that is not blocked by the depth test.
[0081] Specifically, the system creates a mask map M based on the current camera perspective and sets it as the rendering target. Next, for transparent objects (such as windows) previously marked as special layers layer:T, the system performs depth tests when rendering these objects. Only those parts of transparent objects that pass the depth test, that is, those that are not blocked by other opaque objects, will have a value of 1 written to the R channel of the mask map. This method effectively isolates the truly visible transparent areas, ensuring the precise application of subsequent underwater effects, while greatly simplifying the construction process of the mask map and avoiding complex and redundant calculations.
[0082] Step 310: In the underwater post-processing step, the mask map M is sampled, and underwater post-effect processing is performed only in the area where the mask is 1, and no underwater processing is performed in the area where the mask is 0.
[0083] Specifically, the system samples the mask map M in the underwater post-processing stage, and decides whether to apply underwater special effects based on the value of each pixel in the mask map. Specifically, for areas with a mask value of 1, the system performs underwater post-effect processing to simulate real underwater visual effects; while for areas with a mask value of 0, it maintains a normal rendering state without any underwater processing. This approach not only achieves accurate distinction between indoor and outdoor environments, but also supports real-time rendering of runtime built or DIY rooms, enhancing user creativity and interactive fluency, and providing a more realistic and immersive experience.
[0084] Corresponding to the above method embodiment, the present invention also provides an effect rendering device embodiment, Figure 4 FIG. 1 is a schematic diagram of a structure of an effect rendering device provided by an embodiment of the present invention. Figure 4 As shown, the device comprises: The first determination module 402 is configured to determine a transparent area in the target virtual scene based on the perspective information of the current perspective when a rendering event is detected, wherein the transparent area is an area of a transparent model in the target virtual scene in the current perspective; The second determination module 404 is configured to determine, in the transparent area, a target sub-area that is not blocked by the non-transparent model and a blocked sub-area that is blocked by the non-transparent model; The rendering module 406 is configured to render a non-transparent model in the occluded sub-region and render a preset effect in the target sub-region.
[0085] Optionally, the second determination module 404 is further configured to perform a depth test on a target position in the transparent area to obtain a depth test result, wherein the target position is any position in the transparent area; when the depth test result indicates that the target position is not obscured by a non-transparent model, the target position is determined as a rendering position; and based on each rendering position corresponding to the transparent area, a target sub-area is determined.
[0086] Optionally, the second determination module 404 is further configured to determine a first depth value of the transparent area based on the viewing angle information; obtain the position information of each non-transparent model in the target virtual scene, and determine a second depth value of each non-transparent model based on the position information and the viewing angle information; determine the occlusion relationship between the transparent area and each non-transparent model according to the first depth value and the second depth value, and generate a depth test result based on the occlusion relationship.
[0087] Optionally, the second determination module 404 is further configured to generate a mask map based on the viewing angle information, wherein the pixels of the mask map correspond one-to-one to the pixels of the picture to be rendered, and the picture to be rendered is the picture of the target virtual scene in the current viewing angle; when the depth test result indicates that the target position is not obscured by the non-transparent model, the rendering position is determined in the mask map based on the target position, and the mask information is recorded at the rendering position.
[0088] Optionally, the second determining module 404 is further configured to obtain a mask map corresponding to the viewing angle information, analyze and obtain the mask information, and render a preset effect in the target sub-region corresponding to the mask information.
[0089] Optionally, the effect rendering device further includes a labeling module, which is configured to add labeling information to the non-transparent model in response to the labeling operation of the front-end user. Accordingly, the rendering module 406 is further configured to determine the position information of the non-transparent model corresponding to the labeling information when the labeling information is detected in the target virtual scene; based on the position information and the perspective information of the current perspective, determine the transparent area in the target virtual scene.
[0090] Applied to the effect rendering device, when a rendering event is detected to be triggered, the first determination module 402 locates the transparent area where the transparent model is located in the target virtual scene according to the perspective information of the current perspective. Then, the second determination module 404 deeply analyzes these transparent areas to distinguish the target sub-areas that are not blocked by any non-transparent models and the blocked sub-areas that are blocked. Finally, the rendering module 406 is responsible for adding preset effects to the target sub-areas while rendering the non-transparent models normally in the blocked sub-areas. This process avoids the limitations of traditional fixed-position post-effect processing and texture coverage, ensuring that real-time, high-quality transparent material area rendering effects can be achieved even in the face of complex material mixing, reducing additional waiting time, improving user experience and interactive fluency, and enhancing visual realism and user creativity.
[0091] The above is a schematic scheme of an effect rendering device of this embodiment. It should be noted that the technical scheme of the effect rendering device and the technical scheme of the effect rendering method described above belong to the same concept, and the details not described in detail in the technical scheme of the effect rendering device can be referred to the description of the technical scheme of the effect rendering method described above.
[0092] Figure 5 The structure block diagram of a computing device 500 provided according to an embodiment of the present invention is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0093] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0094] In one embodiment of the present invention, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present invention. Those skilled in the art may add or replace other components as needed.
[0095] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.
[0096] The processor 520 is used to execute the following computer program / instruction, which implements the steps of the above-mentioned effect rendering method when executed by the processor.
[0097] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the effect rendering method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the effect rendering method embodiment.
[0098] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned effect rendering method when executed by a processor.
[0099] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the effect rendering method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the effect rendering method embodiment.
[0100] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned effect rendering method when executed by a processor.
[0101] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above effect rendering method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above effect rendering method.
[0102] The above describes specific embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0103] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0104] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present invention.
[0105] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0106] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of the present invention. The present invention selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. An effect rendering method, characterized in that: include: In the case where a rendering event is detected to be triggered, a transparent area is determined in the target virtual scene based on the perspective information of the current perspective, wherein the transparent area is an area of a transparent model in the target virtual scene in the current perspective; In the transparent area, determining a target sub-area that is not blocked by the non-transparent model and a blocked sub-area that is blocked by the non-transparent model; The non-transparent model is rendered in the occluded sub-region, and a preset effect is rendered in the target sub-region.
2. The method according to claim 1, characterized in that Determining, in the transparent area, a target sub-area that is not blocked by the non-transparent model and a blocked sub-area that is blocked by the non-transparent model includes: Performing a depth test on a target position in the transparent area to obtain a depth test result, wherein the target position is any position in the transparent area; When the depth test result indicates that the target position is not blocked by the non-transparent model, determining the target position as the rendering position; A target sub-area is determined based on the rendering positions corresponding to the transparent areas.
3. The method according to claim 2, characterized in that The performing a depth test on a target position in the transparent area to obtain a depth test result includes: Based on the viewing angle information, determining a first depth value of the transparent area; Acquire position information of each non-transparent model in the target virtual scene, and determine a second depth value of each non-transparent model based on the position information and the viewing angle information; An occlusion relationship between the transparent area and each non-transparent model is determined according to the first depth value and the second depth value, and a depth test result is generated according to the occlusion relationship.
4. The method according to claim 2, characterized in that: The step of determining the target position as the rendering position when the depth test result indicates that the target position is not blocked by the non-transparent model includes: Based on the viewing angle information, a mask image is generated, wherein pixels of the mask image correspond one-to-one to pixels of a picture to be rendered, and the picture to be rendered is a picture of the target virtual scene in the current viewing angle; When the depth test result indicates that the target position is not blocked by the non-transparent model, a rendering position is determined in the mask map based on the target position, and mask information is recorded at the rendering position.
5. The method according to claim 4, characterized in that The rendering preset effect in the target sub-area includes: Acquire the mask image corresponding to the viewing angle information, and analyze and obtain the mask information; A preset effect is rendered in the target sub-region corresponding to the mask information.
6. The method according to claim 1, characterized in that Before determining the transparent area in the target virtual scene based on the perspective information of the current perspective, the method further includes: In response to the annotation operation of the front-end user, adding annotation information to the non-transparent model; The determining of the transparent area in the target virtual scene based on the perspective information of the current perspective includes: When the annotation information is detected in the target virtual scene, determining the position information of the non-transparent model corresponding to the annotation information; Based on the position information and the perspective information of the current perspective, a transparent area is determined in the target virtual scene.
7. An effect rendering device, characterized in that: include: A first determination module is configured to determine a transparent area in a target virtual scene based on the perspective information of a current perspective when a rendering event is detected to be triggered, wherein the transparent area is an area of a transparent model in the target virtual scene in the current perspective; A second determination module is configured to determine, in the transparent area, a target sub-area that is not blocked by the non-transparent model and a blocked sub-area that is blocked by the non-transparent model; The rendering module is configured to render the non-transparent model in the occlusion sub-area and render a preset effect in the target sub-area.
8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the effect rendering method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which, when executed by a processor, implements the steps of the effect rendering method described in any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the steps of the effect rendering method according to any one of claims 1 to 6.