A rendering display method, device, computer equipment and storage medium
By determining the terrain data and terrain attribute information of the sub-terrain area for the target terrain area, and generating and updating terrain patch data, the problem of unnatural terrain transition is solved and the rendering and display effect is improved.
Patent Information
- Application Number
- CN202210339757.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-04-01
AI Technical Summary
In application scenarios such as games, the construction of scenes requires dividing large scenes into multiple terrain areas and splicing them. However, the terrain transitions in adjacent terrain areas are unnatural, resulting in poor rendering and displaying effects.
By determining the terrain data for the target terrain area, the terrain attribute information of each sub-terrain area is determined, and the terrain patch data is generated based on these attribute information, the sub-terrain area is spliced, the terrain patch data is updated, and the target terrain area is finally rendered and displayed.
It achieves a more natural terrain transition, improves the rendering and display effect, and makes the target terrain area more authentic.
Smart Images

Figure CN114693858B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a rendering display method, device, computer equipment and storage medium. Background Art
[0002] In application scenarios such as games, there is a demand for scene construction, such as the demand for game scene construction. Since scenes are generally large, they are usually divided into multiple terrain areas based on the preset size of the scene. After the terrain and other aspects of each terrain area are designed, the multiple terrain areas are spliced to obtain the final scene for rendering and display. After designing each terrain area separately, since adjacent terrain areas may have differences in terrain, after the terrain areas are spliced, the resulting splicing may result in unnatural terrain transitions, resulting in poor rendering and display effects. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a rendering display method, apparatus, computer equipment and storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides a rendering and display method, comprising: determining terrain attribute information corresponding to each sub-terrain area in the target terrain area based on terrain data determined for the target terrain area; generating terrain patch data for any sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area; splicing each sub-terrain area based on the position of each sub-terrain area in the target terrain area, using the terrain patch data corresponding to each sub-terrain area, and updating the terrain patch data corresponding to each sub-terrain area based on the obtained splicing result; determining the target terrain patch data of the target terrain area based on the updated terrain patch data corresponding to each sub-terrain area, and rendering and displaying the target terrain area based on the target terrain patch data.
[0005] In an optional embodiment, the terrain attribute information corresponding to each sub-terrain area in the target terrain area includes: information indicating a target object to be deployed in each sub-terrain area, and a deployment position of the target object in the sub-terrain area; for any sub-terrain area, generating terrain patch data for the sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area includes: generating terrain patch data for the sub-terrain area based on object patch data corresponding to at least one target object to be deployed in the sub-terrain area, and a deployment position corresponding to the at least one target object in the sub-terrain area.
[0006] In an optional implementation, based on the positions of each sub-terrain area in the target terrain area, each sub-terrain area is spliced using terrain patch data corresponding to each sub-terrain area, including: based on the positions of each sub-terrain area in the target terrain area, a plurality of positions to be spliced corresponding to each sub-terrain area are determined; according to a preset splicing order, a current position to be spliced is selected from the plurality of positions to be spliced, and a first sub-terrain area and a second sub-terrain area associated with the current position to be spliced are spliced to obtain the splicing result.
[0007] In an optional implementation, the stitching processing of the first sub-terrain area and the second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result includes: determining a first stitching boundary in the first sub-terrain area based on the current position to be stitched, and determining a second stitching boundary in the second sub-terrain area; and stitching the first sub-terrain area and the second sub-terrain area based on the first stitching boundary and the second stitching boundary to obtain the stitching processing result.
[0008] In an optional embodiment, before determining the target terrain patch data of the target terrain area based on the terrain patch data corresponding to each sub-terrain area after the update, the method further includes: in response to a modification operation on the terrain data, determining a first target sub-terrain area associated with the modification operation from each sub-terrain area, and updating terrain attribute information corresponding to the first target sub-terrain area; based on the position of the first target sub-terrain area in the target terrain area and the terrain patch data generated based on the updated terrain attribute information of the first target sub-terrain area, splicing the first target sub-terrain area and the sub-terrain areas adjacent to the position of the first target sub-terrain area in each sub-terrain area, and updating the terrain patch data corresponding to the first target sub-terrain area and other associated sub-terrain areas.
[0009] In an optional embodiment, the rendering and display method further includes: in response to an expansion operation on the target terrain area, determining a sub-terrain area to be expanded corresponding to the expansion operation, and determining a second target sub-terrain area adjacent to the sub-terrain area to be expanded from the sub-terrain areas; generating target terrain patch data of the sub-terrain area to be expanded based on target terrain attribute information determined for the sub-terrain area to be expanded; performing expansion and splicing processing on the sub-terrain area to be expanded and the second target sub-terrain area using the target terrain patch data and terrain patch data corresponding to the second target sub-terrain area, and updating the target terrain patch data based on the obtained expansion and splicing processing result; and rendering and displaying the target terrain area after the expansion operation based on the updated target terrain patch data.
[0010] In an optional implementation manner, the target terrain attribute information for the sub-terrain area to be expanded is determined in the following manner: based on the terrain attribute information of the second target sub-terrain area, the target terrain attribute information of the sub-terrain area to be expanded is determined.
[0011] In a second aspect, an embodiment of the present disclosure further provides a rendering and display device, comprising: a determination module, for determining terrain attribute information corresponding to each sub-terrain area in the target terrain area based on terrain data determined for the target terrain area; a generation module, for generating terrain patch data for any sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area; a processing module, for performing splicing processing on each sub-terrain area based on the positions of each sub-terrain area in the target terrain area and using the terrain patch data corresponding to each sub-terrain area, and updating the terrain patch data corresponding to each sub-terrain area based on the obtained splicing processing results; a rendering module, for determining the target terrain patch data of the target terrain area based on the updated terrain patch data corresponding to each sub-terrain area, and rendering and displaying the target terrain area based on the target terrain patch data.
[0012] In an optional embodiment, the terrain attribute information corresponding to each sub-terrain area in the target terrain area includes: information indicating a target object to be deployed in each sub-terrain area, and a deployment position of the target object in the sub-terrain area; for any sub-terrain area, when the generation module generates terrain patch data for the sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area, it is used to: generate terrain patch data for the sub-terrain area based on object patch data corresponding to at least one target object to be deployed on the sub-terrain area, and a deployment position corresponding to the at least one target object in the sub-terrain area.
[0013] In an optional embodiment, when the processing module performs stitching processing on each sub-terrain area based on the position of each sub-terrain area in the target terrain area and using the terrain patch data corresponding to each sub-terrain area, the processing module is used to: determine a plurality of positions to be stitched corresponding to each sub-terrain area based on the position of each sub-terrain area in the target terrain area; select a current position to be stitched from the plurality of positions to be stitched according to a preset stitching order, and perform stitching processing on a first sub-terrain area and a second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result.
[0014] In an optional embodiment, when the processing module performs stitching processing on the first sub-terrain area and the second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result, it is used to: determine a first stitching boundary in the first sub-terrain area based on the current position to be stitched, and determine a second stitching boundary in the second sub-terrain area; based on the first stitching boundary and the second stitching boundary, perform stitching processing on the first sub-terrain area and the second sub-terrain area to obtain the stitching processing result.
[0015] In an optional implementation, before determining the target terrain patch data of the target terrain area based on the terrain patch data corresponding to each sub-terrain area after the update, the rendering module is further used to: in response to a modification operation on the terrain data, determine a first target sub-terrain area associated with the modification operation from the sub-terrain areas, and update the terrain attribute information corresponding to the first target sub-terrain area; based on the position of the first target sub-terrain area in the target terrain area and the terrain patch data generated based on the updated terrain attribute information of the first target sub-terrain area, perform splicing processing on the first target sub-terrain area and the sub-terrain areas adjacent to the position of the first target sub-terrain area in each sub-terrain area, and update the terrain patch data corresponding to the first target sub-terrain area and other associated sub-terrain areas.
[0016] In an optional embodiment, the rendering and display device also includes an expansion module, which is used to: in response to an expansion operation on the target terrain area, determine a sub-terrain area to be expanded corresponding to the expansion operation, and determine a second target sub-terrain area adjacent to the sub-terrain area to be expanded from the sub-terrain areas; based on the target terrain attribute information determined for the sub-terrain area to be expanded, generate target terrain patch data of the sub-terrain area to be expanded; use the target terrain patch data and the terrain patch data corresponding to the second target sub-terrain area to expand and splice the sub-terrain area to be expanded and the second target sub-terrain area, and update the target terrain patch data based on the obtained expansion and splicing processing result; based on the updated target terrain patch data, render and display the target terrain area after the expansion operation.
[0017] In an optional implementation manner, the expansion module determines the target terrain attribute information for the sub-terrain area to be expanded in the following manner: based on the terrain attribute information of the second target sub-terrain area, the target terrain attribute information of the sub-terrain area to be expanded is determined.
[0018] 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, and 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.
[0019] 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, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0020] 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.
[0021] The rendering and display method, apparatus, computer equipment and storage medium provided by the embodiments of the present disclosure determine the terrain attribute information corresponding to each sub-terrain area constituting the target terrain area after determining the terrain data of the target terrain area. Such terrain attribute information can form terrain constraints on the sub-terrain areas. The terrain patch data generated for the sub-terrain areas using the terrain attribute information can reflect the terrain features that should exist in the sub-terrain areas in the terrain data. Therefore, after the sub-terrain areas are spliced, terrain patch data that is separated from the terrain data will not appear on the terrain. When the terrain data is determined, it is easier to design a regular terrain transition. Therefore, the target terrain area rendered and displayed by the target terrain patch data can make the terrain transition more natural, thereby achieving a better rendering and display effect.
[0022] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification 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 ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a rendering and display method provided by an embodiment of the present disclosure is shown;
[0025] Figure 2 A schematic diagram showing terrain data provided by an embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram of determining terrain attribute information of a sub-terrain area provided by an embodiment of the present disclosure is shown;
[0027] Figure 4 A schematic diagram of splicing sub-terrain areas provided by an embodiment of the present disclosure is shown;
[0028] Figure 5 A schematic diagram showing another method of splicing sub-terrain areas provided by an embodiment of the present disclosure is shown;
[0029] Figure 6 A schematic diagram showing another type of terrain data provided by an embodiment of the present disclosure;
[0030] Figure 7 A schematic diagram of a sub-terrain area to be expanded provided by an embodiment of the present disclosure is shown.
[0031] Figure 8 A schematic diagram of a rendering and display device provided by an embodiment of the present disclosure is shown;
[0032] Fig. 9 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme 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 claimed 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 belong to the scope of protection of the present disclosure.
[0034] According to research, when constructing a scene, since the size of the scene is generally large, the scene is divided into multiple terrain areas, and the scene is obtained by splicing the terrain of multiple terrain areas. For multiple terrain areas in the scene, the coupling between adjacent terrain areas is high. For example, when setting the river terrain on two adjacent terrain areas, if the flow direction of the river is set in one terrain area, the corresponding river flow direction should also be set in the other terrain area, so that the river displayed on the two terrain areas is logical. However, when designing multiple terrain areas, each terrain area is usually designed separately. In this way, the designed terrain area may have deviations in expressing the terrain. For example, the same river displayed has different river flow directions in two adjacent terrain areas. After splicing the terrain areas, the splicing result may have unnatural terrain transitions, resulting in poor rendering and display effects.
[0035] Based on the above research, the present disclosure provides a rendering and display method. After determining the terrain data of the target terrain area, the terrain attribute information corresponding to each sub-terrain area constituting the target terrain area is determined. Such terrain attribute information can form terrain constraints on the sub-terrain areas. The terrain patch data generated for the sub-terrain areas using the terrain attribute information can reflect the terrain features that should exist in the sub-terrain areas in the terrain data. Therefore, after the sub-terrain areas are spliced, terrain patch data that is separated from the terrain data will not appear on the terrain. When the terrain data is determined, it is easier to design a regular terrain transition. Therefore, the target terrain area rendered and displayed by the target terrain patch data can make the terrain transition more natural, thereby making the rendering and display effect better.
[0036] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0037] 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, further definition and explanation thereof is not required in subsequent drawings.
[0038] To facilitate understanding of the present embodiment, a rendering display method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the rendering display method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the rendering display method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0039] The rendering and display method provided by the embodiment of the present disclosure is described below.
[0040] The method for splicing terrain areas provided in the embodiments of the present disclosure can be applied to scenes such as the game field, animation film and television production, for example, in the game field, it is applied to the production of game scenes, or in the animation film and television production scene, it is applied to the production of animation scenes. In a specific implementation, the game scene or the animation scene is used as the target terrain area described in the embodiments of the present disclosure. Since the target terrain area is generally large, for example, the design size is 10 kilometers × 10 kilometers.
[0041] Before designing the terrain of the sub-terrain area, the terrain data of the target terrain area as a whole can be determined first, so that the terrain distribution of the target terrain area as a whole can be determined macroscopically. After determining the overall terrain distribution of the target terrain area, the sub-terrain area can be constrained in the terrain. Such constraints can control that when the terrain design of the sub-terrain area is carried out, it will not affect the overall terrain design of the target terrain area, such as the flow direction of rivers, the direction of mountains, etc. In this way, after the constrained terrain design of the sub-terrain area, the corresponding terrain patch data can be used to obtain the target terrain patch data of the target terrain area as a whole, so as to render the target terrain area. Since the obtained target terrain area conforms to the terrain transition law, the authenticity of the obtained target terrain area will also be higher.
[0042] 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:
[0043] S101: determining terrain attribute information corresponding to each sub-terrain area in the target terrain area based on terrain data determined for the target terrain area;
[0044] S102: for any sub-terrain area, generating terrain patch data for the sub-terrain area based on terrain attribute information corresponding to the sub-terrain area;
[0045] S103: Based on the positions of the sub-terrain areas in the target terrain area, the terrain patch data corresponding to the sub-terrain areas are used to perform splicing processing on the sub-terrain areas, and the terrain patch data corresponding to the sub-terrain areas are updated based on the obtained splicing processing results;
[0046] S104: Determine target terrain patch data of the target terrain area based on the updated terrain patch data corresponding to each sub-terrain area, and render and display the target terrain area based on the target terrain patch data.
[0047] The above-mentioned S101 to S104 are described in detail below.
[0048] With respect to the above S101, the target terrain area is first described. In different application scenarios, the determined target terrain area may be different, which can be specifically reflected in the different size design requirements for the target terrain area. In one possible case, in the field of games, a larger game scene is usually required, and the target terrain area can be set to be designed as a scene with a larger size, such as setting the design size to 10 km × 10 km as described above.
[0049] When the target terrain area is determined, the terrain data of the target terrain area can also be obtained according to the terrain design requirements of the target terrain area. In a possible case, the terrain data described herein may specifically include a low-precision terrain area of the target terrain area. Specifically, the low-precision terrain area is a terrain area with a lower precision that is proportionally reduced in design size from the target terrain area, and the overall terrain design of the target terrain area can be performed on the low-precision terrain area. Since the size of the low-precision terrain area is small, it is easy to perform the overall terrain design, and for the low-precision terrain area, only the terrain design of the target terrain area needs to be undertaken, and there is no need for rendering and display, so a higher design precision is not required, which can save computing resources.
[0050] For example, if the terrain design requirements of the target terrain area include designing a river running from north to south, when determining the low-precision terrain area, refer to Figure 2 As shown, it is a schematic diagram of terrain data provided by an embodiment of the present disclosure. In the schematic diagram, the design size of the low-precision terrain area is specifically included, for example, 0.1 km × 0.1 km. The designed terrain specifically includes a river with a varying river width, and the direction of the river is determined to be from north to south.
[0051] After obtaining the terrain data of the target terrain area, the terrain attribute information of each sub-terrain area contained in the target terrain area can be determined using the terrain data of the target terrain area. Here, the sub-terrain areas in the target terrain area are first described. Since the design size of the target terrain area is usually large, in order to reduce the workload during the design and improve the design efficiency of the target terrain area when performing terrain design on the target terrain area, the target terrain area will be divided into multiple sub-terrain areas of smaller sizes, such as dividing the target terrain area into sub-terrain areas of 10 meters × 10 meters. Here, the size of the division is not limited, and the division method is not limited. After the sub-terrain areas of smaller sizes are obtained by division, the sub-terrain areas can be assigned to different designers for synchronous design, which can improve the overall design efficiency of the target terrain area.
[0052] For the terrain data obtained above, since the terrain data can reflect the overall design of the target terrain area, for each sub-terrain area divided from the target terrain area, the terrain attribute information of the sub-terrain area can be determined according to the position of the sub-terrain area in the target terrain area. Here, the terrain attribute information of the sub-terrain area specifically includes information indicating the target object to be deployed in each sub-terrain area, and the deployment position of the target object in the sub-terrain area.
[0053] For example, see Figure 3 FIG. 1 is a schematic diagram of determining terrain attribute information of a sub-terrain area provided by an embodiment of the present disclosure. Figure 3 In (a), a schematic diagram of the target terrain area is shown, and the specific design size is 10 km × 10 km. In order to simplify the description, the target terrain area is divided into 3 × 3 sub-terrain areas. Figure 2 The terrain data in can also be divided similarly, according to the terrain data at the corresponding position, Figure 3 The corresponding terrain attribute information is determined by dividing the sub-terrain areas. Figure 3 Take the sub-terrain area in the middle of the target terrain area shown in (a) as an example, that is, Figure 3 The sub-terrain area designed in (b) is based on Figure 2 The terrain data of the corresponding position in the sub-terrain area can determine a section of the river in the sub-terrain area, and can determine the inflow position and outflow position of the river in the section on the sub-terrain area, as well as the direction of the river, that is, the deployment position of the river in this section in the sub-terrain area.
[0054] In addition, for the sub-terrain area, in addition to some objects determined by the constraints of the terrain data, such as the river described above, other objects can be added, such as sand or grass designed beside the river, to further refine and enrich the sub-terrain area. For other sub-terrain areas in the target terrain area, the corresponding terrain attribute information can also be determined in a similar manner, and the details will not be repeated here.
[0055] With respect to the above S102, when the terrain attribute information corresponding to the sub-terrain area is determined, for any sub-terrain area, terrain tile data may be generated for the sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area.
[0056] In a specific implementation, terrain patch data can be generated for a sub-terrain area in the following manner: based on object patch data corresponding to at least one target object to be deployed in the sub-terrain area, and the deployment position corresponding to the at least one target object in the sub-terrain area, terrain patch data is generated for the sub-terrain area.
[0057] Here, the target objects to be deployed may include, for example, the rivers, sandstones, grass, etc. designed on the sub-terrain area as described above. For these target objects, for example, corresponding patch data may be predetermined. When generating terrain patch data for the sub-terrain area, by calling the corresponding patch data and according to the corresponding deployment position of the target object in the sub-terrain area, terrain patch data may be generated for the sub-terrain area more efficiently. In this way, the efficiency of rendering and display may be correspondingly improved.
[0058] With respect to the above S103, when the terrain patch data corresponding to each sub-terrain area in the target terrain area are determined, each sub-terrain area can be spliced according to its position in the target terrain area, and the terrain patch data corresponding to each sub-terrain area can be updated based on the obtained splicing result.
[0059] In a specific implementation, when performing stitching processing on each sub-terrain area, the following method can be specifically adopted: based on the positions of each sub-terrain area in the target terrain area, a plurality of positions to be stitched corresponding to each sub-terrain area are determined; according to a preset stitching order, a current position to be stitched is selected from the plurality of positions to be stitched, and a stitching processing is performed on the first sub-terrain area and the second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result.
[0060] Specifically, since each sub-terrain region exists independently but is part of the target terrain region, the sub-terrain regions can be spliced into the target terrain region according to the position of each sub-terrain region in the target terrain region. In a possible case, the sub-terrain region is a rectangle, and when splicing, the sub-terrain region and other sub-terrain regions adjacent to each other in the target terrain region are spliced through adjacent rectangular boundaries. Here, in the two sub-terrain regions to be spliced, the adjacent boundaries include the position to be spliced.
[0061] For example, see Figure 4 FIG. 1 is a schematic diagram of splicing sub-terrain areas provided by an embodiment of the present disclosure. Figure 4 Specifically, Figure 3 The target terrain area in (a) is divided into multiple sub-terrain areas. There is a position to be spliced between two adjacent sub-terrain areas. Figure 4 Some of the positions to be spliced are marked in FIG. For each sub-topographic region, the corresponding position to be spliced when splicing with other sub-topographic regions can also be determined accordingly.
[0062] When multiple positions to be spliced are determined, the sub-terrain areas can be spliced. In one possible case, since the amount of terrain patch data of the sub-terrain area is large, if all sub-terrain areas of the target terrain area are spliced at the same time, the amount of data to be processed is also large, and the computing power of the computer device may not be able to bear it. Therefore, when splicing the sub-terrain areas, the number of sub-terrain areas that can be spliced in one splicing processing cycle can be determined according to the computing power of the computer device, and then some of the positions to be spliced are selected from the multiple positions to be spliced as the current positions to be spliced. Alternatively, the current positions to be spliced can be selected one by one according to a preset splicing order. For example, if the preset splicing order is to splice the horizontal positions to be spliced first and then the vertical positions to be spliced, then the first sub-terrain area and the second sub-terrain area associated with the horizontal positions to be spliced are spliced in turn. After all the horizontal positions to be spliced are spliced, the vertical positions to be spliced are spliced.
[0063] After selecting the current position to be spliced, the first sub-terrain area and the second sub-terrain area associated with the current position to be spliced can be spliced to obtain a splicing result. Specifically, since the splicing of the sub-terrain areas specifically involves splicing the boundaries of the sub-terrain areas, when performing the splicing, based on the current position to be spliced, a first splicing boundary can be determined in the first sub-terrain area, and a second splicing boundary can be determined in the second sub-terrain area, and then based on the first splicing boundary and the second splicing boundary, the first sub-terrain area and the second sub-terrain area are spliced to obtain the splicing result.
[0064] Here, since there is terrain attribute information corresponding to the sub-terrain area, the deployment position of the target object in the sub-terrain area in the target terrain area can be determined, such as the inflow position, outflow position, direction of the river, etc. For the target terrain area, there is continuity between the sub-terrain areas containing the same object. For example, the river in the target terrain area has no breaks in the multiple covered sub-terrain areas, the riverbed is continuous, and the direction is consistent. Therefore, when splicing two adjacent sub-terrain areas, it is necessary to determine the two corresponding splicing boundaries when the two sub-terrain areas are spliced. Using the current position to be spliced, the first splicing boundary is determined for the associated first sub-terrain area, and the second splicing boundary is determined for the associated second sub-terrain area, so that there will be no violation of geographical rules after splicing.
[0065] For example, see Figure 5 FIG. 1 is another schematic diagram of splicing sub-terrain areas provided by an embodiment of the present disclosure, which also includes Figure 4 Part of the sub-terrain area shown in Figure 5 , a position to be spliced is specifically shown, and two sub-topographic regions associated with the position to be spliced include a first sub-topographic region labeled 2 and a second sub-topographic region labeled 5. For the position to be spliced, a first splicing boundary a1 in the first sub-region and a second splicing boundary a2 in the second sub-region can be determined. The first splicing boundary a1 and the second splicing boundary a2 can be used to correctly splice the first sub-region and the second sub-region. For example, Figure 5 If the splicing boundary corresponding to the sub-region associated with the position to be spliced is not determined, the following may occur: Figure 5 In the situation shown in (b), that is, the stitching boundary a1 of the first sub-area is stitched with the stitching boundary b of the second sub-area, then in the target terrain area, the direction of the river in the sub-terrain area labeled 5 changes in violation of geographical rules and a break occurs, that is, a stitching error occurs in the sub-terrain area.
[0066] With respect to the above S104, after updating the terrain patch data corresponding to each sub-terrain area based on the obtained stitching processing result, the target terrain patch data of the target terrain area can be determined by using the updated terrain patch data corresponding to each sub-terrain area, and the target terrain area can be rendered and displayed based on the target terrain patch data.
[0067] Here, since the accuracy of the splicing can be guaranteed when the sub-terrain areas are spliced, the target terrain patch data obtained by the splicing result can also ensure that the target object is logical when displayed, thereby improving the authenticity of the target terrain area after rendering and display.
[0068] In another embodiment of the present disclosure, a specific method for re-rendering and displaying the target terrain area after the terrain data is modified is also provided. In a specific implementation, before determining the target terrain patch data of the target terrain area based on the terrain patch data corresponding to each sub-terrain area after the update, in response to the modification operation on the terrain data, a first target sub-terrain area associated with the modification operation can be determined from each sub-terrain area, and the terrain attribute information corresponding to the first target sub-terrain area can be updated; based on the position of the first target sub-terrain area in the target terrain area and the terrain patch data generated based on the updated terrain attribute information of the first target sub-terrain area, the first target sub-terrain area and the sub-terrain areas adjacent to the position of the first target sub-terrain area in each sub-terrain area are spliced, and the terrain patch data corresponding to the first target sub-terrain area and other associated sub-terrain areas are updated.
[0069] For example, see Figure 6FIG. 1 is a schematic diagram of another type of terrain data provided by an embodiment of the present disclosure. Figure 2 In the terrain data shown in FIG. 2 , the riverbed shape of the river is modified at the dotted box labeled 2, and the original straight line shape is modified to a curved shape. In this modification operation, the dotted box labeled 2 is specifically modified, so the first target sub-terrain area associated with the modification operation is the corresponding sub-terrain area at this location. Since the riverbed shape is modified, the terrain attribute information of the first target sub-terrain area can be updated.
[0070] After obtaining the updated terrain attribute information of the first target sub-terrain area, the terrain patch data of the first target sub-terrain area can also be generated. The specific method can refer to the above corresponding description, which will not be repeated here. After determining the terrain patch data of the first target sub-terrain area, the sub-terrain area adjacent to the position of the first target sub-terrain area can be determined from each sub-terrain area, and the splicing process is re-performed to update the terrain patch data of these sub-terrain areas, and re-determine the target terrain patch data of the target terrain area.
[0071] In this way, when only a small range of modifications are made to the terrain data, a small number of first target sub-terrain areas that need to re-update the terrain patch data can be determined based on the modification operation, and the splicing process can be re-performed without re-splicing all sub-terrain areas under the target terrain area. This requires less computing power and is more efficient.
[0072] In another embodiment of the present disclosure, a specific method for re-rendering and displaying the target terrain area after the target terrain area is expanded is also provided. In a possible case, if there is a need to expand the target terrain area after the target terrain area is rendered and displayed, the target terrain area can be further expanded in units of sub-terrain areas based on the current target terrain area.
[0073] In a specific implementation, in response to an expansion operation on the target terrain area, a sub-terrain area to be expanded corresponding to the expansion operation can be determined, and a second target sub-terrain area adjacent to the sub-terrain area to be expanded can be determined from the sub-terrain areas; based on the target terrain attribute information determined for the sub-terrain area to be expanded, target terrain patch data of the sub-terrain area to be expanded is generated; using the target terrain patch data and the terrain patch data corresponding to the second target sub-terrain area, the sub-terrain area to be expanded and spliced are expanded and spliced on the second target sub-terrain area, and the target terrain patch data is updated based on the obtained expansion and splicing processing result; based on the updated target terrain patch data, the target terrain area after the expansion operation is rendered and displayed.
[0074] In a possible case, a sub-terrain area can be expanded at the outer edge of the target terrain area. After determining the sub-terrain area to be expanded, target terrain attribute information can also be similarly determined for the sub-terrain area to be expanded, thereby determining the corresponding target terrain patch data. When determining the target terrain attribute information of the sub-terrain area to be expanded, a second target sub-terrain area adjacent to the sub-terrain area to be expanded can be first determined, and then the target terrain attribute information of the sub-terrain area to be expanded can be determined based on the terrain attribute information of the second target sub-terrain area.
[0075] For example, see Figure 7 FIG. 1 is a schematic diagram of a sub-terrain area to be expanded provided by an embodiment of the present disclosure. The sub-terrain area to be expanded can determine a sub-terrain area adjacent to the target terrain area, that is, the second target sub-terrain area numbered 2. According to the terrain attribute information of the second target sub-terrain area, the target terrain attribute information of the sub-terrain area to be expanded can be constrained, for example, Figure 7 In the process, the direction of the river at the upstream position and the position of the riverbed of the second target sub-terrain area are determined in a coherent manner in the sub-terrain area to be expanded. In this way, even if the target terrain area currently displayed by rendering is expanded, the displayed target object will not lack display logic, and the authenticity of the expanded target terrain area is guaranteed.
[0076] After determining the target terrain attribute information of the sub-terrain area to be expanded, the corresponding target terrain patch data can be determined, and the sub-terrain area to be expanded and the second target sub-terrain area can be spliced using the terrain patch data of the second target sub-terrain area, and the target terrain patch data of the target terrain area can be updated, so as to render and display the expanded target terrain area using the updated target terrain patch data.
[0077] In this way, when the target terrain area is expanded, there is no need to re-determine the terrain data of the target terrain area and then reuse the terrain data to render and display the target terrain area, which makes the operation simpler and more efficient.
[0078] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0079] 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.
[0080] Reference Figure 8 FIG. 8 is a schematic diagram of a rendering display device provided by an embodiment of the present disclosure, wherein the device comprises: a determination module 81, a generation module 82, a processing module 83, and a rendering module 84; wherein,
[0081] A determination module 81, configured to determine terrain attribute information corresponding to each sub-terrain area in the target terrain area based on terrain data determined for the target terrain area;
[0082] A generating module 82, for generating terrain patch data for any sub-terrain region based on terrain attribute information corresponding to the sub-terrain region;
[0083] The processing module 83 is used to perform splicing processing on each sub-terrain area based on the position of each sub-terrain area in the target terrain area, using the terrain patch data corresponding to each sub-terrain area, and update the terrain patch data corresponding to each sub-terrain area based on the obtained splicing processing result;
[0084] The rendering module 84 is used to determine the target terrain patch data of the target terrain area based on the updated terrain patch data corresponding to each sub-terrain area, and render and display the target terrain area based on the target terrain patch data.
[0085] In an optional implementation manner, the terrain attribute information corresponding to each sub-terrain area in the target terrain area includes: information indicating a target object to be deployed in each sub-terrain area, and a deployment position of the target object in the sub-terrain area; for any sub-terrain area, when the generation module 82 generates terrain patch data for the sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area, it is used to: generate terrain patch data for the sub-terrain area based on object patch data corresponding to at least one target object to be deployed in the sub-terrain area, and a deployment position corresponding to the at least one target object in the sub-terrain area.
[0086] In an optional embodiment, when the processing module 83 performs stitching processing on each sub-terrain area based on the position of each sub-terrain area in the target terrain area and using the terrain patch data corresponding to each sub-terrain area, the processing module 83 is used to: determine a plurality of positions to be stitched corresponding to each sub-terrain area based on the position of each sub-terrain area in the target terrain area; select a current position to be stitched from the plurality of positions to be stitched according to a preset stitching order, and perform stitching processing on the first sub-terrain area and the second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result.
[0087] In an optional embodiment, when the processing module 83 performs stitching processing on the first sub-terrain area and the second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result, it is used to: determine a first stitching boundary in the first sub-terrain area based on the current position to be stitched, and determine a second stitching boundary in the second sub-terrain area; based on the first stitching boundary and the second stitching boundary, perform stitching processing on the first sub-terrain area and the second sub-terrain area to obtain the stitching processing result.
[0088] In an optional implementation, before determining the target terrain patch data of the target terrain area based on the terrain patch data corresponding to each sub-terrain area after the update, the rendering module 84 is further used to: in response to a modification operation on the terrain data, determine a first target sub-terrain area associated with the modification operation from the sub-terrain areas, and update the terrain attribute information corresponding to the first target sub-terrain area; based on the position of the first target sub-terrain area in the target terrain area and the terrain patch data generated based on the updated terrain attribute information of the first target sub-terrain area, perform splicing processing on the first target sub-terrain area and the sub-terrain areas adjacent to the position of the first target sub-terrain area in each sub-terrain area, and update the terrain patch data corresponding to the first target sub-terrain area and other associated sub-terrain areas.
[0089] In an optional embodiment, the rendering and display device also includes an expansion module 85, which is used to: in response to an expansion operation on the target terrain area, determine a sub-terrain area to be expanded corresponding to the expansion operation, and determine a second target sub-terrain area adjacent to the sub-terrain area to be expanded from the sub-terrain areas; based on the target terrain attribute information determined for the sub-terrain area to be expanded, generate target terrain patch data of the sub-terrain area to be expanded; use the target terrain patch data and the terrain patch data corresponding to the second target sub-terrain area to expand and splice the sub-terrain area to be expanded and the second target sub-terrain area, and update the target terrain patch data based on the obtained expansion and splicing processing result; based on the updated target terrain patch data, render and display the target terrain area after the expansion operation.
[0090] In an optional implementation manner, the expansion module 85 determines the target terrain attribute information for the sub-terrain area to be expanded in the following manner: based on the terrain attribute information of the second target sub-terrain area, the target terrain attribute information of the sub-terrain area to be expanded is determined.
[0091] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0092] The present disclosure also provides a computer device, such as Fig. 9 FIG. 1 is a schematic diagram of a computer device structure provided in an embodiment of the present disclosure, including:
[0093] A processor 10 and a memory 20; the memory 20 stores machine-readable instructions executable by the processor 10, and the processor 10 is used 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:
[0094] Based on the terrain data determined for the target terrain area, terrain attribute information corresponding to each sub-terrain area in the target terrain area is determined; for any sub-terrain area, terrain patch data is generated for the sub-terrain area based on the terrain attribute information corresponding to the sub-terrain area; based on the positions of each sub-terrain area in the target terrain area, each sub-terrain area is spliced using the terrain patch data corresponding to each sub-terrain area, and the terrain patch data corresponding to each sub-terrain area is updated based on the obtained splicing result; based on the updated terrain patch data corresponding to each sub-terrain area, target terrain patch data of the target terrain area is determined, and the target terrain area is rendered and displayed based on the target terrain patch data.
[0095] The above-mentioned memory 20 includes an internal memory 210 and an external memory 220; the internal memory 210 here is also called an 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 a hard disk. The processor 10 exchanges data with the external memory 220 through the internal memory 210.
[0096] 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, which will not be repeated here.
[0097] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the rendering and display method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0098] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that 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, which will not be repeated here.
[0099] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0100] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method 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, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] 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.
[0103] 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 a computer device (which can be a personal computer, a server, or a network device, etc.) to perform 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.
[0104] 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 protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A rendering display method, characterized in that: include: Based on the terrain data determined for the target terrain area, determining terrain attribute information corresponding to each sub-terrain area in the target terrain area; For any sub-terrain area, generating terrain patch data for the sub-terrain area based on terrain attribute information corresponding to the sub-terrain area; Based on the positions of the sub-terrain areas in the target terrain area, the terrain patch data corresponding to the sub-terrain areas are used to perform splicing processing on the sub-terrain areas, and the terrain patch data corresponding to the sub-terrain areas are updated based on the obtained splicing processing results; Based on the updated terrain patch data corresponding to each sub-terrain area, target terrain patch data of the target terrain area is determined, and the target terrain area is rendered and displayed based on the target terrain patch data.
2. The method according to claim 1, characterized in that The terrain attribute information corresponding to each sub-terrain area in the target terrain area includes: information indicating a target object to be deployed in each sub-terrain area, and a deployment position of the target object in the sub-terrain area; For any sub-terrain area, generating terrain patch data for the sub-terrain area based on terrain attribute information corresponding to the sub-terrain area includes: Based on the object patch data respectively corresponding to at least one target object to be deployed on the sub-terrain area and the deployment position respectively corresponding to the at least one target object in the sub-terrain area, terrain patch data is generated for the sub-terrain area.
3. The method according to claim 1, characterized in that Based on the positions of the sub-terrain areas in the target terrain area, the sub-terrain areas are spliced using terrain patch data corresponding to the sub-terrain areas, including: Based on the positions of the sub-terrain areas in the target terrain area, determine a plurality of positions to be spliced corresponding to the sub-terrain areas; According to a preset splicing order, a current position to be spliced is selected from the multiple positions to be spliced, and a splicing process is performed on the first sub-terrain area and the second sub-terrain area associated with the current position to be spliced to obtain the splicing process result.
4. The method according to claim 3, characterized in that The performing stitching processing on the first sub-terrain area and the second sub-terrain area associated with the current position to be stitched to obtain the stitching processing result includes: Based on the current position to be stitched, determining a first stitching boundary in the first sub-topographic area, and determining a second stitching boundary in the second sub-topographic area; Based on the first stitching boundary and the second stitching boundary, the first sub-terrain area and the second sub-terrain area are stitched together to obtain the stitching result.
5. The method according to claim 1, characterized in that Before determining the target terrain patch data of the target terrain area based on the updated terrain patch data respectively corresponding to each sub-terrain area, the method further includes: In response to a modification operation on the terrain data, determining a first target sub-terrain area associated with the modification operation from among the sub-terrain areas, and updating terrain attribute information corresponding to the first target sub-terrain area; Based on the position of the first target sub-terrain area in the target terrain area and the terrain patch data generated based on the updated terrain attribute information of the first target sub-terrain area, the first target sub-terrain area and the sub-terrain areas adjacent to the position of the first target sub-terrain area in each sub-terrain area are spliced, and the terrain patch data corresponding to the first target sub-terrain area and other associated sub-terrain areas are updated.
6. The method according to claim 1, characterized in that Also includes: In response to an expansion operation on the target terrain area, determining a sub-terrain area to be expanded corresponding to the expansion operation, and determining a second target sub-terrain area adjacent to the sub-terrain area to be expanded from the sub-terrain areas; generating target terrain patch data of the sub-terrain area to be expanded based on the target terrain attribute information determined for the sub-terrain area to be expanded; Using the target terrain patch data and the terrain patch data corresponding to the second target sub-terrain area, the sub-terrain area to be expanded and the second target sub-terrain area are expanded and spliced, and the target terrain patch data is updated based on the obtained expansion and splicing processing result; Based on the updated target terrain patch data, the target terrain area after the expansion operation is rendered and displayed.
7. The method according to claim 6, characterized in that The target terrain attribute information is determined for the sub-terrain area to be expanded in the following manner: Based on the terrain attribute information of the second target sub-terrain area, target terrain attribute information of the sub-terrain area to be expanded is determined.
8. A rendering display device, characterized in that: include: A determination module, configured to determine terrain attribute information corresponding to each sub-terrain area in the target terrain area based on terrain data determined for the target terrain area; A generating module, for generating terrain patch data for any sub-terrain area based on terrain attribute information corresponding to the sub-terrain area; A processing module, for performing splicing processing on each sub-terrain area based on the position of each sub-terrain area in the target terrain area, using terrain patch data corresponding to each sub-terrain area, and updating the terrain patch data corresponding to each sub-terrain area based on the obtained splicing processing result; The rendering module is used to determine the target terrain patch data of the target terrain area based on the terrain patch data corresponding to each sub-terrain area after the update, and render and display the target terrain area based on the target terrain patch data.
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 executes 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 executes the steps of the rendering and display method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual scene generation method and device, computer equipment and storage medium
CN113066183A
Terrain splicing method and device, electronic equipment and storage medium
CN113744401A