Rendering method, device, electronic device and readable storage medium

By generating terrain prosthesis and level modes and segmenting the rendering scenes, the problem of long-range terrain occupation performance during large scene rendering in the existing technology is solved, and a more efficient rendering effect and better gaming experience is achieved.

CN114119836BActive Publication Date: 2025-02-21ARC GAMES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111469649.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-02-21
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

When rendering large scenes, especially mobile games, the long-range terrain effect is not obvious but takes up a lot of performance overhead. The LOD method of the UE4 engine cannot achieve continuity of topology structure, resulting in poor gaming experience.

Method used

By receiving the terrain prosthesis generated based on the real terrain and generating its materials and maps, the scene is divided into close-up terrain and long-range terrain according to the location of the target virtual character, the terrain prosthesis is used instead of long-range terrain, and the close-up terrain is rendered in combination with the level simple model , realize rendering of the entire scene.

Benefits of technology

On the premise of ensuring the overall effect, the memory demand and IO frequency are significantly reduced, the effect and performance overhead is balanced, and the gaming experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119836B_ABST
    Figure CN114119836B_ABST
Patent Text Reader

Abstract

The present application discloses a rendering method, device, electronic device and readable storage medium, the method comprising: receiving a terrain prosthesis generated according to real terrain, and generating the material and texture of the terrain prosthesis, wherein the terrain prosthesis is a static grid; dividing the scene to be rendered into near-view terrain and far-view terrain according to the position information of the target virtual character in the scene to be rendered; generating a level model according to the real terrain corresponding to the near-view terrain; merging the level model with the terrain prosthesis to achieve the rendering of the scene to be rendered. The present application uses less memory, reduces the frequency of IO, and achieves a balance between effect and performance overhead while ensuring far-view effect and terrain effect; for players, based on the different performance of players' mobile devices, the memory and performance overhead are reduced as much as possible while ensuring a relatively ideal effect, which greatly improves the gaming experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a rendering method, device, electronic device and readable storage medium. Background Art

[0002] As open world games become more and more popular, the terrain in the scene is getting larger and larger, and the memory and rendering overhead are also significantly increased. Especially for mobile games, the terrain in the scene is very large. Among them, the terrain effect at a long perspective is not obvious, but it still takes up a lot of performance overhead.

[0003] In the existing technology, UE4 engine is usually used for rendering of large scenes. The foreground terrain is Landscape (a rendering method in UE4, and there is no unified name in the industry), and the distant terrain can be implemented using LOD (Level of Details, a rendering method in UE4). It can be simply understood as baking a small piece of terrain into a simple static mesh and storing it in the level.

[0004] However, there are still many shortcomings in using the UE4 engine. For example, the default LOD of the terrain in the UE4 engine is to divide the terrain into many models, and then splice multiple models together. This method cannot achieve topological continuity, and the seams between plots can be seen. For example, the UE4 engine is not suitable for larger scenes of 4K and above. In larger scenes of 4K and above, although the LOD reduces the number of model faces, the large increase in plots will lead to extremely frequent input / output (IO), which increases IO consumption and takes up a lot of performance overhead. Summary of the invention

[0005] In view of the above situation, the embodiments of the present application propose a rendering method, device, electronic device and readable storage medium to overcome or partially overcome the defects of the prior art.

[0006] In a first aspect, a rendering method is provided, comprising:

[0007] Receiving a terrain prosthesis generated according to a real terrain, and generating a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh;

[0008] According to the position information of the target virtual character in the scene to be rendered, the scene to be rendered is divided into near-view terrain and far-view terrain;

[0009] Generate a simple level model according to the real terrain corresponding to the near-view terrain;

[0010] The level model is merged with the terrain prosthesis to achieve rendering of the scene to be rendered.

[0011] In a second aspect, a rendering device is provided, the device comprising:

[0012] A first generating unit is used to receive a terrain prosthesis generated according to a real terrain, and generate a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh;

