Scene rendering method and device, computer equipment and computer readable storage medium

By obtaining the overlay weight map and determining the image mapping area, the scene model is rendered according to the overlay situation, the problem of computer resources was solved in scene rendering, and a more efficient rendering effect is achieved.

CN120495493APending Publication Date: 2025-08-15SHANGHAI NETEASE CUICAN NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510588838.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

When the prior art does not make targeted adjustments to the model in scene rendering, it will lead to waste of computer resources, especially when adding cover effects, causing waste of performance.

Method used

By obtaining the coverage weight map of the scene model, determine the image mapping area of the target object model in the coverage weight map, and render the scene model according to the coverage situation, close the overlay material of the target object model that is not covered by the overlay, and use other model materials for rendering.

Benefits of technology

It reduces the waste of computer resources, improves rendering efficiency and terminal display fluency, and avoids unnecessary computing resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495493A_ABST
    Figure CN120495493A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a scene rendering method and device, computer equipment and a computer readable storage medium, and the method comprises the steps: obtaining a coverage weight map corresponding to a scene model, the coverage weight map being used for indicating the weight of different positions of the scene model covered by a target covering object; according to the position of a target object model contained in the scene model in the scene model, determining an image mapping area of the target object model in the coverage weight map; according to the image mapping area, determining the coverage condition of the target covering object to the target object model; and rendering the scene model based on the coverage condition to obtain a rendering result, and for the target object model which indicates that the coverage condition is not covered by the target covering object, performing rendering based on other model materials except the covering object material corresponding to the target covering object to obtain a target object model which is not covered by the target covering object. According to the method, the target object model which is not covered by the target covering object can be determined based on the covering weight map, and the covering object material of the target object model is closed, so that the waste of computer resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of rendering technology, and in particular to a scene rendering method, apparatus, computer device, and computer-readable storage medium. Background Art

[0002] In the field of terrain rendering and scene optimization, adding covering effects to the scene, such as adding falling leaves and falling flowers, can enhance the realism and immersion of the scene. This effect is usually achieved by manually adding corresponding materials to the model. If the model is not adjusted specifically when adding the material, or if the addition is wrong, the model that does not need to add the covering effect will be mistakenly enabled, resulting in performance waste. Summary of the Invention

[0003] Embodiments of the present application provide a scene rendering method, apparatus, computer device, and computer-readable storage medium, which can reduce the waste of computer resources.

[0004] An embodiment of the present application provides a scene rendering method, comprising:

[0005] Obtaining a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different positions of the scene model being covered by target covering objects;

[0006] Determining an image mapping area of the target object model in the coverage weight map according to a position of the target object model included in the scene model in the scene model;

[0007] Determining, according to the image mapping area, the coverage of the target covering on the target object model;

[0008] The scene model is rendered based on the coverage condition to obtain a rendering result, wherein for a target object model that the coverage condition indicates is not covered by the target cover, rendering is performed based on other model materials except the cover material corresponding to the target cover.

[0009] Accordingly, an embodiment of the present application further provides a scene rendering device, comprising:

[0010] an acquiring unit, configured to acquire a coverage weight map corresponding to the scene model, wherein the coverage weight map is used to indicate the weights of different positions of the scene model being covered by the target covering object;

[0011] a first determining unit, configured to determine an image mapping area of the target object model in the coverage weight map according to a position of the target object model included in the scene model in the scene model;

[0012] a second determining unit, configured to determine, according to the image mapping area, a coverage condition of the target covering object on the target object model;

[0013] A rendering unit is configured to render the scene model based on the coverage condition to obtain a rendering result, wherein for a target object model indicated by the coverage condition as not covered by the target cover, rendering is performed based on other model materials except a cover material corresponding to the target cover.

[0014] Correspondingly, an embodiment of the present application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any scene rendering method provided in the embodiment of the present application.

[0015] Accordingly, an embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program, and the computer program is loaded by a processor to execute any scene rendering method provided in the embodiment of the present application.

[0016] The embodiment of the present application obtains a coverage weight map corresponding to a scene model, where the coverage weight map is used to indicate the weights of different positions of the scene model being covered by a target cover; determines an image mapping area of the target object model in the coverage weight map according to the position of the target object model contained in the scene model; determines the coverage of the target object model by the target cover according to the image mapping area; renders the scene model based on the coverage to obtain a rendering result, wherein, for a target object model indicated as not being covered by the target cover, rendering is performed based on model materials other than the cover material corresponding to the target cover, thereby determining the target object model not being covered by the target cover based on the coverage weight map, and turning off the cover material of such target object model, thereby avoiding rendering such target object model based on the cover material, and reducing waste of computer resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 This is a flowchart of the scene rendering method provided by an embodiment of the present application;

[0019] Figure 2 This is a schematic diagram of a coverage weight map and a scene model provided in an embodiment of the present application;

