Rendering display method, rendering display device, electronic equipment and storage medium

By recording the area information of the target terrain area at runtime virtual texture (RVT) Mask channel, including crop species and rotation values, the problem that traditional RVT technology cannot update the rendering effect of the target terrain area in real time is solved, and the rendering effect is updated with the change of crop growth state in the distance is achieved, improving performance and nature.

CN119672197APending Publication Date: 2025-03-21GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411876244.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

Traditional runtime virtual texture (RVT) technology cannot update the rendering effect of the target terrain area changing with the growth state of the crop in real time.

Method used

By recording the area information of the target terrain area on the virtual surface in the Mask channel of the runtime virtual texture RVT, including crop type information and rotation value, the area information is obtained from the Mask channel during the rendering stage. If the distance between the target terrain area and the virtual camera is greater than or equal to the preset distance threshold, the corresponding map is obtained based on the crop type information, and a crop effect is generated in the target terrain area.

Benefits of technology

The target terrain area is achieved in real time to update the rendering effect in the distance as crop species and growth state changes, improve performance, and achieve more natural crop performance based on RVT.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672197A_ABST
    Figure CN119672197A_ABST
Patent Text Reader

Abstract

The invention provides a rendering display method, a rendering display device, electronic equipment and a storage medium. The rendering display method comprises the steps that area information of a target terrain area on a virtual earth surface is recorded in a Mask channel of a virtual texture RVT during operation, the area information comprises crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states; and in the rendering stage, obtaining the region information from the Mask channel, if the distance between a target terrain region corresponding to the region information and the virtual camera is greater than or equal to a preset distance threshold value, obtaining a first map corresponding to the crop type and the crop growth state based on the crop type information, and generating a crop effect in the target terrain region based on the first map. According to the rendering display method provided by the embodiment of the invention, the rendering performance of real-time updating change of the target terrain area along with the change of the crop growth state is realized on the basis of the RVT during the long-range view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a rendering display method, a rendering display device, an electronic device and a storage medium. Background Art

[0002] In some games, there are terrain areas that need to be updated in real time, and the rendering on this terrain area is an important visual and functional element. For example, in a surface scene containing a farmland area, the following effects need to be achieved: in the distant view (when the virtual camera is far away), the material of the farmland area can be updated in real time according to the growth status of the crops in the current farmland area (such as seedlings, maturity, harvest, etc.).

[0003] Runtime Virtual Texture (RVT) is a texture technology in game engines that allows complex materials and details to be rendered into virtual textures at runtime, thereby improving performance and detail. However, in related technologies, RVT cannot be updated in real time and cannot directly show the rendering effect of the target terrain area being updated in real time as the crop growth status changes. Summary of the invention

[0004] In view of this, the present invention provides a rendering display method, a rendering display device, an electronic device and a storage medium, which can solve the problem that traditional RVT technology cannot show the real-time update of the target terrain area as the crop growth status changes.

[0005] In a first aspect, an embodiment of the present invention provides a rendering and display method, comprising: recording regional information of a target terrain area on a virtual surface in a Mask channel of a runtime virtual texture RVT, the regional information comprising crop type information, different crop type information corresponding to different combinations of crop types and crop growth states; in a rendering stage, obtaining the regional information from the Mask channel, and if the distance between the target terrain area corresponding to the regional information and a virtual camera is greater than or equal to a preset distance threshold, obtaining a first map corresponding to the crop type and the crop growth state based on the crop type information, and generating a crop effect in the target terrain area based on the first map.

[0006] According to the aforementioned implementation of the first aspect of the present invention, the area information also includes a rotation value, and the area information of the target terrain area on the virtual surface is recorded in the Mask channel of the runtime virtual texture RVT, including: recording the crop type information and the rotation value of the area information in different quantiles of the Mask channel of the RVT.

[0007] According to any of the aforementioned embodiments of the first aspect of the present invention, the target terrain area information also includes an area definition value. After obtaining the area information from the Mask channel, the method also includes: determining the target terrain area on the virtual surface based on a comparison result of the area definition value of the sampling grid with a preset definition threshold.