[0013] A segmentation unit, configured to segment the real terrain of the scene to be rendered into near-view terrain and far-view terrain according to the position information of the target virtual character in the scene to be rendered;

[0014] The second generation unit is used to generate a simple model of the level according to the real terrain corresponding to the near-field terrain;

[0015] A fusion unit is used to fuse the level model with the terrain prosthesis to achieve rendering of the scene to be rendered.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform any of the above methods.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores one or more programs, and when the one or more programs are executed by an electronic device including multiple applications, the electronic device executes any of the above methods.

[0018] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0019] This application divides the game scene into near-field terrain and far-field terrain according to the position of the target virtual character in the game scene, replaces the far-field terrain with a terrain prosthesis, and uses a terrain model based on the real terrain for the near-field terrain, thereby rendering the entire game scene. While ensuring the overall effect, this application greatly reduces the memory demand and the frequency of IO input / output (Input / Output), achieving a balance between effect and performance overhead; for players, based on the different performance of their mobile devices, while ensuring a relatively ideal effect, it reduces memory and performance overhead as much as possible, greatly improving the gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 A schematic diagram showing a flow chart of a rendering method according to an embodiment of the present application;

[0022] Figure 2 A schematic diagram showing a flow chart of a rendering method according to another embodiment of the present application;

[0023] Figure 3 A schematic diagram showing the structure of a rendering device according to an embodiment of the present application is shown;

[0024] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0026] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0027] In the prior art, the UE4 engine is usually used to render the scenes in the game. Since the LOD of the UE4 engine divides the terrain into many plots, each plot generates a new static mesh according to the parameters of the LOD, and multiple models are spliced ​​into the distant terrain, the continuity of the topological structure cannot be achieved. Players can see the gaps between models, and the gaming experience is poor. In the open world, the terrain must reach 4K (resolution, which means that the pixel value per row in the horizontal direction reaches or approaches 4096, without considering the aspect ratio) or even larger, so there will be many plot levels. When the player moves at high speed, loading and unloading will be triggered frequently, which will cause a lot of IO consumption, greatly occupy the device performance, and even cause freezes.

[0028] The idea of ​​this application is that, in view of the above situation, this application introduces a terrain prosthesis strategy. First, according to the real terrain submitted by the artist, a terrain prosthesis with lower precision is generated to replace the distant terrain. Then it is merged with the near terrain using the terrain simplified model rendering technology, thereby realizing the rendering of the entire scene. In this way, the display effect of the distant terrain can be guaranteed, and the LOD of the distant plots does not need to be loaded, thereby achieving the purpose of significantly reducing IO, which is especially suitable for large scenes of 4K and above.

[0029] Figure 1A schematic diagram of a rendering method according to an embodiment of the present application is shown. Figure 1 It can be seen that the present application at least includes steps S110 to S140:

[0030] Step S110: receiving a terrain prosthesis generated according to a real terrain, and generating a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh.

[0031] The real terrain of a scene in the game is usually carved by art professionals. The real terrain is the real visual experience that game developers want to provide to gamers. However, in reality, due to the large size of the scene and the increasing resolution requirements, if the entire large scene is rendered using a relatively high-precision method, the amount of calculation will be very large, and the hardware performance requirements will be very high, which is a loss-making method.

[0032] In the prior art, in order to avoid the above situation, the UE4 engine is used to render the scenes in the game, and the terrain is divided into many plots. A new static mesh is generated for each plot according to the LOD parameters. Multiple models are spliced ​​into the distant terrain, and the continuity of the topological structure cannot be achieved. Players can see the gaps between models, and the gaming experience is poor. It is not suitable for large scenes with high resolution.

