Rendering display method, device, computer equipment and storage medium
By using point cloud models to filter the rendering location of virtual objects in game scenarios, the problem of inefficient rendering and display of multiple virtual objects is solved, and efficient virtual object deployment and rendering is achieved.
Patent Information
- Application Number
- CN202210203604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-03-02
AI Technical Summary
In application scenarios such as game scenarios, the rendering and display of multiple virtual objects is inefficient because the location of deployed virtual objects needs to be frequently checked to avoid duplication, resulting in inefficiency.
Using the point cloud model of the target terrain area, we can determine the rendering location of the virtual object by filtering point cloud points, ensuring that no different types of virtual objects are deployed at the same cloud point, and improve efficiency.
Through point cloud model filtering, repeated inspections are avoided, the efficiency of virtual object deployment is improved, and the efficiency of rendering and display is ensured.
Smart Images

Figure CN114565710B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a rendering display method, apparatus, computer equipment, and storage medium. Background Art
[0002] In application scenarios such as gaming, there is a need to render and display multiple virtual objects within the scene. When determining the display positions of multiple virtual objects within the scene, in some cases, due to the large number of virtual objects, one type of virtual object may be deployed first, and then the next type of virtual object to be deployed in the scene may be determined from the remaining types of virtual objects.
[0003] Since two virtual objects should not exist at the same location, when deploying a new virtual object in the scene, it is also necessary to recheck whether there are multiple virtual objects at the location of each currently deployed virtual object in the scene, and then retain at most one virtual object from them; this approach is inefficient. Summary of the Invention
[0004] The embodiments of the present disclosure at least provide a rendering display method, apparatus, computer equipment, and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a rendering and display method, which is applied to rendering and displaying a target terrain area; a plurality of virtual objects to be deployed are set in the target terrain area, and the rendering and display method includes: determining a point cloud model corresponding to the target terrain area; the point cloud model includes a plurality of point cloud points representing the target terrain area; determining a target virtual object currently to be deployed from the plurality of virtual objects to be deployed in the target terrain area; based on display attribute information corresponding to the target virtual object, filtering out a target point cloud point corresponding to the target virtual object from the plurality of point cloud points; based on position information of the target point cloud point in the point cloud model, determining a rendering position of the target virtual object in the target terrain area, and rendering and displaying the target virtual object in the target terrain area based on the rendering position.
[0006] In an optional implementation, the display attribute information corresponding to the target virtual object includes at least one of the following: a display height range, a display slope range, and a display angle range of the target virtual object.
[0007] In an optional embodiment, when the display attribute information corresponding to the target virtual object includes the display height range of the target object, the target point cloud points corresponding to the target virtual object are screened out from the multiple point cloud points based on the display attribute information corresponding to the target virtual object, including: determining the height information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model; the height information includes the height coordinates of the point cloud points in the model coordinate system of the point cloud model; based on the height information corresponding to the multiple point cloud points and the display height range, the point cloud points with corresponding height information within the display height range are screened out from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0008] In an optional embodiment, when the display attribute information corresponding to the target virtual object includes the display slope range of the target object, the target point cloud points corresponding to the target virtual object are screened out from the multiple point cloud points based on the display attribute information corresponding to the target virtual object, including: determining the slope information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model; based on the slope information corresponding to the multiple point cloud points and the display slope range, screening out point cloud points with corresponding slope information within the display slope range from the multiple point cloud points as target point cloud points corresponding to the target virtual object.
[0009] In an optional embodiment, the determining of the slope information respectively corresponding to the multiple point cloud points based on the position information respectively corresponding to the multiple point cloud points in the point cloud model includes: determining, from the multiple point cloud points, a reference point cloud point for characterizing the bottom surface boundary of the target terrain area based on the position information respectively corresponding to the multiple point cloud points; for each point cloud point in the multiple point cloud points, determining, based on the position information corresponding to the point cloud point and the position information respectively corresponding to the multiple reference point cloud points, the distance information respectively corresponding to the point cloud point and the multiple reference point cloud points; determining, based on the distance information respectively corresponding to the point cloud point and the multiple reference point cloud points, a corresponding target reference point cloud point in the multiple reference point cloud points; and determining the slope information corresponding to the point cloud point based on the position information corresponding to the point cloud point and the reference position information corresponding to the target reference point cloud point.
[0010] In an optional embodiment, before rendering and displaying the target virtual object in the target terrain area based on the rendering position, the method further includes: determining point cloud attribute information of a target point cloud point corresponding to the target virtual object; the point cloud attribute information includes a reference path of virtual model information of the target virtual object in the memory; rendering and displaying the target virtual object in the target terrain area based on the rendering position includes: obtaining virtual model information corresponding to the target virtual object from the memory based on the reference path contained in the point cloud attribute information of the target point cloud point; rendering and displaying the target virtual object in the target terrain area based on the rendering position and the virtual model information.
[0011] In an optional embodiment, the point cloud attribute information of the target point cloud point also includes: display orientation information of the target virtual object; rendering and displaying the target virtual object in the target terrain area based on the rendering position includes: determining the target display orientation when rendering and displaying the target virtual object based on the display orientation information contained in the point cloud attribute information of the target point cloud point; rendering and displaying the target virtual object in the target terrain area based on the rendering position and the target display orientation.
[0012] In a second aspect, an embodiment of the present disclosure further provides a rendering and display device, which is used for rendering and displaying a target terrain area; a plurality of virtual objects to be deployed are set in the target terrain area; the rendering and display device includes: a first determination module, which is used to determine a point cloud model corresponding to the target terrain area; the point cloud model includes a plurality of point cloud points representing the target terrain area; a second determination module, which is used to determine the target virtual object to be currently deployed from the plurality of virtual objects to be deployed in the target terrain area; a screening module, which is used to screen out target point cloud points corresponding to the target virtual object from the plurality of point cloud points based on display attribute information corresponding to the target virtual object; a rendering and display module, which is used to determine the rendering position of the target virtual object in the target terrain area based on the position information of the target point cloud points in the point cloud model, and render and display the target virtual object in the target terrain area based on the rendering position.
[0013] In an optional implementation, the display attribute information corresponding to the target virtual object includes at least one of the following: a display height range, a display slope range, and a display angle range of the target virtual object.
[0014] In an optional embodiment, when the display attribute information corresponding to the target virtual object includes the display height range of the target object, the screening module is used to: determine the height information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model; the height information includes the height coordinates of the point cloud points in the model coordinate system of the point cloud model; based on the height information corresponding to the multiple point cloud points and the display height range, screen out the point cloud points whose corresponding height information is within the display height range from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0015] In an optional embodiment, when the display attribute information corresponding to the target virtual object includes the display slope range of the target object, the screening module, when screening out the target point cloud points corresponding to the target virtual object from the multiple point cloud points based on the display attribute information corresponding to the target virtual object, is used to: determine the slope information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model; based on the slope information corresponding to the multiple point cloud points and the display slope range, screen out the point cloud points whose corresponding slope information is within the display slope range from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0016] In an optional embodiment, when determining the slope information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model, the screening module is used to: determine, from the multiple point cloud points, a reference point cloud point used to characterize the bottom surface boundary of the target terrain area based on the position information corresponding to the multiple point cloud points; for each point cloud point in the multiple point cloud points, determine, based on the position information corresponding to the point cloud point and the position information corresponding to the multiple reference point cloud points, the distance information corresponding to the point cloud point and the multiple reference point cloud points; determine, based on the distance information corresponding to the point cloud point and the multiple reference point cloud points, a corresponding target reference point cloud point in the multiple reference point cloud points; and determine the slope information corresponding to the point cloud point based on the position information corresponding to the point cloud point and the reference position information corresponding to the target reference point cloud point.
[0017] In an optional embodiment, before rendering and displaying the target virtual object in the target terrain area based on the rendering position, the rendering and display module is further used to: determine the point cloud attribute information of the target point cloud point corresponding to the target virtual object; the point cloud attribute information includes the reference path of the virtual model information of the target virtual object in the memory; when the rendering and display module renders and displays the target virtual object in the target terrain area based on the rendering position, it is used to: obtain the virtual model information corresponding to the target virtual object from the memory based on the reference path contained in the point cloud attribute information of the target point cloud point; and render and display the target virtual object in the target terrain area based on the rendering position and the virtual model information.
[0018] In an optional embodiment, the point cloud attribute information of the target point cloud point also includes: display orientation information of the target virtual object; when the rendering and display module renders and displays the target virtual object in the target terrain area based on the rendering position, it is used to: determine the target display orientation when rendering and displaying the target virtual object based on the display orientation information contained in the point cloud attribute information of the target point cloud point; render and display the target virtual object in the target terrain area based on the rendering position and the target display orientation.
[0019] In a third aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps of the above-mentioned first aspect, or any possible implementation of the first aspect.
[0020] In a fourth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, it executes the steps of the above-mentioned first aspect or any possible implementation of the first aspect.
[0021] For a description of the effects of the above-mentioned rendering and display device, computer equipment, and computer-readable storage medium, please refer to the description of the above-mentioned rendering and display method, which will not be repeated here.
[0022] The rendering and display method, apparatus, computer equipment, and storage medium provided by the embodiments of the present disclosure utilize the positions of each point cloud point in the point cloud model of the target terrain area to determine the positions of multiple virtual objects to be deployed. When determining the target virtual object to be deployed, a screening method is used to determine the target point cloud points at which the target virtual object can be deployed from the point cloud points to determine the rendering position corresponding to the target virtual object. In this screening method, the point cloud points of the deployed virtual objects have been screened out in the previous deployment process. When determining the rendering position for the virtual object to be deployed, the situation of deploying multiple different types of virtual objects at the same point cloud point will not occur. There is no need to check whether there are multiple virtual objects at each point cloud point where the virtual object is deployed, so the efficiency is also higher.
[0023] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.
[0025] Figure 1 A flowchart of a rendering and display method provided by an embodiment of the present disclosure is shown;
[0026] Figure 2 A schematic diagram showing a portion of point cloud points determined for a target terrain area provided by an embodiment of the present disclosure is shown;
[0027] Figure 3 A schematic diagram showing a bottom boundary of a target terrain area provided by an embodiment of the present disclosure is shown;
[0028] Figure 4 A simplified schematic diagram of determining slope information using position information of point cloud points provided by an embodiment of the present disclosure is shown;
[0029] Figure 5 A schematic diagram of a rendering and display device provided by an embodiment of the present disclosure is shown;
[0030] Figure 6 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.
[0032] After research, it was found that in application scenarios such as game scenes, when multiple virtual objects are rendered and displayed, the virtual objects to be deployed are deployed according to the scene. First, one of the virtual objects is deployed in the scene, and then the deployment and addition of the remaining types of virtual objects are continued for the scene. Since there should not be two virtual objects at the same position in the scene, when some virtual objects have been deployed in the scene, after continuing to add and deploy new virtual objects to the scene, it is also necessary to check whether new virtual objects are deployed at the positions of the deployed virtual objects, and then filter them to retain at most one virtual object at that position. In this way, each time a new type of virtual object is deployed, it is necessary to check whether there are multiple virtual objects at all currently deployed positions, which will lead to low efficiency problems.
[0033] Based on the above research, the present disclosure provides a rendering and display method, which uses the positions of each point cloud point in the point cloud model of the target terrain area to determine the positions of multiple virtual objects to be deployed. When the target virtual object to be deployed is determined, a screening method is used to determine the target point cloud points where the target virtual object can be deployed from the point cloud points to determine the rendering position corresponding to the target virtual object. Under this screening method, the point cloud points of the deployed virtual objects have been screened out in the previous deployment process. When determining the rendering position for the virtual object to be deployed, there will be no situation where multiple different types of virtual objects are deployed at the same point cloud point. There is no need to check whether there are multiple virtual objects at each point cloud point where the virtual object is deployed, so the efficiency is also higher.
[0034] The defects in the above solutions are the results obtained by the inventors after practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed by this disclosure for the above problems below should be the contributions made by the inventors to this disclosure during the disclosure process.
[0035] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0036] To facilitate understanding of this embodiment, a rendering and display method disclosed in an embodiment of the present disclosure is first described in detail. The execution subject of the rendering and display method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities. The computer device includes, for example, a terminal device or a server or other processing device. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. In some possible implementations, the rendering and display method can be implemented by a processor calling computer-readable instructions stored in a memory.
[0037] The rendering and display method provided by the embodiment of the present disclosure can be applied to scenes such as the gaming field, animation and film and television production, for example, in the gaming field, it can be applied to the production of game scenes, or in the animation and film and television production scene, it can be applied to the production of animation scenes. In a specific implementation, the game scene or the animation scene, etc., is used as the target terrain area described in the embodiment of the present disclosure. In the target terrain area, there may be a variety of virtual objects to be deployed. The virtual objects described here include, for example, plants, buildings, animals, etc.; taking plants as an example, they can also be refined into moss, shrubs, grass, woods, etc. Different types of virtual objects, such as moss and shrubs, grow in different terrains in real scenes. Therefore, when determining the corresponding positions of different virtual objects in the scene, in order to improve the authenticity of the scene, the embodiment of the present disclosure also takes into account the terrain characteristics of different virtual objects when they are placed when determining the deployment positions of different virtual objects, so that the obtained target terrain area is more realistic.
[0038] The rendering and display method provided by the embodiment of the present disclosure is described below.
[0039] See also Figure 1 FIG. 1 is a flowchart of a rendering and display method provided by an embodiment of the present disclosure, wherein the method includes steps S101 to S104, wherein:
[0040] S101: Determine a point cloud model corresponding to the target terrain area; the point cloud model includes a plurality of point cloud points representing the target terrain area;
[0041] S102: Determining a target virtual object to be deployed currently from a plurality of virtual objects to be deployed in the target terrain area;
[0042] S103: Filtering target point cloud points corresponding to the target virtual object from the plurality of point cloud points based on display attribute information corresponding to the target virtual object;
[0043] S104: Determine a rendering position of the target virtual object in the target terrain area based on the position information of the target point cloud point in the point cloud model, and render and display the target virtual object in the target terrain area based on the rendering position.
[0044] The above S101 to S104 are described in detail below.
[0045] Regarding S101 and S102 above, the target terrain area is first described. When determining the target terrain area, in one possible scenario, the size of the target terrain area can be determined, a plurality of pixels included in the target terrain area can be determined, and then pixel values or height values can be determined for each pixel. This allows adjacent pixels in the target terrain area to produce a terrain variation feature with varying heights due to differences in corresponding pixel values or height values.
[0046] When determining the point cloud model corresponding to the target terrain area, for example, the target terrain area can be fitted based on the pixel value or height value of each pixel in the target terrain area to generate the corresponding terrain model. Then, by determining the sparseness of the point cloud distribution on the terrain model surface, the point cloud fitting process can be performed on the terrain model surface to obtain the corresponding point cloud model. Alternatively, a masking process can be used to determine the corresponding point cloud model for the target terrain area, thereby determining multiple point cloud points in the point cloud model. Figure 2 FIG2 is a schematic diagram of a portion of point cloud points determined for a target terrain area according to an embodiment of the present disclosure. Therefore, the multiple point cloud points included in the point cloud model are determined by the pixel points of the target terrain area, and thus can express the terrain characteristics of the target terrain area.
[0047] Then, a variety of virtual objects to be deployed in the target terrain area are described. Exemplarily, the various virtual objects include moss, trees, and sheds. For different virtual objects, the corresponding terrain features in the real scene are different. For example, moss will grow in areas with lower altitudes and backlight, trees will grow in areas with lower slopes, and sheds will be set up in areas with relatively flat terrain. In order to improve the authenticity of the target terrain area, when determining the display positions of different virtual objects in the target terrain area, the deployment positions in the target terrain area will be determined based on the terrain features corresponding to them in the real scene.
[0048] When determining the target virtual object to be deployed from among the multiple virtual objects to be deployed, selection can be made from the multiple virtual objects based on actual circumstances. In one possible scenario, due to the rendering and display method provided by the disclosed embodiments, after determining corresponding point cloud points for a virtual object to deploy the virtual object in the target terrain area, point cloud points corresponding to a new virtual object are selected from other point cloud points. Therefore, for the virtual object determined to be deployed in advance, it has more locations to choose from within the target terrain area.
[0049] Thus, for the three virtual objects of moss, trees, and sheds, if the actual deployment requirements require that a certain number of sheds be secured first, then the sheds can be selected as the target virtual objects to be deployed. As for moss and trees, moss is used for detailed decoration in the actual deployment requirements and is less important than trees. Therefore, after the sheds are deployed in the target terrain area, the trees can be selected as the new target virtual objects to be deployed. Furthermore, after the trees are deployed in the target terrain area, the moss can be selected as the target virtual objects to be deployed during the last virtual object deployment.
[0050] Regarding the above S103, when multiple point cloud points representing the target terrain area and the target virtual object currently to be deployed are determined, the target point cloud points corresponding to the target virtual object can be filtered out from the multiple point cloud points based on the display attribute information corresponding to the target virtual object.
[0051] Here, the display attribute information corresponding to the target virtual object includes, but is not limited to, at least one of the following: the target virtual object's display height range, display slope range, and display angle range. Below, we will describe in detail how to determine the target point cloud point for the target virtual object based on each of the three types of display attribute information.
[0052] a. Based on the display height range corresponding to the target virtual object, filter out the point cloud points corresponding to the target virtual object from multiple point cloud points.
[0053] In a specific implementation, the following method can be specifically adopted under this method: based on the position information corresponding to the multiple point cloud points in the point cloud model, the height information corresponding to the multiple point cloud points is determined; the height information includes the height coordinates of the point cloud points in the model coordinate system of the point cloud model; based on the height information corresponding to the multiple point cloud points, and the display height range, the point cloud points with corresponding height information within the display height range are filtered out from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0054] For a point cloud model, for example, a corresponding model coordinate system can be established. The method for establishing the model coordinate system of the point cloud model can be determined based on actual conditions and is not limited here. By establishing the model coordinate system, the corresponding position information of multiple point cloud points can be determined, such as the horizontal coordinate, vertical coordinate, and height coordinate in the model coordinate system; the height coordinate representing the height information in the position information can represent the height position of the point cloud point in the point cloud model.
[0055] According to the above description of virtual objects, it can be known that some types of virtual objects will have certain height restrictions when they exist in real scenes, such as moss, which will exist in low-lying areas. Therefore, when the target virtual object to be deployed is determined, the display height range corresponding to the target virtual object can be determined according to the corresponding deployment height requirements of the target virtual object. For example, if the target virtual object is moss, and its growth range in the real scene is between 0 meters and 0.5 meters in height, the display height range of the moss in the model coordinate system can be determined according to the scale of the target terrain area and the display scene.
[0056] In this way, when the height position of each point cloud point in the point cloud model and the display height range of the target virtual object in the model coordinate system can be determined, it is possible to filter from multiple point cloud points according to the display height range to obtain point cloud points whose corresponding height information meets the display height range as the target point cloud points corresponding to the target virtual object.
[0057] b. Based on the displayed slope range corresponding to the target virtual object, select the point cloud points corresponding to the target virtual object from the multiple point cloud points.
[0058] In a specific implementation, the following method can be specifically adopted under this method: based on the position information corresponding to the multiple point cloud points in the point cloud model, the slope information corresponding to the multiple point cloud points is determined; based on the slope information corresponding to the multiple point cloud points and the displayed slope range, the point cloud points with corresponding slope information within the displayed slope range are filtered out from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0059] Among them, the method of determining the position information corresponding to multiple point cloud points in the point cloud model can be referred to the description in a above, and will not be repeated here.
[0060] When using the position information of a point cloud point to determine the slope information corresponding to a plurality of point cloud points, the following method can be specifically adopted, for example: based on the position information corresponding to the plurality of point cloud points, a reference point cloud point used to characterize the bottom surface boundary of the target terrain area is determined from the plurality of point cloud points; for each point cloud point in the plurality of point cloud points, based on the position information corresponding to the point cloud point and the position information corresponding to the plurality of reference point cloud points, the distance information corresponding to the point cloud point and the plurality of reference point cloud points is determined; based on the distance information corresponding to the point cloud point and the plurality of reference point cloud points, a corresponding target reference point cloud point is determined in the plurality of reference point cloud points; based on the position information corresponding to the point cloud point and the reference position information corresponding to the target reference point cloud point, the slope information corresponding to the point cloud point is determined.
[0061] After determining the position information corresponding to the plurality of point cloud points, the reference point cloud point located at the bottom boundary of the target terrain area can be determined. Figure 3 The figure shows a schematic diagram of the bottom boundary of a target terrain area provided by an embodiment of the present disclosure; wherein, the bottom boundary of the target terrain area is outlined. In one possible case, in order to facilitate the description of the target reference point cloud, Figure 3 A three-dimensional coordinate system is established as shown in the figure, where the origin o is on the bottom surface, the plane where the x-axis and y-axis are located is also the bottom surface, the y-axis faces the square and is therefore not displayed, and the z-axis can be used to determine the height information of the point cloud points above the bottom surface.
[0062] At the location of the bottom boundary, there are also multiple point cloud points, which are referred to as reference point cloud points. Figure 3 In the coordinate system shown, the height information of the reference point cloud points is all 0. For each point cloud point in the multiple point cloud points, based on the position information corresponding to the point cloud point and the position information corresponding to each reference point cloud point, the distance information corresponding to the point cloud point and the multiple reference point cloud points can be determined. The reference point cloud point with the smallest corresponding distance information can then be selected as the target reference point cloud point corresponding to the point cloud point.
[0063] For any point cloud point, when the corresponding target reference point cloud point is determined, the slope information corresponding to the point cloud point can be determined based on the position information corresponding to the point cloud point and the position information corresponding to the target reference point cloud point. Figure 4As shown, it is a simplified schematic diagram of an embodiment of the present disclosure for determining slope information using the position information of a point cloud point. In this schematic diagram, only the z-axis and the y-axis are shown, and the positions of the point cloud point and the corresponding target reference point cloud point are marked accordingly. In one possible case, if for any point cloud point, after determining the corresponding target reference point cloud point through distance information, it can be determined that the coordinates of the point cloud point and the target reference point cloud point in the coordinate system are the same or close to each other in the x-axis, so it is not explained in the diagram, and the z-axis and the y-axis are displayed on the same plane. According to Figure 4 It can be determined that when the position information corresponding to the point cloud point and the target reference point cloud point is determined, the angle α can be determined. The angle α described here can represent the slope information corresponding to the point cloud point.
[0064] Here, the above method of determining slope information for point cloud points is only a specific example provided in the embodiment of the present disclosure. Other optional methods of determining slope information for point cloud points are all within the scope of protection of the present disclosure. In specific implementations, the method of determining slope information is not limited.
[0065] Similar to a above, some types of virtual objects may have certain slope restrictions when they exist in real scenes, such as sheds that are built in locations with lower slopes. Therefore, after determining the target virtual object to be deployed, the display slope range corresponding to the target virtual object can be determined based on the corresponding deployment slope requirements of the target virtual object. For example, if the target virtual object is a shed, most of it is built in a slope range of 0 to 10 degrees in real scenes, then the display slope range can be determined to be 0 to 10 degrees accordingly.
[0066] In this way, when the slope information of each point cloud point in the point cloud model and the display slope range of the target virtual object in the model coordinate system can be determined, it is possible to filter from multiple point cloud points according to the display slope range to obtain point cloud points whose corresponding slope information meets the display slope range as the target point cloud points corresponding to the target virtual object.
[0067] c. Based on the display angle range corresponding to the target virtual object, filter out the point cloud points corresponding to the target virtual object from multiple point cloud points.
[0068] The display angle range of the target virtual object can, for example, represent the orientation within the target terrain area where the target virtual object can be deployed. For example, some plants tend to grow in sunny directions in real-world scenarios. Therefore, when deploying these plants, the corresponding point cloud points will be selected based on the sunny side of the target terrain area as the point cloud points corresponding to the target virtual object.
[0069] Here, when determining the display angle range, the display direction within a certain range can be determined as the display angle range according to actual conditions. Specific selection can be made directly according to actual conditions, and will not be elaborated on here.
[0070] In addition, there may be other screening methods. For example, for multiple target virtual objects of the same type, when screening point cloud points, it is also necessary to follow that the distance between two screened point cloud points must be greater than the preset distance. For example, when deploying signal towers in a real scene, the distance between two adjacent signal towers will exceed 100 meters. Then, when the signal tower is used as the target virtual object to be deployed in the target terrain area, when screening the point cloud points to obtain the target point cloud points corresponding to the signal tower, the target point cloud points where the signal tower can be placed can be further determined based on the scale of the target terrain area and the display scene, as well as the distance between multiple point cloud points that can be used as target point cloud points.
[0071] Here, for the situations where point cloud points are determined for the target virtual object under the above-mentioned different methods, combinations can also be made. For example, the corresponding display height range and display slope range can be set for the target virtual object as display attribute information at the same time. The specific combination method can be selected according to actual needs and is not limited here.
[0072] Regarding the above S104, when the corresponding target point cloud points are screened out from multiple point cloud points for the target virtual object to be currently deployed, since the position of the point cloud points in the point cloud model can correspond to the position in the target terrain area, the rendering position of the target virtual object in the target terrain area can be determined based on the position information of the target point cloud points in the point cloud model.
[0073] After determining the rendering position for the target virtual object and before rendering it, for example, virtual model information of the target virtual object may be obtained first, and then the target virtual object may be rendered at the rendering position using the virtual model information.
[0074] In a specific implementation, before rendering the target virtual object, for example, the point cloud attribute information of the target point cloud point corresponding to the target virtual object can be determined first; the point cloud attribute information includes the reference path of the virtual model information of the target virtual object in the memory.
[0075] Here, since there may be many types of target virtual objects in the target terrain area, the amount of data corresponding to the virtual model information corresponding to each target virtual object may also be large. In this case, for example, the virtual model information can be first saved in the memory. When rendering a certain target virtual object, the corresponding virtual model information can be called from the memory for rendering to reduce the burden on storage capacity during rendering.
[0076] Therefore, when using the rendering position of the target virtual object to render and display the target virtual object in the target terrain area, the following method can be specifically adopted: based on the reference path contained in the point cloud attribute information of the target point cloud point, the virtual model information corresponding to the target virtual object is obtained from the memory; based on the rendering position and the virtual model information, the target virtual object is rendered and displayed in the target terrain area.
[0077] In another embodiment of the present disclosure, the orientation of virtual objects to be rendered can be adjusted. For example, for plants such as flowers, the flowers can be displayed facing north during rendering. Alternatively, for buildings such as sheds, if there are a large number of them, different orientations can be randomly assigned to each shed to simulate the staggered arrangement of sheds in real life.
[0078] That is, by utilizing the display orientation determined for the target virtual object, different characteristics of the target virtual object, such as the phototropism of a flower, can also be reflected, thereby making the target terrain area obtained after rendering the target virtual object more realistic.
[0079] Therefore, the point cloud attribute information used for rendering and displaying the target virtual object described above may also include display orientation information of the target virtual object. If the point cloud attribute information includes the display orientation information of the target virtual object, the target display orientation when rendering and displaying the target virtual object can be determined based on the display orientation information contained in the point cloud attribute information of the target point cloud point. Then, based on the rendering position and the target display orientation, the target virtual object is rendered and displayed in the target terrain area.
[0080] In this way, the above process can be used to render and display the current target virtual object to be deployed in the target terrain area. If there are other types of virtual objects to be deployed, a new current target virtual object to be deployed is determined from them, and the point cloud points of the undeployed virtual objects are further screened for the new current target virtual object to be deployed.
[0081] The embodiments of the present disclosure provide a rendering and display method, apparatus, computer equipment, and storage medium, which utilize the positions of each point cloud point in the point cloud model of the target terrain area to determine the positions of multiple virtual objects to be deployed. When the target virtual object to be deployed is determined, a screening method is used to determine the target point cloud points at which the target virtual object can be deployed from the point cloud points to determine the rendering position corresponding to the target virtual object. In this screening method, the point cloud points of the deployed virtual objects have been screened out in the previous deployment process. When determining the rendering position for the virtual object to be deployed, the situation of deploying multiple different types of virtual objects at the same point cloud point will not occur. There is no need to check whether there are multiple virtual objects at each point cloud point where the virtual object is deployed, so the efficiency is also higher.
[0082] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0083] Based on the same inventive concept, the embodiment of the present disclosure also provides a rendering and display device corresponding to the rendering and display method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned rendering and display method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0084] Reference Figure 5 FIG. 1 is a schematic diagram of a rendering and display device provided by an embodiment of the present disclosure, wherein the rendering and display device is used for rendering and displaying a target terrain area; a plurality of virtual objects to be deployed are set in the target terrain area, and the device includes: a first determination module 51, a second determination module 52, a screening module 53, and a rendering and display module 54; wherein,
[0085] A first determining module 51 is configured to determine a point cloud model corresponding to the target terrain area; the point cloud model includes a plurality of point cloud points representing the target terrain area;
[0086] A second determining module 52 is configured to determine a target virtual object to be currently deployed from a plurality of virtual objects to be deployed in the target terrain area;
[0087] A screening module 53 is configured to screen target point cloud points corresponding to the target virtual object from the plurality of point cloud points based on display attribute information corresponding to the target virtual object;
[0088] The rendering and display module 54 is used to determine the rendering position of the target virtual object in the target terrain area based on the position information of the target point cloud point in the point cloud model, and render and display the target virtual object in the target terrain area based on the rendering position.
[0089] In an optional implementation, the display attribute information corresponding to the target virtual object includes at least one of the following: a display height range, a display slope range, and a display angle range of the target virtual object.
[0090] In an optional embodiment, when the display attribute information corresponding to the target virtual object includes the display height range of the target object, the screening module 53, when screening out the target point cloud points corresponding to the target virtual object from the multiple point cloud points based on the display attribute information corresponding to the target virtual object, is used to: determine the height information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model; the height information includes the height coordinates of the point cloud points in the model coordinate system of the point cloud model; based on the height information corresponding to the multiple point cloud points and the display height range, screen out the point cloud points whose corresponding height information is within the display height range from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0091] In an optional embodiment, when the display attribute information corresponding to the target virtual object includes the display slope range of the target object, the screening module 53, when screening out the target point cloud points corresponding to the target virtual object from the multiple point cloud points based on the display attribute information corresponding to the target virtual object, is used to: determine the slope information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model; based on the slope information corresponding to the multiple point cloud points and the display slope range, screen out the point cloud points with corresponding slope information within the display slope range from the multiple point cloud points as the target point cloud points corresponding to the target virtual object.
[0092] In an optional embodiment, when determining the slope information corresponding to the multiple point cloud points based on the position information corresponding to the multiple point cloud points in the point cloud model, the screening module 53 is used to: determine, from the multiple point cloud points, a reference point cloud point used to characterize the bottom surface boundary of the target terrain area based on the position information corresponding to the multiple point cloud points; for each point cloud point in the multiple point cloud points, determine, based on the position information corresponding to the point cloud point and the position information corresponding to the multiple reference point cloud points, the distance information corresponding to the point cloud point and the multiple reference point cloud points; determine, based on the distance information corresponding to the point cloud point and the multiple reference point cloud points, a corresponding target reference point cloud point in the multiple reference point cloud points; and determine the slope information corresponding to the point cloud point based on the position information corresponding to the point cloud point and the reference position information corresponding to the target reference point cloud point.
[0093] In an optional embodiment, before rendering and displaying the target virtual object in the target terrain area based on the rendering position, the rendering and display module 54 is also used to: determine the point cloud attribute information of the target point cloud point corresponding to the target virtual object; the point cloud attribute information includes the reference path of the virtual model information of the target virtual object in the memory; when the rendering and display module 54 renders and displays the target virtual object in the target terrain area based on the rendering position, it is used to: obtain the virtual model information corresponding to the target virtual object from the memory based on the reference path contained in the point cloud attribute information of the target point cloud point; and render and display the target virtual object in the target terrain area based on the rendering position and the virtual model information.
[0094] In an optional embodiment, the point cloud attribute information of the target point cloud point also includes: display orientation information of the target virtual object; when the rendering and display module 54 renders and displays the target virtual object in the target terrain area based on the rendering position, it is used to: determine the target display orientation when rendering and displaying the target virtual object based on the display orientation information contained in the point cloud attribute information of the target point cloud point; render and display the target virtual object in the target terrain area based on the rendering position and the target display orientation.
[0095] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference can be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0096] The present disclosure also provides a computer device, such as Figure 6 FIG. 1 is a schematic diagram of a computer device structure provided by an embodiment of the present disclosure, including:
[0097] A processor 10 and a memory 20; the memory 20 stores machine-readable instructions executable by the processor 10, and the processor 10 is configured to execute the machine-readable instructions stored in the memory 20. When the machine-readable instructions are executed by the processor 10, the processor 10 performs the following steps:
[0098] Determine a point cloud model corresponding to the target terrain area; the point cloud model includes multiple point cloud points representing the target terrain area; determine a target virtual object currently to be deployed from a plurality of virtual objects to be deployed in the target terrain area; based on display attribute information corresponding to the target virtual object, filter out a target point cloud point corresponding to the target virtual object from the multiple point cloud points; based on position information of the target point cloud point in the point cloud model, determine a rendering position of the target virtual object in the target terrain area, and render and display the target virtual object in the target terrain area based on the rendering position.
[0099] The above-mentioned memory 20 includes internal memory 210 and external memory 220; the memory 210 here is also called internal memory, which is used to temporarily store the calculation data in the processor 10, as well as the data exchanged with the external memory 220 such as the hard disk. The processor 10 exchanges data with the external memory 220 through the internal memory 210.
[0100] The specific execution process of the above instructions can refer to the steps of the rendering and display method described in the embodiment of the present disclosure, and will not be repeated here.
[0101] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the steps of the rendering and display method described in the above method embodiment. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0102] The embodiments of the present disclosure also provide a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the rendering and display method described in the above method embodiment. For details, please refer to the above method embodiment and will not be repeated here.
[0103] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0104] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0105] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0106] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0107] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0108] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.
Claims
1. A rendering display method, characterized in that: Applicable to rendering display of target terrain area; A plurality of virtual objects to be deployed are set in the target terrain area, and the rendering and display method includes: Determine a point cloud model corresponding to the target terrain area; the point cloud model includes a plurality of point cloud points representing the target terrain area; determining a target virtual object to be currently deployed from a plurality of virtual objects to be deployed in the target terrain area; Based on the display attribute information corresponding to the target virtual object, a target point cloud point corresponding to the target virtual object is screened out from the plurality of point cloud points, wherein the point cloud points of the deployed virtual object in the plurality of point cloud points have been screened out in a previous deployment process; Based on the position information of the target point cloud point in the point cloud model, a rendering position of the target virtual object in the target terrain area is determined, and the target virtual object is rendered and displayed in the target terrain area based on the rendering position.
2. The method according to claim 1, characterized in that The display attribute information corresponding to the target virtual object includes at least one of the following: The target virtual object has a display height range, a display slope range, and a display angle range.
3. The method according to claim 1 or 2, characterized in that In a case where the display attribute information corresponding to the target virtual object includes a display height range of the target virtual object, the filtering, based on the display attribute information corresponding to the target virtual object, to select a target point cloud point corresponding to the target virtual object from the plurality of point cloud points includes: Determining height information corresponding to each of the plurality of point cloud points based on position information corresponding to each of the plurality of point cloud points in the point cloud model; the height information includes height coordinates of the point cloud points in a model coordinate system of the point cloud model; Based on the height information corresponding to the multiple point cloud points and the display height range, point cloud points with corresponding height information within the display height range are filtered out from the multiple point cloud points as target point cloud points corresponding to the target virtual object.
4. The method according to claim 1 or 2, characterized in that In a case where the display attribute information corresponding to the target virtual object includes a display slope range of the target virtual object, the selecting, from the plurality of point cloud points, a target point cloud point corresponding to the target virtual object based on the display attribute information corresponding to the target virtual object includes: Determining slope information corresponding to each of the plurality of point cloud points based on position information corresponding to each of the plurality of point cloud points in the point cloud model; Based on the slope information respectively corresponding to the multiple point cloud points and the displayed slope range, point cloud points with corresponding slope information within the displayed slope range are screened out from the multiple point cloud points as target point cloud points corresponding to the target virtual object.
5. The method according to claim 4, characterized in that The determining, based on the position information corresponding to the plurality of point cloud points in the point cloud model, the slope information corresponding to the plurality of point cloud points respectively includes: Determining, from the plurality of point cloud points, a reference point cloud point for representing a bottom surface boundary of a target terrain area based on position information corresponding to the plurality of point cloud points; For each point cloud point in the plurality of point cloud points, determining the distance information corresponding to each point cloud point and the plurality of reference point cloud points based on the position information corresponding to the point cloud point and the position information corresponding to the plurality of reference point cloud points; Determining a corresponding target reference point cloud point in the plurality of reference point cloud points based on the distance information respectively corresponding to the point cloud point and the plurality of reference point cloud points; Based on the position information corresponding to the point cloud point and the reference position information corresponding to the target reference point cloud point, the slope information corresponding to the point cloud point is determined.
6. The method according to claim 1, characterized in that Before rendering and displaying the target virtual object in the target terrain area based on the rendering position, the method further includes: Determine point cloud attribute information of a target point cloud point corresponding to a target virtual object; the point cloud attribute information includes a reference path of virtual model information of the target virtual object in a memory; The rendering and displaying the target virtual object in the target terrain area based on the rendering position includes: Based on the reference path included in the point cloud attribute information of the target point cloud point, obtaining virtual model information corresponding to the target virtual object from the memory; The target virtual object is rendered and displayed in the target terrain area based on the rendering position and the virtual model information.
7. The method according to claim 6, characterized in that The point cloud attribute information of the target point cloud point also includes: display orientation information of the target virtual object; The rendering and displaying the target virtual object in the target terrain area based on the rendering position includes: Determining a target display orientation when rendering and displaying the target virtual object based on display orientation information included in the point cloud attribute information of the target point cloud point; The target virtual object is rendered and displayed in the target terrain area based on the rendering position and the target display orientation.
8. A rendering display device, characterized in that: Applicable to rendering display of target terrain area; A plurality of virtual objects to be deployed are provided in the target terrain area; The rendering and display device comprises: A first determining module is configured to determine a point cloud model corresponding to the target terrain area; the point cloud model includes a plurality of point cloud points representing the target terrain area; a second determining module, configured to determine a target virtual object to be currently deployed from a plurality of virtual objects to be deployed in the target terrain area; a screening module, configured to screen target point cloud points corresponding to the target virtual object from the plurality of point cloud points based on display attribute information corresponding to the target virtual object, wherein point cloud points of deployed virtual objects in the plurality of point cloud points have been screened out in a previous deployment process; A rendering and display module is used to determine the rendering position of the target virtual object in the target terrain area based on the position information of the target point cloud point in the point cloud model, and render and display the target virtual object in the target terrain area based on the rendering position.
9. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor performs the steps of the rendering and display method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device performs the steps of the rendering and display method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Augmented reality data presentation method, device and equipment and computer storage medium
CN111815781A
Electronic map generation method and device, electronic equipment and storage medium
CN112907746A