[0020] Figure 3 This is a schematic diagram of a scene rendering device provided in an embodiment of the present application;

[0021] Figure 4 It is a structural diagram of the computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0023] The present invention provides a scene rendering method, apparatus, computer device, and computer-readable storage medium. The scene rendering apparatus can be integrated into a computer device, which can be a server or a terminal.

[0024] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.

[0025] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.

[0026] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0027] This embodiment will be described from the perspective of a scene rendering device. The scene rendering device may be integrated into a computer device, which may be a server or a terminal.

[0028] The present application provides a scene rendering method, such as Figure 1 As shown, the specific process of the scene rendering method can be as follows:

[0029] 101. Obtain a coverage weight map corresponding to the scene model. The coverage weight map is used to indicate the weights of different positions of the scene model being covered by target covering objects.

[0030] Among them, the scene model can be used to render a virtual scene in a graphical user interface. The scene may include multiple object models, and each object model is used to render an object in the virtual scene, such as a building, a tree, etc. The virtual scene is a virtual scene displayed (or provided) when the application is running on a terminal or a server. Optionally, the virtual scene is a simulation environment of the real world, or a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene is any one of a two-dimensional virtual scene and a three-dimensional virtual scene. The virtual environment can be the sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, the virtual scene is a scene with complete game logic of virtual objects such as user control. For example, for sandbox 3D shooting games, the virtual scene is a 3D game world for players to control virtual objects to fight. Example virtual scenes may include: mountains, plains, rivers, lakes, oceans, deserts, skies, plants, buildings, and at least one of vehicles. For example, for 2D card games, the virtual scene is a scene for displaying released cards or displaying virtual objects corresponding to cards. Example virtual scenes may include: an arena, a decisive battlefield, or other "field" elements or other elements that can display the status of card battles. For 2D or 3D multiplayer online tactical competitive games, the virtual scene is a 2D or 3D terrain scene for virtual objects to fight. Example virtual scenes may include: canyon-style mountains, routes, rivers, classrooms, tables and chairs, podiums and other elements.

[0031] Target coverings can include fallen leaves, fallen flowers, snowflakes, water stains, confetti, etc., which can be set according to the visual effect to be rendered. If the target covering is fallen leaves, the effect of fallen leaves on the ground or buildings in the scene can be rendered.

[0032] The coverage weight map can be used to indicate the weight of being covered by the target coverage. For example, black pixels indicate that they are not covered by the target coverage at all, white pixels indicate that they are completely covered by the target coverage, and gray pixels indicate that they are not completely covered by the target coverage.

[0033] 102. Determine an image mapping area of the target object model in the coverage weight map according to a position of the target object model included in the scene model.

[0034] The target object model can be an object in the rendered virtual scene, such as a building. If each object model in the scene model has a covering material added, the target object model can be any object model in the scene model; if only some of the object models in the scene model have a covering material added, the target object model can be the object model in the scene model that has a covering material added. If only some of the object models in the scene model have a covering material added, it is necessary to first determine the target object model from multiple object models in the scene model. That is, in one embodiment, the scene model includes multiple object models. Before the step of "determining the image mapping area of the target object model in the coverage weight map based on the position of the target object model contained in the scene model in the scene model", the scene rendering method provided in the embodiment of the present application may also include:

[0035] A target object model is determined from the plurality of object models, the model material of which includes a covering material corresponding to the target covering.

[0036] Specifically, the object model containing the covering material may be marked in advance, so as to determine the target object model from a plurality of object models based on the mark.

[0037] In one embodiment, the scene model includes multiple object models. Before the step of “determining, based on the position of a target object model included in the scene model in the scene model, an image mapping area of the target object model in the coverage weight map,” the scene rendering method provided in the embodiment of the present application may further include:

[0038] Determining the model material of each object model in the scene model;

[0039] According to the model material of each of the objects, a target object model whose model material includes a covering material corresponding to the target covering is determined from the plurality of object models.

[0040] The model material defines the visual effect of the surface of the object model, and the covering material corresponding to the target covering in the model material is used to render the visual effect of being covered by the target covering on the surface of the object model.

[0041] The target object model whose model material contains the covering material corresponding to the target covering can be determined based on the model material of each object model in the scene model. The model material of each object model in the scene model can be traversed to filter out the target object model containing the covering material from multiple object models.

[0042] Since the target cover material is added to the target object model by artists or developers during the production process of the scene model, it may be set incorrectly. Adding a cover material to an object model that does not need to be rendered to be covered by the target cover will cause the object model to incorrectly enable the effect corresponding to the cover, resulting in a waste of computer equipment performance.

[0043] According to the coverage weight map, it can be determined whether the target object model needs the coverage weight map to correspond to the scene model. According to the position of the target object model in the scene model, the image mapping area corresponding to the target object model is determined in the coverage weight map. The relative position of the target object model in the scene model can be the same as the relative position of the image mapping area in the coverage weight map.