[0008] According to any of the aforementioned implementations of the first aspect of the present invention, based on the crop type information, obtaining a first map corresponding to the crop type and the crop growth status, and generating a crop effect in the target terrain area based on the first map, includes: outputting a first numerical value corresponding to the crop type information based on the crop type information; based on the first numerical value, selecting a map corresponding to the first numerical number from a texture array to obtain a first map corresponding to the crop type and the crop growth status; and generating a crop effect in the target terrain area based on the first map.

[0009] According to any of the aforementioned embodiments of the first aspect of the present invention, the area information also includes a rotation value, and generating a crop effect in the target terrain area based on the first map includes: setting the UV coordinates of the first map based on the rotation value, and generating a crop effect in the target terrain area based on the first map.

[0010] According to any of the aforementioned embodiments of the first aspect of the present invention, the method further includes: if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, generating a crop model corresponding to the crop type information on the target terrain area.

[0011] According to any of the aforementioned implementations of the first aspect of the present invention, if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, the target terrain area is also configured with a second map, and the second map includes a surface soil effect.

[0012] According to any of the aforementioned implementations of the first aspect of the present invention, generating the crop effect in the target terrain area based on the first map includes: performing texture blending of the first map and the second map in the target terrain area.

[0013] According to any of the aforementioned embodiments of the first aspect of the present invention, generating a crop effect in the target terrain area based on the first map further includes: determining a mixing ratio of the first map and the second map based on a distance between the target terrain area corresponding to the area information and the virtual camera.

[0014] In a second aspect, an embodiment of the present invention provides a rendering display device, comprising: an information recording module, configured to record region information of a target terrain region on a virtual surface in a Mask channel of a runtime virtual texture RVT, wherein the region information includes crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states;

[0015] The first rendering module is used to obtain the area information from the Mask channel, and when the distance between the target terrain area corresponding to the area information and the virtual camera is greater than or equal to a preset distance threshold, obtain a first map corresponding to the crop type and the crop growth state based on the crop type information, and generate a crop effect in the target terrain area based on the first map.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement a rendering and display method according to any of the aforementioned embodiments of the first aspect of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, characterized in that the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the rendering and display method according to any of the aforementioned embodiments of the first aspect of the present invention.

[0018] According to the rendering display method, rendering display device, electronic device and storage medium of the embodiment of the present invention, the regional information of the target terrain area on the virtual surface is recorded in the Mask channel of the virtual texture RVT at runtime. In the embodiment of the present invention, the regional information includes crop type information. Different crop type information corresponds to different combinations of crop types and crop growth states. Therefore, different crop type information can match the maps showing different crops in different growth states. In the rendering stage, the regional information is obtained from the Mask channel, and the rendering mode of the target terrain area is switched based on the distance between the target terrain area and the virtual camera. If the distance between the target terrain area corresponding to the regional information and the virtual camera is greater than or equal to the distance threshold, it is a distant view at this time. Based on the crop type information, a first map corresponding to the crop type and the crop growth state is obtained, and a crop effect is generated in the target terrain area based on the first map. At this time, the rendering effect in the target terrain area is expressed as the crop model is removed from the target terrain area, and the surface material of the target terrain area has a specific surface crop texture effect. Moreover, since the first map corresponds to the crop type information, the rendering effect of the target terrain area in the distant view can also be updated with the crop type information. In the above rendering scheme, the performance of the target terrain area in the distance can be improved through RVT technology, and based on RVT, the rendering performance of the target terrain area can be updated in real time as the growth status of the crop changes.

[0019] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 A flowchart of a rendering and display method provided by an embodiment of the present invention;

[0023] Figure 2A flowchart of the steps of obtaining a first map corresponding to a crop type and a crop growth state based on crop type information, and generating a crop effect in a target terrain area based on the first map in a rendering display method provided by an embodiment of the present invention;

[0024] Figure 3 A structural block diagram of a rendering and display device provided by an embodiment of the present invention;

[0025] Figure 4 A structural block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0027] In some games, there are terrain areas that need to be updated in real time, and the rendering on this terrain area is an important visual and functional element. For example, in a strategy game (Simulation Game, SLG), in a surface scene containing a farmland area, the following effects need to be achieved: in the long view (when the virtual camera is far away), the material of the target terrain area can be updated in real time according to the growth status of the crops in the current target terrain area (such as seedlings, maturity, harvest, etc.).