[0033] This application provides a rendering method that can solve the above problems well. First, a terrain prosthesis generated according to the real terrain is received. The terrain prosthesis is a static mesh. The static mesh is used as the model of the distant terrain prosthesis. The static mesh is the basic unit for creating the level world scene geometry in the Unreal Engine, and its form is usually a "static mesh actor". The use of static meshes can achieve a relatively ideal effect, which can not only ensure the ideal visual effect, but also save the performance overhead of hardware.

[0034] The terrain prosthesis is generated for the entire scene to be rendered, and the terrain prosthesis can be stored in the scene to be rendered all the time, thereby avoiding the current situation of frequently triggering loading and unloading of land levels in the prior art and significantly reducing the IO frequency.

[0035] In the terrain prosthesis, a simple shape can be used to represent an "object", such as a cone to represent a mountain. Of course, since the terrain prosthesis is a static mesh, the material and texture of the terrain prosthesis need to be generated during the rendering process. That is, the surface of the cone needs to be covered with grass, trees, mountains, rocks, etc., and the grass, trees, mountains, rocks, etc. can be expressed with materials and textures.

[0036] For the generation of materials and textures, reference may be made to any of the existing technologies, such as the method for generating materials and textures in the UE4 engine.

[0037] It should be noted that the terrain prosthesis is a whole static mesh generated for the entire scene, so it will not make players see the gaps between models as in the prior art using UE4's LOD.

[0038] Step S120: dividing the scene to be rendered into near-view terrain and far-view terrain according to the position information of the virtual character in the scene to be rendered.

[0039] The scene to be rendered is divided into near-view terrain and far-view terrain. For the segmentation process, the distance between the virtual character and the scene to be rendered should be taken into consideration. For example, a distance threshold can be preset based on the distance, and the terrain whose distance to the target virtual character is less than or equal to the distance threshold is defined as near-view terrain, and the terrain whose distance to the target virtual character is greater than the distance threshold is defined as far-view terrain. This segmentation method is only an exemplary description, and other segmentation methods can also be adopted, which can be determined according to the rendering effect to be achieved.

[0040] Step S130: Generate a simple level model according to the real terrain corresponding to the near-field terrain.

[0041] For the near-view terrain and the distant terrain, this application adopts two different processing methods. For the near-view terrain part, a method that can achieve higher precision and more ideal effect is required, which can be selected as needed. For example, the multi-level of detail (LOD) method in the prior art can be used. Since the precision requirement for the near-view terrain is relatively high, the LOD level can be set relatively high to meet the expected precision requirements. In LOD, in the near-view terrain, there are usually multiple models, and LOD usually renders each model separately. The use of the LOD method can obtain a more ideal rendering effect, but it consumes a lot of hardware performance.

[0042] To this end, a level model can be used to integrate multiple models into one model instead of the above method, such as using a layered level of detail (HLOD) method to first establish a model community and then generate a level model.

[0043] The process of establishing a model community determines how to group multiple models in the scene, the number of groups, whether to generate materials, etc. By fully considering the space, observation frequency, and the creator's self-defined strategy, the reasonable grouping of models is achieved, thus obtaining a cluster composed of models in different groups.

[0044] After obtaining a satisfactory model cluster, you can generate a level model. The level model generates a new mesh for the obtained model cluster. In this process, the materials will be combined and a new light map will be generated (if necessary). Although the level model uses a simple model to replace a bunch of models, the existence of the level model greatly reduces the complexity of the scene model, and can also reduce the Draw Call through certain settings. It is an effective means to balance the effect and consumption.

[0045] Step S140: Fusing the rendered near-view terrain with the terrain prosthesis to achieve rendering of the scene to be rendered.

[0046] Finally, the generated level model is combined with the terrain prosthesis to complete the rendering of the scene to be rendered.

[0047] This application does not limit the fusion method. For example, the corresponding position of the terrain prosthesis can be replaced with the generated level model in the same position, thereby completing the rendering work of the entire scene to be rendered.

[0048] Due to the existence of the terrain prosthesis, a high-precision rendering method was used for the near-field terrain at this time; while for the distant terrain, no processing was done, and the terrain prosthesis after generating materials and mapping was still retained, thus achieving the goal of both ensuring visual effects and reducing performance consumption.