[0044] Specifically, the relative position of the target object model in the scene model can be calculated according to the position of the target object model and the size of the scene model. For example, the center position of the target object model is (x, y), the size of the target object model is m×n, the size of the scene model is A×B, and the relative position of the center position of the target object model is The relative size of the target object model in the scene model is Assuming the size of the coverage weight map is 512×512, the center of the image mapping area is determined to be Size

[0045] The size unit of the coverage weight map is pixels, and the size unit of the scene model is physical units, such as meters, centimeters, etc.

[0046] Optionally, the image position corresponding to the scene position of the target object model may be determined based on a preset position mapping relationship, and the image mapping area may be further determined. That is, in one embodiment, the step of "determining the image mapping area of the target object model in the coverage weight map based on the position of the target object model included in the scene model in the scene model" may include:

[0047] Determining a scene position of the target object model in the scene model;

[0048] Determining an image position corresponding to the scene position according to a preset position mapping relationship between the scene model and the coverage weight map;

[0049] An image mapping area of the target object model in the coverage weight map is determined according to the image position.

[0050] Among them, the scene position is the position of the target object model in the scene model. The scene position can be a coordinate or other representation form. The target object model can have multiple scene positions, for example, it can include the positions of each model vertex of the target object model, and can also include the positions of the model vertices at the edge of the target object model in different directions, such as the positions of the model vertices at the edge in the horizontal position and the vertical position.

[0051] In one embodiment, the scene position of the target object model may include the position of a model bounding box corresponding to the target object model. Based on the position of the model bounding box, the mapped image area may be determined in the coverage weight map. That is, in one embodiment, the step of “determining the scene position of the target object model in the scene model” may include:

[0052] Determine a model bounding box corresponding to the target object model;

[0053] The scene position of the target object model in the scene is determined according to the vertex positions of the model bounding box.

[0054] Determine the model bounding box corresponding to the target object model. The model bounding box is a geometric shape that can enclose the target object model, such as a rectangle. According to the positions of the vertices of the model bounding box, that is, the vertex positions, the scene position of the target object model can be determined. For example, the vertex positions of the model bounding box can be used as the scene position of the target object model.

[0055] The image mapping area can be determined in the coverage weight map based on the scene position.

[0056] For example, the scene model and coverage weight map can be as follows Figure 2 As shown, for Figure 2 The scene model on the left and the image mapping area corresponding to the object model in the box are as follows: Figure 2 This is shown in the coverage weight graph on the right.

[0057] The preset position mapping relationship may be a calculation formula, so as to calculate the corresponding image position based on the scene position, and then determine the image mapping area; optionally, the preset position mapping relationship may also include image positions corresponding to different scene positions.

[0058] The image position corresponding to the scene position of the target object model can be determined according to the preset mapping relationship, and the image mapping area corresponding to the target object model can be determined in the coverage weight map based on the image position.

[0059] The preset position mapping relationship may be determined based on the size of the coverage weight map and the size of the scene model. That is, in one embodiment, before the step of “determining the image position corresponding to the scene position based on the preset position mapping relationship corresponding to the scene model and the coverage weight map”, the modified scene rendering method of the present application may further include:

[0060] determining a pixel size of the coverage weight map;

[0061] Determining the spatial size of the scene model;

[0062] The spatial size is converted according to the pixel size to obtain the preset position mapping relationship for indicating different scene positions in the scene model and corresponding image positions in the coverage weight map.

[0063] By determining the pixel size of the coverage weight map, determining the spatial size of the scene model, and converting the spatial size of the scene model according to the pixel size, a relationship formula for mapping the scene position to the image position can be obtained, thereby obtaining a preset position mapping relationship.

[0064] Optionally, the spatial size of the scene model can be converted into the same pixel size as the coverage weight map according to the number of pixels in the coverage weight map, and the scene position corresponding to each pixel in the coverage weight map can be determined to obtain a preset position mapping relationship.

[0065] In one embodiment, the preset position mapping relationship can be a pixel matrix, the number of rows of the pixel matrix is consistent with the number of pixels in each column of the coverage weight map, the number of columns of the pixel matrix is consistent with the number of pixels in each row of the coverage weight map, and the pixel matrix includes the scene position corresponding to each pixel. After determining the scene position, the position of the scene position in the pixel matrix can be determined. Since the size of the pixel matrix is the same as the coverage weight map, the image position corresponding to the scene position can be determined based on the position of the scene position in the pixel matrix.

[0066] Optionally, the preset position mapping relationship may record image positions corresponding to different scene positions in the form of data pairs, such as scene position-image position.

[0067] It is understood that there can be multiple scene models, and multiple scene models can constitute a larger virtual scene, namely a game map. Each scene model can be considered as a plot of land. For example, by dividing the game map, multiple plots can be obtained, and the operations of steps 101 to 104 can be performed for each scene model. If the target object model is located in more than one scene model, the image mapping area corresponding to the target object model can be determined for each scene model. That is, in one embodiment, before the step of "determining the coverage of the target covering on the target object model based on the image mapping area", the scene rendering method provided in the embodiment of the present application can also include:

[0068] If the target object model is a cross-plot model, determining adjacent plots of the scene model in the scene map;

[0069] Determine, according to the position of the target object model in the adjacent land parcel, an image mapping area of the target object model in the adjacent coverage weight map corresponding to the adjacent land parcel;

[0070] The determining, according to the image mapping area, the coverage of the target covering object on the target object model includes:

[0071] determining a first coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the coverage weight map;

[0072] determining a second coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the adjacent coverage weight map;

[0073] The coverage condition of the target object model is determined according to the first coverage condition and the second coverage condition.

[0074] If the target object model is a cross-plot model, determine the plots adjacent to the scene model (i.e., adjacent plots). Specifically, based on the plots associated with the model vertices of the target object model, determine multiple scene models containing the target object model to obtain adjacent plots, where the multiple scene models are two or more; or determine the adjacent plots of the scene model based on the connection relationship between the plots.

[0075] For each plot, the image mapping area of the target object model in the coverage weight map corresponding to the scene model is determined, that is, there are multiple corresponding image mapping areas across the plot model.

[0076] Based on multiple image mapping areas corresponding to the target object model and the plot where it is located, the coverage of the target object model is determined. Specifically, it can be a coverage weight map for each plot where the target object model is located, and the coverage of each weight coverage map for the target object model is determined to determine the overall coverage of the target object model.

[0077] 103. Determine the coverage of the target object model by the target covering according to the image mapping area.

[0078] Specifically, if the black pixels in the coverage weight map indicate that the object model is not covered by the target covering object, the coverage of the target covering object on the target object model can be determined based on the black pixels in the image mapping area. For example, if every pixel in the image mapping area is black, it is determined that the target object model is not covered by the target covering object; otherwise, it is determined that the target object model is covered by the target covering object.

[0079] Optionally, the coverage of the target cover on the target object model can also be determined based on the number or proportion of black pixels in the image mapping area. The coverage indicates whether the target object model is covered by the target cover. For example, if the number or proportion of black pixels in the image mapping area is greater than a preset threshold, it is determined that the target object model is not covered by the target cover; otherwise, it is determined that the target object model is covered by the target cover.

[0080] In one embodiment, the step of “determining the coverage of the target object model by the target covering according to the image mapping area” may include:

[0081] Determine the pixel value of the pixel point in the image mapping area;

[0082] The coverage status of the target covering object on the target object model is determined according to the pixel value and a preset condition, where the coverage status indicates whether the target object model is covered by the target covering object.

[0083] The pixel value of the pixel in the coverage weight map can range from 0 to 1. The preset condition can be that the pixel value of each pixel in the image mapping area is 0, and 0 can represent that the pixel is a black pixel. If the image mapping area is determined to meet the preset condition based on the pixel value of the pixel in the image mapping area, it is determined that the target object model is not covered by the target covering, otherwise it is determined that the target object model is covered by the target covering.

[0084] Since rendering the surface of the target object model to be covered by the target covering requires computing resources of a computer device, the preset conditions may be adjusted according to the rendering performance of the rendering terminal to adapt to the performance of the rendering terminal and improve the smoothness of the display of the rendering terminal. That is, in one embodiment, the preset conditions include a preset threshold and a preset pixel condition, and the preset threshold is determined based on the rendering performance information of the rendering terminal;

[0085] The step of “determining the coverage of the target object model by the target covering according to the pixel values and preset conditions” may include:

[0086] Determine the number of pixel points in the image mapping area whose pixel values meet a preset pixel condition;

[0087] If the number of pixels is greater than the preset threshold, it is determined that the target object model is not covered by the target covering;

[0088] If the number of pixels is not greater than the preset threshold, it is determined that the target object model is covered by the target covering.

[0089] The preset pixel condition may be that the pixel value is greater than a preset pixel threshold, or is equal to a preset pixel value, etc., which may need to be specifically set. In one example, the preset pixel condition may be that the pixel value is 0.

[0090] Determine the number of pixel points in the image mapping area whose pixel values meet the preset pixel conditions. If the number of pixel points is greater than the preset threshold, determine that the target object model is not covered by the target covering; if the number of pixel points is not greater than the preset threshold, determine that the target object model is covered by the target covering.

[0091] Among them, the preset threshold can be determined based on the rendering performance information of the rendering terminal. The better the rendering performance of the rendering terminal, the larger the preset threshold is, and the worse the rendering performance of the rendering terminal, the smaller the preset threshold is. The rendering performance information of the rendering terminal can be determined based on frame rate, rendering time, GPU load, CPU load, etc.

