Image fusion processing method, system, device and computer readable storage medium
By adjusting the working state of the particle emitter according to the distance between the particle emitter and the virtual camera in open-world games, the problem of high consumption of special-effect objects is solved, and the balance of performance optimization and gaming experience is achieved.
Patent Information
- Application Number
- CN202111419664.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2041-11-26
AI Technical Summary
In open world games, long-distance special effects objects are not easily observed due to smoke effects and visual distances, resulting in excessive consumption of computer memory and computing power, but do not affect the player's gaming experience.
By obtaining the distance between the particle emitter and the virtual camera, a first parameter is formed, and based on the parameters, a control command is formed, and the working state of the particle emitter is controlled, thereby adjusting the number of particle emissions, conforming to the visual characteristics of the human body, and reducing memory and computing power consumption.
It realizes that without affecting the player's gaming experience, the consumption of computer memory and computing power by special-effect objects from far distances is reduced, and game performance is improved.
Smart Images

Figure CN114082186B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video stream image processing, and in particular to an image fusion processing method, system, device and computer-readable storage medium. Background Art
[0002] An open world is a large virtual world where players can move around freely. It attracts players to explore by adding elements such as interactions, landmarks, and equipment. There are also multiple tasks to drive the story. The open world often attracts the attention of countless players with its ultra-high degree of freedom, exquisite graphics, vivid stories or unique gameplay. In order to improve the realism of the virtual world, smoke and other effects are also set in the virtual world. When objects with special effects are far away from the viewing angle, due to the existence of smoke special effects and visual distance, the special effects objects are not easy to be observed. Although the special effects objects that are not easy to observe do not affect the player's operation and experience, the special effects objects continue to consume computer memory and computing power. Summary of the invention
[0003] Based on the above defects, the present application provides an image fusion processing method, system, device and computer-readable storage medium, specifically:
[0004] On the one hand, the present application provides an image fusion processing method, which includes:
[0005] Acquire a first distance between the current feature body and the target body, and form a first parameter according to the first distance;
[0006] determining whether the first parameter matches a first threshold, and generating a first type of control instruction when the first parameter matches the first threshold;
[0007] Under the effect of the first type of control instructions, the current working state of the feature body is controlled.
[0008] Preferably, in the above-mentioned image fusion processing method, the first threshold includes a first sub-threshold and a second sub-threshold, the first type of control instruction includes a first control instruction and a second control instruction, and judging whether the first parameter matches the first threshold, and forming the first type of control instruction when the first parameter matches the first threshold specifically includes:
[0009] When the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value, forming the first control instruction according to the first parameter;
[0010] A second control instruction is generated when the first parameter is greater than the second sub-threshold.
[0011] Preferably, in the above-mentioned image fusion processing method, when the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value, forming the first control instruction according to the first parameter specifically includes:
[0012] When the first parameter is not less than a first sub-threshold and less than the second sub-threshold, a linear attenuation coefficient is formed according to the first sub-threshold and the second sub-threshold, and the first control instruction is formed according to the linear attenuation coefficient;
[0013] When the first parameter is equal to the second sub-threshold, the first control instruction is one.
[0014] Preferably, in the above-mentioned image fusion processing method, the second control instruction is zero.
[0015] On the other hand, the present application further provides an image fusion processing system, which includes:
[0016] A first parameter forming unit, which obtains a first distance between the current feature body and the target body, and forms a first parameter according to the first distance;
[0017] A first-category control instruction forming unit, configured to determine whether the first parameter matches a first threshold value, and to form a first-category control instruction when the first parameter matches the first threshold value;
[0018] The control unit controls the current working state of the feature body under the action of the first type of control instructions.
[0019] Preferably, in the above-mentioned image fusion processing system, the first threshold includes a first sub-threshold and a second sub-threshold, the first type of control instruction includes a first control instruction and a second control instruction, and the first type of control instruction forming unit specifically includes:
[0020] a first control instruction forming module, which forms the first control instruction according to the first parameter when the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value;
[0021] The second control instruction forming module forms a second control instruction when the first parameter is greater than the second sub-threshold.
[0022] Preferably, in the above-mentioned image fusion processing system, the first control instruction forming module specifically includes:
[0023] When the first parameter is not less than the first sub-threshold and less than the second sub-threshold, a linear attenuation coefficient is formed according to the first sub-threshold and the second sub-threshold, and the first control instruction is formed according to the linear attenuation coefficient; when the first parameter is equal to the second sub-threshold, the first control instruction is one.
[0024] Preferably, in the above-mentioned image fusion processing system, the second control instruction is zero.
[0025] On the other hand, the present application further provides a video game fusion processing device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of any one of the video game fusion processing methods described when executed by the processor.
[0026] Finally, the present application further provides a computer-readable storage medium, on which a video game fusion processing program is stored. When the video game fusion processing program is executed by a processor, the steps of the video game fusion processing method as described in any one of the above items are implemented.
[0027] Compared with the prior art, the beneficial effects of this application are:
[0028] In this application, the working state of the particle emitter is controlled by the distance between the particle emitter and the camera. The number of particles emitted by the particle emitter is different under different distance states. On the one hand, it conforms to the visual characteristics of the human body. On the other hand, it reduces the memory consumption and computing power of the particle emitter at a longer distance without affecting the player's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of a flow chart of an image fusion processing method provided by an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of a flow chart of an image fusion processing method provided by an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of the number of particles emitted by a particle emitter in an image fusion processing method provided by an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of a flow chart of an image fusion processing method provided by an embodiment of the present invention;
[0033] Figure 5 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0034] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In the subsequent description, the use of suffixes such as "module", "component" or "unit" used to represent elements is only to facilitate the description of the present invention and has no specific meaning in itself. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0035] Embodiment 1
[0036] On the one hand, the present application provides an image fusion processing method, which is applied to a rendering engine. During the rendering process, a particle system is used to control the display mode of special effects. The image fusion processing method disclosed in the present application is added to the particle system. Specifically:
[0037] like Figure 1 As shown, step S110, obtain the first distance between the current feature body and the target body, and form a first parameter according to the first distance; wherein, the feature body may be a particle emitter controlled by a particle system, the particle emitter is used to emit particles, and the particles display the special effect body within the Lifetime.
[0038] It should be noted that this embodiment can be applied to each particle emitter in the particle system, and can also be applied to some particle emitters. Schematically, when a special effect is formed by particles emitted by multiple particle generators, some particle emitters in the special effect can be turned off under predetermined conditions to retain the display of the main part of the special effect, thereby achieving the purpose of reducing loss.
[0039] The target body is the location of the virtual camera, which is intended to provide a perspective for players to operate game characters.
[0040] The first distance is the distance between the particle emitter and the virtual camera. The first parameter is formed according to the first distance.
[0041] Step S120, determine whether the first parameter matches the first threshold, and form a first type of control instruction when the first parameter matches the first threshold; the first threshold may be a prefabricated parameter, which can be determined according to the actual scenario during actual application, and no specific restrictions are made this time.
[0042] When the first parameter matches the first threshold, it means that the distance between the current particle emitter and the virtual camera is far, and due to the limitation of human visual distance, the display effect of the special effect cannot be fully observed. Based on visual limitations, when the distance between the target body and the feature body is far, the display mode of the feature body is reduced to reduce memory consumption and computing power usage.
[0043] Step S130, under the action of the first type of control instructions, control the current working state of the feature body. The first type of control instructions includes at least three modes: full emission, reduced emission, and no emission. When the distance between the particle emitter and the virtual camera is close, the particle emitter emits particles in full or close to full emission. When the distance between the particle emitter and the virtual camera is moderate, the particle emitter emits particles in reduced emission. When the distance between the particle emitter and the virtual camera is far, the particle emitter does not emit particles.
[0044] It should be noted that different special effects correspond to different first thresholds, and the first threshold is not a fixed constant. Different thresholds are selected in different application environments.
[0045] In this application, the working state of the particle emitter is controlled by the distance between the particle emitter and the camera. The number of particles emitted by the particle emitter is different under different distance states. On the one hand, it conforms to the visual characteristics of the human body. On the other hand, it reduces the memory consumption and computing power of the particle emitter at a longer distance without affecting the player's gaming experience.
[0046] As a further preferred embodiment, in the above-mentioned image fusion processing method, wherein the first threshold includes a first sub-threshold and a second sub-threshold, the first type of control instruction includes a first control instruction and a second control instruction, and step S120, determining whether the first parameter matches the first threshold, and forming the first type of control instruction when the first parameter matches the first threshold specifically includes:
[0047] like Figure 2 As shown, step S1201, when the first parameter is not less than the first sub-threshold and not greater than the second sub-threshold, the first control instruction is formed according to the first parameter; wherein the first sub-threshold may be the closest distance between the feature body and the target body (it may also be understood as the distance between the feature body and the target body is relatively close), and the second sub-threshold is the farthest visual distance between the feature body and the target body. The distance between the first sub-threshold and the second sub-threshold may be understood as a moderate distance.
[0048] like Figure 3 , 4 As shown, further, step S12011, when the first parameter is not less than a first sub-threshold and less than the second sub-threshold, a linear attenuation coefficient is formed according to the first sub-threshold and the second sub-threshold, and the first control instruction is formed according to the linear attenuation coefficient;
[0049] The first parameter is between the first sub-threshold and the second sub-threshold, and the first control instruction is a linear variation rather than a fixed constant. In schematic form, when the first parameter is closer to the first sub-threshold, the number of particle emitters emitted is closer to the full emission. Conversely, when the first parameter is closer to the second sub-threshold, the number of particle emitters emitted is smaller.
[0050] Step S12012: when the first parameter is equal to the second sub-threshold, the first control instruction is one.
[0051] The first parameter is between the first sub-threshold and the second sub-threshold, and the minimum emission amount of the particle emitter is one. In short, the particle generator within this area is still in working state, and the number of particles emitted by the particle generator is different depending on the first parameter.
[0052] Step S1202: When the first parameter is greater than the second sub-threshold, a second control instruction is generated. Further, the second control instruction is zero.
[0053] In this state, the distance between the particle generator and the virtual camera is far, which has exceeded the visual limit. At this time, the particle emitter stops emitting particles, but for the particles that have been emitted, the special effects are still displayed during the life cycle of the particle. After the life cycle of the particle is completed, the particle generator stops emitting particles.
[0054] In this embodiment, the above-mentioned image fusion processing method is added to the particle system, and the working state of the particle emitter is adjusted according to the position of the virtual camera and the particle emitter. The image rendering memory and computing power are reduced while ensuring the image quality, thereby reducing the rendering consumption.
[0055] Embodiment 2
[0056] On the other hand, an image fusion processing system includes:
[0057] A first parameter forming unit, which obtains a first distance between the current feature body and the target body, and forms a first parameter according to the first distance;
[0058] A first-category control instruction forming unit, configured to determine whether the first parameter matches a first threshold value, and to form a first-category control instruction when the first parameter matches the first threshold value;
[0059] The control unit controls the current working state of the feature body under the action of the first type of control instructions.
[0060] Preferably, in the above-mentioned image fusion processing system, the first threshold includes a first sub-threshold and a second sub-threshold, the first type of control instruction includes a first control instruction and a second control instruction, and the first type of control instruction forming unit specifically includes:
[0061] a first control instruction forming module, which forms the first control instruction according to the first parameter when the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value;
[0062] The second control instruction forming module forms a second control instruction when the first parameter is greater than the second sub-threshold.
[0063] Preferably, in the above-mentioned image fusion processing system, the first control instruction forming module specifically includes:
[0064] When the first parameter is not less than the first sub-threshold and less than the second sub-threshold, a linear attenuation coefficient is formed according to the first sub-threshold and the second sub-threshold, and the first control instruction is formed according to the linear attenuation coefficient; when the first parameter is equal to the second sub-threshold, the first control instruction is one.
[0065] Preferably, in the above-mentioned image fusion processing system, the second control instruction is zero.
[0066] The working principle of an image fusion processing system is the same as the working principle of the above-mentioned image fusion processing method, which will not be described in detail here.
[0067] Embodiment 3
[0068] On the other hand, the present application further provides a video game fusion processing device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of implementing any one of the video game fusion processing methods described above are implemented, including:
[0069] Acquire a first distance between the current feature body and the target body, and form a first parameter according to the first distance;
[0070] determining whether the first parameter matches a first threshold, and generating a first type of control instruction when the first parameter matches the first threshold;
[0071] Under the effect of the first type of control instructions, the current working state of the feature body is controlled.
[0072] like Figure 5 As shown, the device specifically includes: one or more processors 510, Figure 5In the example, a processor 510 is used; the memory 520 is used to store one or more programs. When the one or more programs are executed by one or more processors 510, the one or more processors 510 implement the mixed reality interaction method described in any embodiment of the present invention. The processor 510 and the memory 520 can be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0073] The memory 520, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions corresponding to the mixed reality interaction method in the embodiment of the present invention (for example, the reception of signals in each direction and the measurement of field strength, the determination of one-way delay and the collection of TA information). The processor 510 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 520, that is, realizing the above-mentioned mixed reality interaction method.
[0074] The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include a memory remotely arranged relative to the processor 510, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0075] Embodiment 4
[0076] Finally, the present application further provides a computer-readable storage medium, on which a video game fusion processing program is stored. When the video game fusion processing program is executed by a processor, the steps of the video game fusion processing method described in any one of the above items are implemented, specifically including:
[0077] Acquire a first distance between the current feature body and the target body, and form a first parameter according to the first distance;
[0078] determining whether the first parameter matches a first threshold, and generating a first type of control instruction when the first parameter matches the first threshold;
[0079] Under the effect of the first type of control instructions, the current working state of the feature body is controlled.
[0080] Of course, the computer-readable storage medium provided by an embodiment of the present invention, whose computer executable instructions are not limited to the method operations described above, can also execute related operations in the mixed reality interaction method provided by any embodiment of the present invention.
[0081] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0082] It is worth noting that in the embodiment of the above-mentioned search device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0083] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An image fusion processing method, characterized in that: include: Acquire a first distance between the current feature body and the target body, and form a first parameter according to the first distance; The feature body is a particle emitter, the particle emitter is used to emit particles, and the target body is a virtual camera; Determine whether the first parameter matches a first threshold, and generate a first type of control instruction when the first parameter matches the first threshold; the first type of control instruction includes at least three modes: full emission, reduced emission, and no emission; Under the effect of the first type of control instructions, the current working state of the feature body is controlled.
2. The image fusion processing method according to claim 1, characterized in that: The first threshold includes a first sub-threshold and a second sub-threshold, the first type of control instruction includes a first control instruction and a second control instruction, and judging whether the first parameter matches the first threshold, and forming the first type of control instruction when the first parameter matches the first threshold specifically includes: When the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value, forming the first control instruction according to the first parameter; A second control instruction is generated when the first parameter is greater than the second sub-threshold.
3. The image fusion processing method according to claim 2, characterized in that: When the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value, forming the first control instruction according to the first parameter specifically includes: When the first parameter is not less than a first sub-threshold and less than the second sub-threshold, a linear attenuation coefficient is formed according to the first sub-threshold and the second sub-threshold, and the first control instruction is formed according to the linear attenuation coefficient; When the first parameter is equal to the second sub-threshold, the first control instruction is to emit a particle.
4. The image fusion processing method according to claim 2, characterized in that: The second control instruction is to emit zero particles.
5. An image fusion processing system, characterized in that: include: A first parameter forming unit, which obtains a first distance between the current feature body and the target body, and forms a first parameter according to the first distance; The feature body is a particle emitter, the particle emitter is used to emit particles, and the target body is a virtual camera; a first-category control instruction forming unit, which determines whether the first parameter matches a first threshold value, and forms a first-category control instruction when the first parameter matches the first threshold value; the first-category control instruction includes at least three modes: full-amount transmission, reduced-amount transmission, and no transmission; The control unit controls the current working state of the feature body under the action of the first type of control instructions.
6. The image fusion processing system according to claim 5, characterized in that: The first threshold includes a first sub-threshold and a second sub-threshold, the first type of control instructions includes a first control instruction and a second control instruction, and the first type of control instruction forming unit specifically includes: a first control instruction forming module, which forms the first control instruction according to the first parameter when the first parameter is not less than a first sub-threshold value and not greater than a second sub-threshold value; The second control instruction forming module forms a second control instruction when the first parameter is greater than the second sub-threshold.
7. The image fusion processing system according to claim 6, characterized in that: The first control instruction forming module specifically includes: When the first parameter is not less than the first sub-threshold and less than the second sub-threshold, a linear attenuation coefficient is formed according to the first sub-threshold and the second sub-threshold, and the first control instruction is formed according to the linear attenuation coefficient; when the first parameter is equal to the second sub-threshold, the first control instruction is to emit a particle.
8. The image fusion processing system according to claim 6, characterized in that: The second control instruction is to emit zero particles.
9. An image fusion processing device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the image fusion processing method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a video game fusion processing program, and when the video game fusion processing program is executed by a processor, the image fusion processing method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and device for processing graphic instruction data
CN108769715A
Virtual vegetation display method and device, computer equipment and storage medium
CN110880204A