[0049] Depend on Figure 1 It can be seen from the method shown that the present application divides the game scene into near-view terrain and far-view terrain according to the position of the target virtual character in the game scene, replaces the far-view terrain with a terrain prosthesis, and uses a terrain model based on the real terrain for the near-view terrain, thereby achieving the rendering of the entire game scene. While ensuring the overall effect, the present application greatly reduces the memory demand and IO frequency, achieving a balance between effect and performance overhead; for players, based on the different performance of players' mobile devices, while ensuring a relatively ideal effect, the memory and performance overhead are reduced as much as possible, greatly improving the gaming experience.

[0050] In some embodiments of the present application, receiving a terrain prosthesis generated based on real terrain includes: receiving the terrain prosthesis, wherein the terrain prosthesis is generated based on the real terrain based on Houdini software, and the height of each vertex of the terrain prosthesis is lower than the real terrain.

[0051] The terrain prosthesis can be understood as a large model prosthesis for the entire scene. The model prosthesis is a proxy mesh. The terrain prosthesis is usually generated by third-party software. The generation process of the terrain prosthesis can be generated by third-party software in the prior art. The idea is to simplify the real terrain. As mentioned above, a mountain is simplified into a cone, etc. The accuracy of the generated terrain prosthesis is lower than that of the real terrain, so as to reduce the amount of calculation. Since the distant terrain is far away, although the accuracy is reduced, its visual effect will not change significantly.

[0052] In some embodiments of the present application, the third-party software is Houdini (a three-dimensional computer graphics software, there is no unified Chinese name in the industry). Since Houdini is a product designed entirely based on the node model, Houdini has an interface for a third-party renderer, and can export scenes to other rendering engines for rendering. The reason why the present application recommends the use of Houdini software is that the programmatic node programming restrictions of Houdini software can be used to ensure that the height of each vertex of the terrain prosthesis is lower than the real terrain, so that "piercing the model" will not be caused, avoiding the bad gaming experience for game players due to piercing the model.

[0053] In some embodiments of the present application, the generation of materials and textures may refer to the following method: for materials, a first generation parameter of the material is received, and based on the first generation parameter, the material of the terrain prosthesis is generated, and the first generation parameter includes: material type, material color, material texture, etc.; for textures, a second generation parameter of the texture is received, and based on the second generation parameter, the texture of the terrain prosthesis is generated, and the second generation parameter includes: texture source, texture size, texture posture, etc.

[0054] For example, the generation of textures and materials can be based on the generation parameters of textures and materials, which can be set manually. For example, for the trunk of a tree model, when selecting the material, you can select the material raw material and the material texture. For example, if the material is originally wood and the material texture is pine, the model of the tree will show the appearance of a pine tree. Of course, for the mountains in the distance, there is no need to generate textures and materials for each tree. You only need to select the material of the mountain as a tree or a specific type of tree. If there are other objects on the mountain, such as a flying eagle, the eagle cannot be expressed by material. Here you can specify the texture source, texture size, texture posture and other parameters, and use the texture to display. It should be noted that there is a powerful database storage for textures and materials. When using them, you can directly call them by selection. If they are not in the database, you can also create them yourself and store them in the database for later use.

[0055] In other embodiments of the present application, for the generation of materials and textures, the following method can be referred to: receiving generation parameters of materials and textures, and generating material instances corresponding to the terrain prosthesis according to the generation parameters, and generating materials and textures of the terrain prosthesis according to the material instances.

[0056] Take materials as an example. When generating materials, hundreds of materials may be needed, which will affect the size of the package. In this regard, in some embodiments of the present application, materials may not be used directly, but material instances may be used. Material instances are instances of materials. Material instances inherit from materials and have the shader logic of materials, but only expose adjustable parameters (i.e., Params) and block the ability to edit shaders. The purpose is that when a certain model (or models) needs to modify parameters, it will not affect other models that use the material. And when the logic of the material is updated, all material instances will also be updated accordingly.