[0092] 104. Render the scene model based on the coverage condition to obtain a rendering result, wherein, for a target object model whose coverage condition indicates that it is not covered by the target cover, rendering is performed based on other model materials except the cover material corresponding to the target cover.

[0093] According to the coverage situation, the target object model in the scene model that is not covered by the target cover can be determined. For the target object model that is not covered by the target cover, the target object model is rendered based on the covering material except for the covering material corresponding to the target cover. For the target object model covered by the target cover, the target object model is rendered based on the covering material and other materials to obtain the rendering result of the scene model.

[0094] In one embodiment, the step of “rendering the scene model based on the coverage condition to obtain a rendering result” includes:

[0095] If the coverage condition indicates that the target object model is not covered by the target cover, turning off the cover material of the target object model;

[0096] The scene model is rendered according to the model materials that are not closed by the multiple object models to obtain a rendering result.

[0097] If the coverage situation indicates that the target object model is not covered by the target cover, the cover material of the target object model is turned off; for multiple object models in the scene model, each object model in the scene model is rendered according to the unclosed model material of each object model to obtain the rendering result of the scene model.

[0098] Optionally, for the target object model covered by the target cover, the target object model can also be rendered based on the image mapping area and the cover material corresponding to the target object model. The pixel value of each pixel in the image mapping area can indicate the weight of the cover material, so as to control the rendering of the target object model covered by the target cover based on the image mapping area.

[0099] As can be seen from the above, the embodiment of the present application obtains a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different positions of the scene model being covered by the target cover; determines the image mapping area of the target object model in the coverage weight map according to the position of the target object model contained in the scene model in the scene model; determines the coverage of the target object model by the target cover according to the image mapping area; renders the scene model based on the coverage to obtain a rendering result, wherein, for the target object model whose coverage indicates that it is not covered by the target cover, rendering is performed based on model materials other than the cover material corresponding to the target cover. The target object model that is not covered by the target cover can be determined based on the coverage weight map, and the cover material of such target object model is turned off to avoid rendering such target object model based on the cover material, thereby reducing waste of computer resources.

[0100] In order to facilitate better implementation of the scene rendering method provided in the embodiment of the present application, a scene rendering device is also provided in one embodiment. The meanings of the terms are the same as those in the above-mentioned scene rendering method, and the specific implementation details can be referred to the description in the method embodiment.

[0101] The scene rendering device can be integrated into a computer device, such as Figure 3 As shown, the scene rendering device may include: an acquisition unit 301, a first determination unit 302, a second determination unit 303 and a rendering unit 304, specifically as follows:

[0102] (1) An acquisition unit 301 is used to acquire a coverage weight map corresponding to a scene model, where the coverage weight map indicates the weights of different locations of the scene model being covered by target covering objects.

[0103] (2) A first determining unit 302 is configured to determine an image mapping area of a target object model in the coverage weight map according to a position of the target object model contained in the scene model in the scene model.

[0104] (3) A second determining unit 303, configured to determine the coverage of the target covering object on the target object model according to the image mapping area.

[0105] (4) A rendering unit 304, configured to render the scene model based on the coverage condition to obtain a rendering result, wherein, for a target object model that is not covered by the target cover as indicated by the coverage condition, rendering is performed based on other model materials except for the cover material corresponding to the target cover.

[0106] In one embodiment, the first determining unit 302 may also be configured to:

[0107] Determining a scene position of the target object model in the scene model;

[0108] Determining an image position corresponding to the scene position according to a preset position mapping relationship between the scene model and the coverage weight map;

[0109] An image mapping area of the target object model in the coverage weight map is determined according to the image position.

[0110] In one embodiment, the scene rendering device may further include:

[0111] A first size acquisition unit, configured to determine a pixel size of the coverage weight map;

[0112] A second size acquisition unit, configured to determine the spatial size of the scene model;

[0113] A conversion unit is used to convert the spatial size according to the pixel size to obtain the preset position mapping relationship for indicating different scene positions in the scene model and corresponding image positions in the coverage weight map.

[0114] In one embodiment, the first determining unit 302 may also be configured to:

[0115] Determine a model bounding box corresponding to the target object model;

[0116] The scene position of the target object model in the scene model is determined according to the vertex positions of the model bounding box.

[0117] In one embodiment, the scene model includes multiple object models, and the scene rendering device may further include:

[0118] A material determination unit, configured to determine the model material of each object model in the scene model;

[0119] The screening unit is configured to determine, from the plurality of object models, a target object model whose model material includes a covering material corresponding to the target covering, based on the model material of each of the objects.

[0120] In one embodiment, the rendering unit 304 may also be used to:

[0121] If the coverage condition indicates that the target object model is not covered by the target cover, turning off the cover material of the target object model;

[0122] The scene model is rendered according to the model materials that are not closed by the multiple object models to obtain a rendering result.

[0123] In one embodiment, the first determining unit 303 may also be configured to:

[0124] If the target object model is a cross-plot model, determining adjacent plots of the scene model in the scene map;

[0125] Determine, according to the position of the target object model in the adjacent land parcel, an image mapping area of the target object model in the adjacent coverage weight map corresponding to the adjacent land parcel;

[0126] The second determining unit 303 may also be configured to:

[0127] determining a first coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the coverage weight map;

[0128] determining a second coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the adjacent coverage weight map;

[0129] The coverage condition of the target object model is determined according to the first coverage condition and the second coverage condition.

[0130] In one embodiment, the second determining unit 303 may also be configured to:

[0131] Determine the pixel value of the pixel point in the image mapping area;

[0132] The coverage status of the target covering object on the target object model is determined according to the pixel value and a preset condition, where the coverage status indicates whether the target object model is covered by the target covering object.

[0133] In one embodiment, the preset condition includes a preset threshold and a preset pixel condition, and the preset threshold is determined based on rendering performance information of the rendering terminal;

[0134] The second determining unit 303 may also be configured to:

[0135] Determine the number of pixel points in the image mapping area whose pixel values meet a preset pixel condition;

[0136] If the number of pixels is greater than the preset threshold, it is determined that the target object model is not covered by the target covering;

[0137] If the number of pixels is not greater than the preset threshold, it is determined that the target object model is covered by the target covering.

[0138] As can be seen from the above, the scene rendering device of the embodiment of the present application obtains the coverage weight map corresponding to the scene model through the acquisition unit 301, and the coverage weight map is used to indicate the weights of different positions of the scene model being covered by the target cover; the first determination unit 302 determines the image mapping area of the target object model in the coverage weight map according to the position of the target object model contained in the scene model in the scene model; the second determination unit 303 determines the coverage of the target cover for the target object model according to the image mapping area; the rendering unit 304 renders the scene model based on the coverage situation to obtain a rendering result, wherein, for the target object model indicated by the coverage situation as not covered by the target cover, the rendering is performed based on other model materials except the covering material corresponding to the target cover, so that the target object model not covered by the target cover can be determined based on the coverage weight map, and the covering material of such target object model can be turned off to avoid rendering such target object model based on the covering material, thereby reducing the waste of computer resources.

[0139] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal. Figure 4 As shown, Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation of the computer device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0140] The processor 501 is the control center of the computer device 500. It uses various interfaces and lines to connect various parts of the entire computer device 500. By running or loading software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device 500 and processes data, thereby monitoring the computer device 500 as a whole.

[0141] In the embodiment of the present application, the processor 501 in the computer device 500 loads instructions corresponding to one or more application processes into the memory 502 according to the following steps, and the processor 501 runs the application stored in the memory 502 to implement various functions:

[0142] Obtaining a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different locations of the scene model being covered by the target covering object;

[0143] Determining an image mapping area of the target object model in the coverage weight map according to a position of the target object model contained in the scene model in the scene model;

[0144] Determining coverage of the target object model by the target covering according to the image mapping area;

[0145] The scene model is rendered based on the coverage condition to obtain a rendering result, wherein for a target object model whose coverage condition indicates that it is not covered by the target cover, the rendering is performed based on other model materials except the cover material corresponding to the target cover.

[0146] In one embodiment, determining the image mapping area of the target object model in the coverage weight map according to the position of the target object model included in the scene model in the scene model includes:

[0147] Determining a scene position of the target object model in the scene model;

[0148] Determining an image position corresponding to the scene position according to a preset position mapping relationship between the scene model and the coverage weight map;

[0149] An image mapping area of the target object model in the coverage weight map is determined according to the image position.

[0150] In one embodiment, before determining the image position corresponding to the scene position based on the preset position mapping relationship between the scene model and the coverage weight map, the method further includes:

[0151] determining a pixel size of the coverage weight map;

[0152] Determining the spatial size of the scene model;

[0153] The spatial size is converted according to the pixel size to obtain the preset position mapping relationship for indicating different scene positions in the scene model and corresponding image positions in the coverage weight map.

[0154] In one embodiment, determining the scene position of the target object model in the scene model includes:

[0155] Determine a model bounding box corresponding to the target object model;

[0156] The scene position of the target object model in the scene model is determined according to the vertex positions of the model bounding box.

[0157] In one embodiment, the scene model includes a plurality of object models, and before determining the image mapping area of the target object model in the coverage weight map based on the position of the target object model included in the scene model, the method further includes:

[0158] Determining the model material of each object model in the scene model;

[0159] According to the model material of each of the objects, a target object model whose model material includes a covering material corresponding to the target covering is determined from the plurality of object models.

[0160] In one embodiment, rendering the scene model based on the coverage condition to obtain a rendering result includes:

[0161] If the coverage condition indicates that the target object model is not covered by the target cover, turning off the cover material of the target object model;

[0162] The scene model is rendered according to the model materials that are not closed by the multiple object models to obtain a rendering result.