[0028] Runtime Virtual Texture (RVT) is a texture technology in game engines that allows complex materials and details to be rendered into virtual textures at runtime, thereby improving performance and detail. However, in related technologies, RVT cannot be updated in real time, and cannot directly show the target terrain area in the distance and the area rendering effect of real-time update changes as the crop growth status changes.

[0029] Based on this, the embodiments of the present invention provide a rendering display method, a rendering display device, an electronic device and a storage medium, which use RVT technology to render the target terrain area in the long view to improve performance, and based on RVT, realize the rendering performance of the target terrain area that is updated in real time as the crop growth status changes.

[0030] In one embodiment of the present invention, the rendering display method can be run on a local terminal device (touch or non-touch client device) or a server. When the rendering display method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0031] In some optional implementations, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running body of the game program and the game screen presentation body are separated. The storage and operation of the rendering display method are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0032] In some optional embodiments, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0033] In a possible implementation, an embodiment of the present invention provides a rendering display method, which provides a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above. A graphical user interface is provided through the terminal device, and the graphical user interface can display interface content, such as game scene screens, communication interaction windows, game map data, etc., according to the type of application started.

[0034] To facilitate understanding of this embodiment, a rendering display method disclosed in an embodiment of the present invention is first described in detail. Figure 1This is a flow chart of a rendering and display method provided by an embodiment of the present invention. In this embodiment, the rendering and display method includes steps S110 to S120.

[0035] In step S110, the region information of the target terrain region on the virtual surface is recorded in the Mask channel of the runtime virtual texture RVT, the region information includes crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states.

[0036] In some embodiments, the target terrain area may be a farmland area, and in other embodiments, the target terrain area may be a grassland area, a hillside area, or other terrain areas.

[0037] In this embodiment, the crop growth status includes, for example, seedling, mature, harvest and other growth states.

[0038] In some embodiments, the region information also includes a rotation value. The above step of recording the region information of the target terrain region on the virtual surface in the Mask channel of the runtime virtual texture RVT includes: recording the crop type information and the rotation value of the region information in different percentiles of the Mask channel of the RVT. In one example, the crop type information of the region information is recorded in the percentile of the Mask channel of the RVT, and the rotation value is recorded in the thousandth of the Mask channel of the RVT.

[0039] In step S120, during the rendering stage, regional information is obtained from the Mask channel. If the distance between the target terrain area corresponding to the regional information and the virtual camera is greater than or equal to a preset distance threshold, a first map corresponding to the crop type and crop growth status is obtained based on the crop type information, and a crop effect is generated in the target terrain area based on the first map.

[0040] In some embodiments, the region information further includes a region definition value. The region definition value is used to define a target terrain region on the virtual surface. In one example, a definition threshold is preset so that grids with region definition values ​​greater than or equal to the definition threshold are located in the target terrain region.

[0041] In some embodiments, after the step of acquiring area information from the Mask channel, the rendering and display method further includes: determining the target terrain area on the virtual surface based on a comparison result of the area definition value of the sampling grid and a preset definition threshold.

[0042] In one example, the definition threshold is 0.9. At this time, based on the comparison result of the area definition value of the sampling grid and the preset definition threshold, the step of determining the target terrain area on the virtual surface is: if the area definition value of the sampling grid (for example, the area definition value recorded in the "maskRVT" column) is greater than 0.9, then the sampling grid belongs to the target terrain area.

[0043] When the distance between the target terrain area corresponding to the area information and the virtual camera is greater than or equal to the distance threshold, it is equivalent to the distant view state and switches to the distant view rendering mode.

[0044] Figure 2 A flowchart of the steps of obtaining a first map corresponding to a crop type and a crop growth state based on crop type information, and generating a crop effect in a target terrain area based on the first map in a rendering display method provided in an embodiment of the present invention. In some embodiments, the steps of obtaining a first map corresponding to a crop type and a crop growth state based on crop type information, and generating a crop effect in a target terrain area based on the first map include steps S121 to S123.

[0045] In step S121, based on the crop type information, a first numerical value corresponding to the crop type information is output.