[0057] A material instance can integrate multiple materials together to form a material instance. In this application, since the terrain prosthesis is a permanent scene, the material instance can be a static material instance. By dragging the generated static material instance onto the terrain prosthesis, the generation of materials and textures can be achieved.

[0058] In some embodiments of the present application, in the above method, the merging of the level model with the terrain prosthesis includes: placing the terrain prosthesis at a corresponding position of the scene to be rendered; and in response to a scene loading instruction, executing the step of generating a level model based on the real terrain corresponding to the foreground terrain.

[0059] As for the terrain prosthesis, it can be understood as a permanent level of the scene. To keep it in the scene forever, you only need to place it at the corresponding position in the scene. It should be noted that this is the terrain prosthesis after the material and texture are generated.

[0060] When the game is running, when the virtual character in the game reaches a certain position, a scene loading instruction will be generated. At this time, the foreground terrain can be rendered in response to the scene loading instruction. Specifically, the step of generating a level model according to the real terrain corresponding to the foreground terrain is executed. It should be noted that the foreground terrain and the terrain prosthesis may have an overlapping part. For this part, the level model of the foreground terrain can be used to directly replace this part of the terrain prosthesis.

[0061] In some embodiments of the present application, the merging of the level model with the terrain prosthesis further includes: adjusting the highlight and roughness of the material and texture of the terrain prosthesis to make the terrain prosthesis close to the real terrain.

[0062] Since the foreground terrain is rendered based on the real terrain, the influence of light and shadow has been taken into account during the rendering. In the process of fusion with the terrain prosthesis, it is best to adjust the highlight position, roughness and other effects of the material and texture on the surface of the terrain prosthesis to pursue a rendering effect that is closer to the real terrain.

[0063] In some embodiments of the present application, in the above method, the highlight and roughness of the material and texture of the terrain prosthesis are adjusted, including: receiving effect parameters of the material and texture, and adjusting the display effect of the generated texture and material according to the effect parameters, wherein the effect parameters include highlight position and roughness.

[0064] Parameters such as light source position and roughness also have a great impact on the visual effects displayed by the model. After generating textures and materials, the display effects of the generated textures and materials can be adjusted according to the obtained effect parameters to improve the realism of the distant terrain prosthesis.

[0065] Taking the position of the light source as an example, the position of the sun at 8:00 am and 12:00 noon is different, and the shadows and grayscale formed are also different. Therefore, it is best to set these effect parameters and adjust the display effects of the textures and materials according to these effect parameters to achieve an effect that is very close to the real terrain.

[0066] These effect parameters can be set or adjusted manually. The staff can adjust these effect parameters according to the position of the light source in the foreground terrain and the roughness of the material, so that the display effect of the foreground terrain is more coordinated with the display effect of the distant terrain and more in line with the real terrain.

[0067] In some embodiments of the present application, the method further includes: integrating any of the above methods into an interface-callable script, so that the UE4 engine can call the script through the interface.

[0068] UE4 engine is the most common rendering engine at present. In this application, there are also many places where existing technologies are needed. For the convenience of use, the code that implements any method of this application can be synthesized into a script that can be called through an interface to facilitate the reference of the UE4 engine. That is, when rendering, the UE4 engine can still be used as a rendering engine, and by calling the script, the scene can be rendered using the method of this application.

[0069] Figure 2 A schematic diagram of a rendering method according to another embodiment of the present application is shown. Figure 2 It can be seen that this embodiment includes:

[0070] A terrain prosthesis generated by Houdini software according to the real terrain is received, and materials and textures of the terrain prosthesis are generated, wherein each vertex of the terrain prosthesis is lower than the real terrain.