[0163] In one embodiment, before determining the coverage of the target object model by the target covering according to the image mapping area, the method further includes:

[0164] If the target object model is a cross-plot model, determining adjacent plots of the scene model in the scene map;

[0165] Determine, according to the position of the target object model in the adjacent land parcel, an image mapping area of the target object model in the adjacent coverage weight map corresponding to the adjacent land parcel;

[0166] The determining, according to the image mapping area, the coverage of the target covering object on the target object model includes:

[0167] determining a first coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the coverage weight map;

[0168] determining a second coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the adjacent coverage weight map;

[0169] The coverage condition of the target object model is determined according to the first coverage condition and the second coverage condition.

[0170] In one embodiment, determining the coverage of the target object model by the target covering according to the image mapping area includes:

[0171] Determine the pixel value of the pixel point in the image mapping area;

[0172] The coverage status of the target covering object on the target object model is determined according to the pixel value and a preset condition, where the coverage status indicates whether the target object model is covered by the target covering object.

[0173] In one embodiment, the preset condition includes a preset threshold and a preset pixel condition, and the preset threshold is determined based on rendering performance information of the rendering terminal;

[0174] The determining, based on the pixel values and a preset condition, the coverage of the target object model by the target covering object includes:

[0175] Determine the number of pixel points in the image mapping area whose pixel values meet a preset pixel condition;

[0176] If the number of pixels is greater than the preset threshold, it is determined that the target object model is not covered by the target covering;

[0177] If the number of pixels is not greater than the preset threshold, it is determined that the target object model is covered by the target covering.

[0178] As can be seen from the above, the embodiment of the present application obtains a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different positions of the scene model covered by the target cover; determines the image mapping area of the target object model in the coverage weight map according to the position of the target object model contained in the scene model in the scene model; determines the coverage of the target cover on the target object model according to the image mapping area; renders the scene model based on the coverage to obtain a rendering result, wherein, for the target object model indicated by the coverage not being covered by the target cover, rendering is performed based on model materials other than the cover material corresponding to the target cover, thereby determining the target object model not covered by the target cover based on the coverage weight map, and turning off the cover material of such target object model, thereby avoiding rendering of such target object model based on the cover material, and reducing waste of computer resources.

[0179] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0180] Optional, such as Figure 4 As shown, the computer device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. Among them, the processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507 respectively. It can be understood by those skilled in the art that Figure 4 The computer device structure shown in the figure does not constitute a limitation to the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0181] The touch display screen 503 can be used for displaying a graphical user interface and receiving the operation instructions generated by the user acting on the graphical user interface. The touch display screen 503 can include a display panel and a touch panel. Among them, the display panel can be used for displaying the information input by the user or the information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used for collecting the touch operation of the user thereon or near it (such as the user uses any suitable object or accessory such as a finger, a stylus on the touch panel or near the touch panel), and generates corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 501, and can receive the command sent by the processor 501 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize input and output functions. That is, the touch display screen 503 can also be used as part of the input unit 506 to realize the input function.

[0182] The radio frequency circuit 504 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other computer device through wireless communication, and to transmit and receive signals between the network device or other computer device.

[0183] Audio circuit 505 can be used to provide an audio interface between the user and the computer device through a speaker and microphone. Audio circuit 505 can convert received audio data into electrical signals and transmit them to the speaker, which then converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 505 and converted into audio data. The audio data is then output to processor 501 for processing, then transmitted via RF circuit 504 to, for example, another computer device, or to memory 502 for further processing. Audio circuit 505 may also include an earphone jack to allow communication between external headphones and the computer device.

[0184] The input unit 506 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0185] Power supply 507 is used to supply power to various components of computer device 500. Optionally, power supply 507 can be logically connected to processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 507 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0186] although Figure 4 Not shown in the figure, the computer device 500 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0187] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0188] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0189] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute the steps of any of the scene rendering methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0190] Obtaining a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different locations of the scene model being covered by the target covering object;

[0191] Determining an image mapping area of the target object model in the coverage weight map according to a position of the target object model contained in the scene model in the scene model;

[0192] Determining coverage of the target object model by the target covering according to the image mapping area;

[0193] The scene model is rendered based on the coverage condition to obtain a rendering result, wherein for a target object model whose coverage condition indicates that it is not covered by the target cover, the rendering is performed based on other model materials except the cover material corresponding to the target cover.

[0194] As can be seen from the above, the embodiment of the present application obtains a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different positions of the scene model covered by the target cover; determines the image mapping area of the target object model in the coverage weight map according to the position of the target object model contained in the scene model in the scene model; determines the coverage of the target cover on the target object model according to the image mapping area; renders the scene model based on the coverage to obtain a rendering result, wherein, for the target object model indicated by the coverage not being covered by the target cover, rendering is performed based on model materials other than the cover material corresponding to the target cover, thereby determining the target object model not covered by the target cover based on the coverage weight map, and turning off the cover material of such target object model, thereby avoiding rendering of such target object model based on the cover material, and reducing waste of computer resources.