[0046] The first value is the crop state value, which is used to correspond to different growth states of the crop. In some embodiments, a plurality of first values, namely, a plurality of crop state values, are defined by a material parameter set, and a corresponding first value, namely, a crop state value, is selected for output according to crop type information.

[0047] In step S122, based on the first numerical value, a map corresponding to the first numerical number is selected from the texture array to obtain a first map corresponding to the crop type and the crop growth status.

[0048] In some embodiments, the first value is used as the Z coordinate of the texture array sample to select a map corresponding to the first value number from the texture array.

[0049] In step S123 , a crop effect is generated in the target terrain area based on the first map.

[0050] In some embodiments, the region information further includes a rotation value. In some embodiments, the step of generating a crop effect in the target terrain region based on the first texture includes: setting UV coordinates of the first texture based on the rotation value, and generating a crop effect in the target terrain region based on the first texture.

[0051] In some embodiments, the rendering and display method further includes: if the distance between the target terrain area corresponding to the region information and the virtual camera is less than a preset distance threshold, generating a crop model corresponding to the crop type information on the target terrain area. That is, when the distance between the target terrain area corresponding to the region information and the virtual camera is less than the preset distance threshold, it is equivalent to a close-up state, and the close-up rendering mode is switched.

[0052] In some embodiments, if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, the target terrain area is further configured with a second map, and the second map includes a surface soil effect. That is, in the close-up rendering mode, a crop model corresponding to the crop type information is generated on the target terrain area, and the target terrain area is configured with a second map, and the second map includes a surface soil effect.

[0053] In some embodiments, the step of generating a crop effect in the target terrain area based on the first texture includes: blending the first texture with the second texture in the target terrain area. That is, in the distant view, blending the first texture including the surface crop effect with the second texture including the surface soil effect in the target terrain area.

[0054] In some embodiments, the step of generating a crop effect in the target terrain area based on the first texture further includes: determining a mixing ratio of the first texture and the second texture based on the distance between the target terrain area corresponding to the area information and the virtual camera. Therefore, in the distant view, as the distance between the target terrain area corresponding to the area information and the virtual camera changes, the mixing ratio of the first texture and the second texture in the target terrain area changes accordingly, so as to achieve a smoother transition of the rendering effect of the target terrain area when the viewing angle is zoomed.

[0055] According to the rendering and display method of the embodiment of the present invention, the regional information of the target terrain area on the virtual surface is recorded in the Mask channel of the virtual texture RVT at runtime. In the embodiment of the present invention, the regional information includes crop type information. Different crop type information corresponds to different combinations of crop types and crop growth states. Therefore, different crop type information can match the maps showing different crops in different growth states. In the rendering stage, the regional information is obtained from the Mask channel, and the rendering mode of the target terrain area is switched based on the distance between the target terrain area and the virtual camera. If the distance between the target terrain area corresponding to the regional information and the virtual camera is greater than or equal to the distance threshold, it is a distant view at this time. Based on the crop type information, a first map corresponding to the crop type and the crop growth state is obtained, and a crop effect is generated in the target terrain area based on the first map. At this time, the rendering effect in the target terrain area is expressed as the crop model is removed from the target terrain area, and the surface material of the target terrain area has a specific surface crop texture effect. Moreover, since the first map corresponds to the crop type information, the rendering effect of the target terrain area in the distant view can also be updated with the crop type information. In the above rendering scheme, the performance of the target terrain area in the distance can be improved through RVT technology, and based on RVT, the rendering performance of the target terrain area can be updated in real time as the growth status of the crop changes.