[0071] A distance threshold is set to determine whether the distance between a model and the target virtual character is greater than the distance threshold. If so, the model is classified as distant terrain; if not, the model is classified as near terrain.

[0072] In response to the scene loading instruction, the terrain prosthesis is placed at the corresponding position of the scene to be rendered, and the existing method in UE4 is used to render the near-field terrain with high precision according to the corresponding real terrain to complete the rendering of the scene to be rendered.

[0073] Figure 3 A schematic diagram of the structure of a rendering device according to an embodiment of the present application is shown. Figure 3 It can be seen that the device 300 comprises:

[0074] The first generating unit 310 is used to receive a terrain prosthesis generated according to a real terrain, and generate a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh;

[0075] The segmentation unit 320 is used to segment the real terrain of the scene to be rendered into near-view terrain and far-view terrain according to the position information of the target virtual character in the scene to be rendered;

[0076] The second generating unit 330 is used to generate a simple model of the level according to the real terrain corresponding to the near-view terrain;

[0077] The fusion unit 340 is used to fuse the level model with the terrain prosthesis to achieve rendering of the scene to be rendered.

[0078] In some embodiments of the present application, in the above-mentioned device, the first generating unit 310 is used to receive the terrain prosthesis, wherein the terrain prosthesis is generated based on Houdini software according to the real terrain, and the height of each vertex of the terrain prosthesis is lower than the real terrain.

[0079] In some embodiments of the present application, in the above-mentioned device, the first generation unit 310 is used to receive the first generation parameters of the material, and generate the material of the terrain prosthesis according to the first generation parameters, and the first generation parameters include: material type, material color, material texture; receive the second generation parameters of the map, and generate the map of the terrain prosthesis according to the second generation parameters, and the second generation parameters include: map source, map size, map posture.

[0080] In some embodiments of the present application, in the above-mentioned device, the fusion unit 340 is used to place the terrain prosthesis at a corresponding position of the scene to be rendered; in response to the scene loading instruction, execute the step of generating a simple level model based on the real terrain corresponding to the foreground terrain.

[0081] In some embodiments of the present application, in the above-mentioned device, the fusion unit 340 is further used to adjust the material of the terrain prosthesis and the highlight and roughness of the texture to make the terrain prosthesis close to the real terrain.

[0082] In some embodiments of the present application, in the above-mentioned device, the fusion unit 340 is also used to receive effect parameters of materials and maps, and adjust the display effects of the generated maps and materials according to the effect parameters, wherein the effect parameters include highlight position and roughness.

[0083] In some embodiments of the present application, the above-mentioned device also includes: an integration unit, which is used to integrate any of the above-mentioned methods into an interface-callable script; and integrate the callable script into the UE4 engine through the interface.

[0084] It should be noted that the above-mentioned rendering device can implement the above-mentioned rendering methods one by one, and will not be described in detail here.

[0085] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 4 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.

[0086] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0087] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0088] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a rendering device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0089] Receiving a terrain prosthesis generated according to a real terrain, and generating a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh;

[0090] According to the position information of the target virtual character in the scene to be rendered, the scene to be rendered is divided into near-view terrain and far-view terrain;

[0091] Generate a simple level model according to the real terrain corresponding to the near-view terrain;

[0092] The level model is merged with the terrain prosthesis to achieve rendering of the scene to be rendered.

[0093] The above application Figure 3The method performed by the rendering device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0094] The electronic device may also perform Figure 3 The method executed by the rendering device in Figure 3 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0095] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 3 The method performed by the rendering device in the illustrated embodiment is specifically used to perform:

[0096] Receiving a terrain prosthesis generated according to a real terrain, and generating a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh;

[0097] According to the position information of the target virtual character in the scene to be rendered, the scene to be rendered is divided into near-view terrain and far-view terrain;

[0098] Generate a simple level model according to the real terrain corresponding to the near-view terrain;