[0195] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0196] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0197] The above is a detailed introduction to a scene rendering method, device, computer equipment and computer storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A scene rendering method, characterized in that: include: Obtaining a coverage weight map corresponding to the scene model, where the coverage weight map is used to indicate the weights of different positions of the scene model being covered by target covering objects; Determining an image mapping area of the target object model in the coverage weight map according to a position of the target object model included in the scene model in the scene model; Determining, according to the image mapping area, the coverage of the target covering on the target object model; The scene model is rendered based on the coverage condition to obtain a rendering result, wherein for a target object model that the coverage condition indicates is not covered by the target cover, rendering is performed based on other model materials except the cover material corresponding to the target cover.

2. The method according to claim 1, characterized in that The determining, according to the position of the target object model included in the scene model in the scene model, the image mapping area of the target object model in the coverage weight map comprises: Determining a scene position of the target object model in the scene model; Determining an image position corresponding to the scene position according to a preset position mapping relationship between the scene model and the coverage weight map; An image mapping area of the target object model in the coverage weight map is determined according to the image position.

3. The method according to claim 2, characterized in that Before determining the image position corresponding to the scene position based on the preset position mapping relationship between the scene model and the coverage weight map, the method further includes: determining a pixel size of the coverage weight map; Determining the spatial size of the scene model; The spatial size is converted according to the pixel size to obtain the preset position mapping relationship for indicating different scene positions in the scene model and corresponding image positions in the coverage weight map.

4. The method according to claim 2, characterized in that Determining the scene position of the target object model in the scene model includes: Determine a model bounding box corresponding to the target object model; The scene position of the target object model in the scene model is determined according to the vertex positions of the model bounding box.

5. The method according to claim 1, wherein The scene model includes a plurality of object models, and before determining the image mapping area of the target object model in the coverage weight map based on the position of the target object model included in the scene model in the scene model, the method further includes: Determining the model material of each object model in the scene model; According to the model material of each of the objects, a target object model whose model material includes a covering material corresponding to the target covering is determined from the plurality of object models.

6. The method according to claim 5, characterized in that The rendering of the scene model based on the coverage condition to obtain a rendering result includes: If the coverage condition indicates that the target object model is not covered by the target cover, turning off the cover material of the target object model; The scene model is rendered according to the model materials that are not closed by the multiple object models to obtain a rendering result.

7. The method according to claim 1, characterized in that The scene model is a plot of land in a scene map. Before determining the coverage of the target object model by the target covering object according to the image mapping area, the method further includes: If the target object model is a cross-plot model, determining adjacent plots of the scene model in the scene map; Determine, according to the position of the target object model in the adjacent land parcel, an image mapping area of the target object model in the adjacent coverage weight map corresponding to the adjacent land parcel; The determining, according to the image mapping area, the coverage of the target covering object on the target object model includes: determining a first coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the coverage weight map; determining a second coverage condition of the target object model by the target covering object according to an image mapping area of the target object model in the adjacent coverage weight map; The coverage condition of the target object model is determined according to the first coverage condition and the second coverage condition.

8. The method according to any one of claims 1 to 7, characterized in that The determining, according to the image mapping area, the coverage of the target covering object on the target object model includes: Determine the pixel value of the pixel point in the image mapping area; The coverage status of the target covering object on the target object model is determined according to the pixel value and a preset condition, where the coverage status indicates whether the target object model is covered by the target covering object.

9. The method according to claim 8, characterized in that The preset condition includes a preset threshold and a preset pixel condition, and the preset threshold is determined based on rendering performance information of the rendering terminal; The determining, based on the pixel values and a preset condition, the coverage of the target object model by the target covering object includes: Determine the number of pixel points in the image mapping area whose pixel values meet a preset pixel condition; If the number of pixels is greater than the preset threshold, it is determined that the target object model is not covered by the target covering; If the number of pixels is not greater than the preset threshold, it is determined that the target object model is covered by the target covering.

10. A scene rendering device, characterized in that: include: an acquiring unit, configured to acquire a coverage weight map corresponding to the scene model, wherein the coverage weight map is used to indicate the weights of different positions of the scene model being covered by the target covering object; a first determining unit, configured to determine an image mapping area of the target object model in the coverage weight map according to a position of the target object model included in the scene model in the scene model; a second determining unit, configured to determine, according to the image mapping area, a coverage condition of the target covering object on the target object model; A rendering unit is configured to render the scene model based on the coverage condition to obtain a rendering result, wherein for a target object model indicated by the coverage condition as not covered by the target cover, rendering is performed based on other model materials except a cover material corresponding to the target cover.

11. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the scene rendering method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the scene rendering method according to any one of claims 1 to 9.