[0056] In some embodiments of the present invention, during the rendering stage, the region information is obtained from the Mask channel, and the rendering mode of the target terrain region is switched based on the distance between the target terrain region corresponding to the region information and the virtual camera. If the distance between the target terrain region and the virtual camera is less than the preset distance threshold, it is a close view, so it is switched to the close view rendering mode. In the close view rendering mode, a crop model corresponding to the crop type information is generated on the target terrain region. At this time, the rendering effect of the target terrain region is manifested as a crop model of a farmland normally displayed on the surface of the target terrain region. Optionally, in the close view rendering mode, a second map is also configured in the target terrain region, wherein the second map includes a surface soil effect. At this time, the rendering effect of the target terrain region is manifested as the surface of the target terrain region being a soil surface material, and the crop model of a farmland is normally displayed on the surface of the target terrain region. If the distance between the target terrain area and the virtual camera is greater than or equal to the distance threshold, it is a distant view, so it is switched to distant view rendering mode. In the distant view rendering mode, based on the crop type information, a first map corresponding to the crop type and the crop growth state is obtained, and a crop effect is generated in the target terrain area based on the first map, wherein the first map includes a surface crop effect. At this time, the rendering effect in the target terrain area is manifested as the crop model is removed from the target terrain area, and the surface material of the target terrain area has a specific surface crop texture effect. Moreover, since the first map corresponds to the crop type information, the rendering effect of the target terrain area in the distant view can also be updated with the crop type information.

[0057] According to the rendering and display method of an embodiment of the present invention, large-scale crop texture data is dynamically managed at runtime through RVT technology, which significantly reduces video memory usage and rendering overhead. In some embodiments, through vertex animation and physical simulation technology, the crops in the target terrain area appear more naturally in dynamic environments such as wind and rain, thereby enhancing the immersion of the game. In some embodiments, through dynamic materials and blending technologies such as pixel jitter, the material transition of crops in the target terrain area during the growth stage is ensured to be natural, avoiding harsh visual effects. In some embodiments, the rendering and display method of an embodiment of the present invention can combine level of detail (LOD) and asynchronous loading technology to maintain high frame rates in large-scale scenes and provide a smooth gaming experience.

[0058] The embodiment of the present invention also provides a rendering display device. Figure 3 The structural block diagram of a rendering display device provided by an embodiment of the present invention is as follows. The rendering display device comprises an information recording module 110 and a first rendering module 120 .

[0059] The information recording module 110 is used to record the regional information of the target terrain area on the virtual surface in the Mask channel of the virtual texture RVT at runtime. The regional information includes crop type information. Different crop type information corresponds to different combinations of crop types and crop growth states.

[0060] The first rendering module 120 is used to obtain area information from the Mask channel, and when the distance between the target terrain area corresponding to the area information and the virtual camera is greater than or equal to a preset distance threshold, obtain a first map corresponding to the crop type and crop growth status based on the crop type information, and generate a crop effect in the target terrain area based on the first map.

[0061] According to the rendering display device of the embodiment of the present invention, the information recording module 110 records the regional information of the target terrain area on the virtual surface in the Mask channel of the virtual texture RVT at runtime. In the embodiment of the present invention, the regional information includes crop type information. Different crop type information corresponds to different combinations of crop types and crop growth states. Therefore, different crop type information can match maps showing different crops in different growth states. In the rendering stage, the first rendering module 120 is used to obtain the regional information from the Mask channel, and when the distance between the target terrain area corresponding to the regional information and the virtual camera is greater than or equal to a preset distance threshold, based on the crop type information, obtain the first map corresponding to the crop type and the crop growth state, and generate a crop effect in the target terrain area based on the first map. At this time, the rendering effect in the target terrain area is manifested as the crop model is removed from the target terrain area, and the surface material of the target terrain area has a specific surface crop texture effect. Moreover, since the first map corresponds to the crop type information, the rendering effect of the target terrain area in the distant view can also be updated with the crop type information. In the above rendering scheme, the performance of the target terrain area in the distance can be improved through RVT technology, and based on RVT, the rendering performance of the target terrain area can be updated in real time as the growth status of the crop changes.

[0062] In some embodiments, the region information further includes a rotation value, and the information recording module 110 is configured to record the crop type information and the rotation value of the region information in different quantiles of the Mask channel of the RVT.

[0063] In some embodiments, the area information also includes an area definition value, and the rendering display device also includes an area determination module 130. The area determination module 130 is used to determine the target terrain area on the virtual surface based on the comparison result of the area definition value of the sampling grid and the preset definition threshold after obtaining the area information from the Mask channel.

[0064] In some embodiments, the first rendering module 120 is configured to: output a first numerical value corresponding to the crop type information according to the crop type information; based on the first numerical value, select a map corresponding to the first numerical number from the texture array to obtain a first map corresponding to the crop type and crop growth status; and generate a crop effect in the target terrain area based on the first map.