[0099] The level model is merged with the terrain prosthesis to achieve the rendering of the scene to be rendered. It should be understood by those skilled in the art that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0103] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0104] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0105] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0106] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0107] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0108] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A rendering method, characterized in that: include: Receiving a terrain prosthesis generated according to a real terrain, and generating a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh; According to the position information of the target virtual character in the scene to be rendered, the scene to be rendered is divided into near-view terrain and far-view terrain; Generate a simple level model according to the real terrain corresponding to the near-view terrain; Merging the level model with the terrain prosthesis to achieve rendering of the scene to be rendered; The receiving of a terrain prosthesis generated according to the real terrain comprises: receiving the terrain prosthesis, wherein the terrain prosthesis is generated based on Houdini software according to the real terrain, and the height of each vertex of the terrain prosthesis is lower than the real terrain; The step of generating a level model according to the real terrain corresponding to the near-view terrain includes: According to the real terrain corresponding to the foreground terrain, a model community is established to generate a level simple model, wherein the level simple model generates a new mesh body for the obtained model community, combines materials during the mesh body generation process, and generates a new light map, and uses the level simple model to integrate multiple models into one simple model.

2. The method according to claim 1, characterized in that The step of generating the material and texture of the terrain prosthesis includes: receiving first generation parameters of the material, and generating the material of the terrain prosthesis according to the first generation parameters, wherein the first generation parameters include: material type, material color, and material texture; A second generation parameter of the texture is received, and a texture of the terrain prosthesis is generated according to the second generation parameter, wherein the second generation parameter includes: a texture source, a texture size, and a texture posture.

3. The method according to claim 1, characterized in that The step of fusing the level model with the terrain prosthesis comprises: Placing the terrain prosthesis at a corresponding position of the scene to be rendered; In response to the scene loading instruction, the step of generating a simple model of the level according to the real terrain corresponding to the foreground terrain is executed.

4. The method according to claim 3, characterized in that The step of fusing the level model with the terrain prosthesis further includes: The material of the terrain prosthesis and the highlight and roughness of the texture are adjusted to make the terrain prosthesis close to the real terrain.

5. The method according to claim 4, characterized in that The adjusting of the material and the highlight and roughness of the texture of the terrain prosthesis includes: Receive effect parameters of the material and the map, and adjust the display effect of the generated map and the material according to the effect parameters, wherein the effect parameters include highlight position and roughness.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Integrate the method described in any one of claims 1 to 5 into an interface callable script; The callable script is integrated into the UE4 engine through an interface.

7. A rendering device, characterized in that: The device comprises: A first generating unit is used to receive a terrain prosthesis generated according to a real terrain, and generate a material and a texture of the terrain prosthesis, wherein the terrain prosthesis is a static mesh; A segmentation unit, configured to segment the real terrain of the scene to be rendered into near-view terrain and far-view terrain according to the position information of the target virtual character in the scene to be rendered; The second generation unit is used to generate a simple model of the level according to the real terrain corresponding to the near-field terrain; A fusion unit, used for fusing the level model with the terrain prosthesis to achieve rendering of the scene to be rendered; The first generating unit is used to receive the terrain prosthesis, wherein the terrain prosthesis is generated based on Houdini software according to the real terrain, and the height of each vertex of the terrain prosthesis is lower than the real terrain; The second generation unit is used to establish a model community and generate a level simple model based on the real terrain corresponding to the foreground terrain, wherein the level simple model generates a new mesh body for the obtained model community, combines materials during the mesh body generation process, and generates a new light map, and uses the level simple model to integrate multiple models into one simple model.

8. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, which when executed cause the processor to perform the method of claims 1 to 6.

9. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of application programs, causes the electronic device to execute the method of claims 1 to 6.

Citation Information

Patent Citations

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

    CN111105491A

  • Model rendering method and device, electronic device and storage medium

    CN111415400A

  • Generation of variations in computer graphics from intermediate file formats of limited variability, including generation of different game outcomes

    US20180322725A1