[0065] In some embodiments, the region information further includes a rotation value, and the first rendering module 120 is configured to: set the UV coordinates of the first map based on the rotation value, and generate a crop effect in the target terrain area based on the first map.

[0066] In some embodiments, the rendering and display device also includes a second rendering module 140, which is used to generate a crop model corresponding to the crop type information on the target terrain area when the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold.

[0067] In some embodiments, the second rendering module 140 is configured to: when the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, configure a second map to the target terrain area, the second map including a surface soil effect.

[0068] In some embodiments, the first rendering module 120 is configured to perform texture blending on the first texture and the second texture in the target terrain area.

[0069] In some embodiments, the first rendering module 120 is configured to determine a mixing ratio of the first texture and the second texture based on a distance between the target terrain area corresponding to the area information and the virtual camera.

[0070] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above rendering and display method.

[0071] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. The electronic device includes a processor 901 and a memory 902. The memory 902 stores machine executable instructions that can be executed by the processor 901. The processor 901 executes the machine executable instructions to implement the above-mentioned rendering display method.

[0072] The rendering and display method includes: recording the regional information of the target terrain area on the virtual surface in the Mask channel of the runtime virtual texture RVT, the regional information including crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states; in the rendering stage, obtaining the regional information from the Mask channel, if the distance between the target terrain area corresponding to the regional information and the virtual camera is greater than or equal to a preset distance threshold, based on the crop type information, obtaining a first map corresponding to the crop type and the crop growth state, and generating a crop effect in the target terrain area based on the first map.

[0073] Furthermore, the electronic device may further include a communication interface 903 and a bus 904 , and the processor 901 , the communication interface 903 and the memory 902 are connected via the bus 904 .

[0074] Among them, the memory 902 may include 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. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 903 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 904 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus is represented by only one bidirectional arrow in the drawings of this application, but it does not mean that there is only one bus or one type of bus.

[0075] The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 901. The above processor 901 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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 invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may 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 902, and the processor 901 reads the information in the memory 902 and completes the steps of the method of the above embodiment in combination with its hardware.

[0076] In some embodiments, the region information also includes a rotation value, and the region information of the target terrain area on the virtual surface is recorded in the Mask channel of the runtime virtual texture RVT, including: recording the crop type information and rotation value of the region information in different quantiles of the Mask channel of the RVT.

[0077] In some embodiments, the target terrain area information also includes an area definition value. After obtaining the area information from the Mask channel, the rendering and display method also includes: determining the target terrain area on the virtual surface based on a comparison result of the area definition value of the sampling grid with a preset definition threshold.

[0078] In some embodiments, based on crop type information, a first map corresponding to the crop type and the crop growth status is obtained, and a crop effect is generated in a target terrain area based on the first map, including: outputting a first numerical value corresponding to the crop type information according to the crop type information; based on the first numerical value, selecting a map corresponding to the first numerical number from a texture array to obtain a first map corresponding to the crop type and the crop growth status; and generating a crop effect in the target terrain area based on the first map.

[0079] In some embodiments, the region information further includes a rotation value, and generating a crop effect in the target terrain region based on the first map includes: setting UV coordinates of the first map based on the rotation value, and generating a crop effect in the target terrain region based on the first map.

[0080] In some embodiments, the rendering and display method further includes: if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, generating a crop model corresponding to the crop type information on the target terrain area.

[0081] In some embodiments, if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, the target terrain area is further configured with a second map, and the second map includes a surface soil effect.

[0082] In some embodiments, generating a crop effect in a target terrain area based on a first texture includes: texture blending the first texture with the second texture in the target terrain area.

[0083] In some embodiments, generating a crop effect in a target terrain area based on the first map further includes: determining a mixing ratio of the first map and the second map based on a distance between the target terrain area corresponding to the area information and the virtual camera.

[0084] According to an embodiment of the present invention, the electronic device includes a processor 901 and a memory 902. When the processor 901 executes machine executable instructions to implement the above rendering display method, the region information of the target terrain area on the virtual surface is recorded in the Mask channel of the virtual texture RVT at runtime. In the embodiment of the present invention, the region information includes crop type information. Different crop type information corresponds to different combinations of crop types and crop growth states. Therefore, different crop type information can match maps showing different crops in different growth states. In the rendering stage, the region information is obtained from the Mask channel, and the rendering mode of the target terrain area is switched based on the distance between the target terrain area and the virtual camera. If the distance between the target terrain area corresponding to the region information and the virtual camera is greater than or equal to the distance threshold, it is a distant view at this time. Based on the crop type information, a first map corresponding to the crop type and the crop growth state is obtained, and a crop effect is generated in the target terrain area based on the first map. At this time, the rendering effect in the target terrain area is expressed as the target terrain area culling the crop model, and the surface material of the target terrain area has a specific surface crop texture effect, and because the first map corresponds to the crop type information, the rendering effect of the target terrain area in the distant view can also be updated with the crop type information. In the above rendering scheme, the performance of the target terrain area in the distance can be improved through RVT technology, and based on RVT, the rendering performance of the target terrain area can be updated in real time as the growth status of the crop changes.

[0085] This embodiment further provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned rendering and display method.

[0086] The rendering and display method includes: recording the regional information of the target terrain area on the virtual surface in the Mask channel of the runtime virtual texture RVT, the regional information including crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states; in the rendering stage, obtaining the regional information from the Mask channel, if the distance between the target terrain area corresponding to the regional information and the virtual camera is greater than or equal to a preset distance threshold, based on the crop type information, obtaining a first map corresponding to the crop type and the crop growth state, and generating a crop effect in the target terrain area based on the first map.

[0087] In some embodiments, the region information also includes a rotation value, and the region information of the target terrain area on the virtual surface is recorded in the Mask channel of the runtime virtual texture RVT, including: recording the crop type information and rotation value of the region information in different quantiles of the Mask channel of the RVT.

[0088] In some embodiments, the target terrain area information also includes an area definition value. After obtaining the area information from the Mask channel, the rendering and display method also includes: determining the target terrain area on the virtual surface based on a comparison result of the area definition value of the sampling grid with a preset definition threshold.

[0089] In some embodiments, based on crop type information, a first map corresponding to the crop type and the crop growth status is obtained, and a crop effect is generated in a target terrain area based on the first map, including: outputting a first numerical value corresponding to the crop type information according to the crop type information; based on the first numerical value, selecting a map corresponding to the first numerical number from a texture array to obtain a first map corresponding to the crop type and the crop growth status; and generating a crop effect in the target terrain area based on the first map.

[0090] In some embodiments, the region information further includes a rotation value, and generating a crop effect in the target terrain region based on the first map includes: setting UV coordinates of the first map based on the rotation value, and generating a crop effect in the target terrain region based on the first map.

[0091] In some embodiments, the rendering and display method further includes: if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, generating a crop model corresponding to the crop type information on the target terrain area.

[0092] In some embodiments, if the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, the target terrain area is further configured with a second map, and the second map includes a surface soil effect.

[0093] In some embodiments, generating a crop effect in a target terrain area based on a first texture includes: texture blending the first texture with the second texture in the target terrain area.

[0094] In some embodiments, generating a crop effect in a target terrain area based on the first map further includes: determining a mixing ratio of the first map and the second map based on a distance between the target terrain area corresponding to the area information and the virtual camera.

[0095] According to the machine-readable storage medium of the embodiment of the present invention, a machine executable instruction is stored. When the machine executable instruction is called and executed by the processor, the processor is prompted to implement the above rendering display method. Specifically, the region information of the target terrain area on the virtual surface is recorded in the Mask channel of the virtual texture RVT at runtime. In the embodiment of the present invention, the region information includes crop type information. Different crop type information corresponds to different combinations of crop types and crop growth states. Therefore, different crop type information can match the map showing different crops in different growth states. In the rendering stage, the region information is obtained from the Mask channel, and the rendering mode of the target terrain area is switched based on the distance between the target terrain area and the virtual camera. If the distance between the target terrain area corresponding to the region information and the virtual camera is greater than or equal to the distance threshold, it is a distant view at this time. Based on the crop type information, a first map corresponding to the crop type and the crop growth state is obtained, and a crop effect is generated in the target terrain area based on the first map. At this time, the rendering effect in the target terrain area is expressed as the target terrain area culling the crop model, and the surface material of the target terrain area has a specific surface crop texture effect, and because the first map corresponds to the crop type information, the rendering effect of the target terrain area in the distant view can also be updated with the crop type information. In the above rendering scheme, the performance of the target terrain area in the distance can be improved through RVT technology, and based on RVT, the rendering performance of the target terrain area can be updated in real time as the growth status of the crop changes.

[0096] The computer program product of the rendering and display method, rendering and display device, electronic device and storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can be referred to the method embodiment, which will not be repeated here.

[0097] Those skilled in the art can clearly understand that, for the convenience and brevity 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.

[0098] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0099] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including 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 methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0100] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0101] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, 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 invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A rendering display method, characterized in that: include: Recording the region information of the target terrain region on the virtual surface in the Mask channel of the runtime virtual texture RVT, wherein the region information includes crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states; During the rendering stage, the area information is obtained from the Mask channel. If the distance between the target terrain area corresponding to the area information and the virtual camera is greater than or equal to a preset distance threshold, a first map corresponding to the crop type and the crop growth state is obtained based on the crop type information, and a crop effect is generated in the target terrain area based on the first map.

2. The method according to claim 1, characterized in that The region information also includes a rotation value, and the region information of the target terrain region on the virtual surface is recorded in the Mask channel of the runtime virtual texture RVT, including: The crop type information and the rotation value of the regional information are respectively recorded in different quantiles of the Mask channel of the RVT.

3. The method according to claim 1, characterized in that The target terrain area information also includes an area definition value. After acquiring the area information from the Mask channel, the method further includes: Based on the comparison result of the area definition value of the sampling grid and the preset definition threshold, the target terrain area is determined on the virtual surface.

4. The method according to claim 1, characterized in that: The acquiring, based on the crop type information, a first map corresponding to the crop type and the crop growth state, and generating a crop effect in the target terrain area based on the first map comprises: outputting a first value corresponding to the crop type information according to the crop type information; Based on the first value, selecting a map corresponding to the first value number from a texture array to obtain a first map corresponding to the crop type and the crop growth state; A crop effect is generated in the target terrain area based on the first map.

5. The method according to any one of claims 1 to 4, characterized in that: The region information further includes a rotation value, and the generating of a crop effect in the target terrain region based on the first map includes: UV coordinates of the first texture are set based on the rotation value, and a crop effect is generated in the target terrain area based on the first texture.

6. The method according to claim 1, characterized in that The method further comprises: If the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, a crop model corresponding to the crop type information is generated on the target terrain area.

7. The method according to claim 6, characterized in that If the distance between the target terrain area corresponding to the area information and the virtual camera is less than a preset distance threshold, the target terrain area is further configured with a second map, and the second map includes a surface soil effect.

8. The method according to claim 7, characterized in that Generating a crop effect in the target terrain area based on the first map includes: The first texture and the second texture are texture mixed in the target terrain area.

9. The method according to claim 8, characterized in that The step of generating a crop effect in the target terrain area based on the first map further includes: The mixing ratio of the first map and the second map is determined based on the distance between the target terrain area corresponding to the area information and the virtual camera.

10. A rendering display device, characterized in that: include: An information recording module, used for recording the region information of the target terrain region on the virtual surface in the Mask channel of the runtime virtual texture RVT, wherein the region information includes crop type information, and different crop type information corresponds to different combinations of crop types and crop growth states; The first rendering module is used to obtain the area information from the Mask channel, and when the distance between the target terrain area corresponding to the area information and the virtual camera is greater than or equal to a preset distance threshold, obtain a first map corresponding to the crop type and the crop growth state based on the crop type information, and generate a crop effect in the target terrain area based on the first map.

11. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the rendering and display method according to any one of claims 1 to 9.

12. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the rendering and display method according to any one of claims 1 to 9.

Citation Information

Cited By

  • Method and device for generating warfare fog, medium and product

    CN120860587A

  • A method, device, medium and product for generating a war fog

    CN120860587B