CN112241993A - Game image processing method and device and electronic equipment - Google Patents

Game image processing method and device and electronic equipment Download PDF

Info

Publication number
CN112241993A
CN112241993A CN202011370331.6A CN202011370331A CN112241993A CN 112241993 A CN112241993 A CN 112241993A CN 202011370331 A CN202011370331 A CN 202011370331A CN 112241993 A CN112241993 A CN 112241993A
Authority
CN
China
Prior art keywords
offset
plant
target map
game
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011370331.6A
Other languages
Chinese (zh)
Other versions
CN112241993B (en
Inventor
车征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Perfect World Network Technology Co Ltd
Original Assignee
Chengdu Perfect World Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Perfect World Network Technology Co Ltd filed Critical Chengdu Perfect World Network Technology Co Ltd
Priority to CN202011370331.6A priority Critical patent/CN112241993B/en
Publication of CN112241993A publication Critical patent/CN112241993A/en
Application granted granted Critical
Publication of CN112241993B publication Critical patent/CN112241993B/en
Priority to PCT/CN2021/119151 priority patent/WO2022111003A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings

Abstract

The application discloses a game image processing method and device and electronic equipment, and relates to the technical field of image processing. The method comprises the following steps: firstly, recording the track information of the movement of a game role interacted with a plant on a rendering target map; determining the offset intensity and the offset direction of the plant to be adjusted based on the track information in the rendering target map; then reading the offset strength and the offset direction from the rendering target map; and finally, carrying out world coordinate offset on the plant according to the read offset strength and the offset direction so as to generate offset animation information of the plant. According to the application, the offset animation with the corresponding direction of the plant can be made according to the movement track of the user, so that the interaction between the game role and the plant is more real, the physical interaction effect can be well simulated, the display effect of the interaction between the plant and the game role is further improved, and the user experience of the game reality is enhanced.

Description

Game image processing method and device and electronic equipment
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a game image processing method and apparatus, and an electronic device.
Background
With the development of the game industry, more and more game enthusiasts are provided. In order to enhance the game experience of game players, game production increasingly tends to realize scene reality.
In the game, there may be a scene of plants throughout the field such as grassland and flower sea, and when the game character moves in the scene of plants throughout the field, the plants are slightly pushed away by the game character to both sides, and the effect of a track is maintained. In order to achieve the effect, at present, the traditional image processing method is to make some simple interactive animations for the plants, for example, the plants are animated in a single shaking manner, so that when the game characters interact with the plants, the simple interactive animations of the plants are played.
However, the directions of the plant deviations in the played animation are the same contents repeated in a fixed form, and the plant deviations do not have specific directions, so that the game reality experience is poor, and the game display effect is influenced.
Disclosure of Invention
In view of this, the present application provides a game image processing method, a game image processing apparatus, and an electronic device, and mainly aims to solve the technical problem that when a game character moves in a scene of a plant, a traditional image processing manner affects the display effect of interaction between the plant and the game character, and further causes poor experience of game reality in the prior art.
According to an aspect of the present application, there is provided a game image processing method including:
recording the track information of the movement of the game role interacted with the plant on a rendering target map;
determining offset strength and offset direction of the plant to be adjusted in the rendering target map based on the trajectory information;
reading the offset strength and the offset direction from the render target map;
and carrying out world coordinate offset on the plant according to the read offset strength and the offset direction so as to generate offset animation information of the plant.
According to another aspect of the present application, there is provided a game image processing apparatus including:
the recording module is used for recording the track information of the movement of the game role interacted with the plant on a rendering target mapping;
a determining module, configured to determine, in the rendered target map, an offset strength and an offset direction of the plant to be adjusted based on the trajectory information;
a reading module, configured to read the offset strength and the offset direction from the rendering target map;
and the generation module is used for carrying out world coordinate offset on the plant according to the read offset strength and the offset direction so as to generate offset animation information of the plant.
According to still another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described game image processing method.
According to yet another aspect of the present application, there is provided an electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the game image processing method when executing the computer program.
By means of the technical scheme, the game image processing method, the game image processing device and the electronic equipment, track information of game character movement interacting with the plants can be recorded on the rendering target map in advance, and then the offset strength and the offset direction of the plants to be adjusted are determined in the rendering target map based on the track information of the game character movement. And then reading the offset strength and the offset direction of the plant to be adjusted from the rendered target map so as to be used as a reference basis for carrying out world coordinate offset on the plant, simulating the physical interaction effect of the game role and the plant and generating offset animation information of the plant. Therefore, when the game role moves in the scene of the plant all the time, the offset animation information of the plant can be played, and compared with the simple interactive animation that the plant offset does not have a specific direction in the traditional image processing mode at present, the offset animation with the corresponding direction of the plant can be made according to the movement track of the user, so that the interaction between the game role and the plant is more real, the physical interaction effect can be simulated well, the interactive display effect of the plant and the game role is further improved, and the user experience of the game reality is enhanced.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart illustrating a game image processing method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another game image processing method provided by the embodiment of the application;
FIG. 3 is a diagram illustrating an example scenario provided by an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating another example scenario provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram illustrating a game image processing apparatus according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The method aims to solve the technical problem that when a game role moves in a scene of a plant in the prior art, the traditional image processing mode can influence the display effect of interaction between the plant and the game role, and further the game reality experience is poor. The present embodiment provides a game image processing method, as shown in fig. 1, the method including:
step 101, recording the track information of the movement of the game character interacting with the plant on a rendering target map.
The trajectory information may include position information of the game character in each frame of animation. The plants can be flowers, grass and other plants, and specifically can be those plants (which need to be shifted) affected by the movement of the game character, and the range of the plants can be preset according to the actual scene requirements, for example, the range of the plants affected is larger when the movement speed of the game character is higher, and the like. The interaction between the game character and the plant can be considered as a collision interaction effect between the game character and the plant such as the flower or the grass due to the game character moving in the scene of the plant such as the grassland or the flower sea.
Render Target (RT) may be considered a buffer through which the graphics card draws pixels of the scene using an Effect class. The default rendering target is called a lookaside buffer, which is physically a block of video memory containing the information to be drawn for the next frame. Another render target may be created using the render target2D (render target two-dimensional object) class, leaving a new area in display memory for drawing. Most games draw large amounts of content into other render targets ("offscreen") outside the back buffer, and then compile these different image elements, combining them to form the final back buffer.
The execution subject of the embodiment can be a device or equipment for game image processing, can be configured on a client side or a server side, and can be used for plant interaction.
And 102, determining the offset strength and the offset direction of the plant to be adjusted in the rendering target map based on the track information of the movement of the game character.
For this embodiment, the intensity and direction of plant offset need to be recorded in the RT map, and specifically, the intensity and direction of plant offset may be determined and obtained based on the recorded track information of the movement of the game character, for example, the world coordinates of the character are mapped to the texture map coordinates (UV coordinates, horizontal direction is U, vertical direction is V) of the RT map, and then corresponding offset calculation is performed, so that the plant offset data according with the physical interaction effect, that is, the offset intensity and offset direction of the plant to be adjusted, may be accurately determined and obtained according to the track information of the movement of the game character.
And 103, reading the offset intensity and the offset direction to be adjusted of the plant from the rendering target map.
For example, the position information of the plant is mapped to the UV coordinate of the RT map, and the offset strength and offset direction to be adjusted of the plant stored in the RT map are read from this coordinate.
And 104, performing world coordinate offset on the plant according to the read offset strength and offset direction to be adjusted of the plant to generate offset animation information of the plant.
For example, taking the game character walking on the lawn as an example, the track information of the game character moving is recorded in the RT map, and the intensity and direction of the grass offset need to be recorded in the RT map, so the world coordinates of the game character can be mapped to the UV coordinates of the RT map to perform the corresponding offset calculation, and the offset intensity and offset direction of the grass can be recorded in the RT map. The grass position information can then likewise be mapped onto the UV coordinates of the RT map, from which the offset strength and offset direction of the grass stored in the RT map are read. When the game role walks to the vicinity of the grass, a section of grass offset animation with the direction can be obtained according to the calculated offset strength and offset direction of the grass on the RT map, so that the interactive reality between the game role and the grass is improved.
According to the game image processing method, the game image processing device and the electronic equipment, the track information of the movement of the game role interacted with the plant can be recorded on the RT map in advance, and then the offset strength and the offset direction of the plant to be adjusted are determined in the RT map based on the track information of the movement of the game role. And then reading the offset strength and the offset direction of the plant to be adjusted from the RT map so as to be used as a reference basis, carrying out world coordinate offset on the plant, simulating the physical interaction effect of the game role and the plant, and generating offset animation information of the plant. Therefore, when the game role moves in the scene of the plant all the time, the offset animation information of the plant can be played, and compared with the simple interactive animation that the plant offset does not have a specific direction in the traditional image processing mode at present, the offset animation that the plant has a corresponding direction can be made according to the movement track of the user, so that the interaction between the game role and the plant is more real, the physical interaction effect can be simulated well, the interactive display effect of the plant and the game role is further improved, and the user experience of the game reality is enhanced.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully describe the implementation of the embodiment, the embodiment further provides another game image processing method, as shown in fig. 2, the method includes:
step 201, recording the track information of the movement of the game character interacting with the plant on the RT map.
Optionally, step 201 may specifically include: and drawing the material ball of the path of the movement track of the game role on the plant on the RT map of the path of the movement track of the game role on the plant. And each drawn RT map correspondingly stores the track information of one frame of the game role. For example, using Draw Material to RenderTarget (a blueprint node for the illusion Engine: drawing Material onto the rendered Target) in a UE (Unreal Engine fantasy Engine) tool may apply Material to a blit (tiled) in a RT tile (like the Unity shader's Material code)) as using this interface (API) to Draw the grass corner color path's ball of Material (Mat _ GrassPathBrush02 (brush Material for drawing path)) onto the grass corner color path's RT tile (RT _ PosPath 1). It should be noted that the Shading Model (Shading mode) of the Material used by the Draw Material to Render Target selects the Unlit mode, otherwise it has no effect.
The following is a more complex trajectory-drawing material ball Mat _ GrassPathBrush02 (brush material for drawing path), so that the RT map needs to record the intensity and direction of the plant deviation, and two RT maps are used alternately to draw the trajectory, etc.
Step 202, obtaining target coordinates of the world coordinates of the game role mapped to the texture map coordinates of the RT map.
And step 203, simulating the intensity value of the plant offset deformation by using a circular gradient field taking the game role as the center based on the target coordinate of the game role in the RT map, and determining the offset intensity to be adjusted of the plant according to the intensity value.
In this embodiment, a circular gradient field with a game character as a center is used to approximate the intensity value of the plant offset deformation, and the offset intensity of the plant to be adjusted is determined according to the intensity value. The advantage of using a circular gradient field is that the calculation amount is relatively small, and the required intensity gradient value can be obtained by vector addition and subtraction. For example, the world coordinates of a game character are mapped to UV coordinates, target coordinates of the world coordinates of the game character mapped to texture map coordinates of an RT map are obtained, a circular gradient field is arranged around the game character as a center and used for simulating the strength of grass offset deformation, wherein the circular gradient field is provided with a threshold value, the simulated strength gradient value exceeds the threshold value, the plant offset deformation has a strength numerical value, and the numerical value closer to 1 indicates that the plant offset strength is larger; and if the intensity gradient value obtained by the simulation is smaller than the threshold value, the plant deviation shakes according to the self-swinging animation simulation of the threshold value.
The larger the advancing speed of the game character is, the smaller the range of the affected vegetation is and the larger the offset strength of the affected vegetation is, and the faster the effect gradually disappears.
And 204, subtracting the target coordinates of the game character in the rendered target map from the texture map coordinate nodes in the material ball to obtain a plane direction vector pointing to the game character for one circle, and determining the offset direction to be adjusted of the plant according to the plane direction vector pointing to the game character for one circle.
And (3) transforming a coordinate system of the game role, namely mapping the coordinate of the game role in the game world to a UV space, subtracting the coordinate to obtain a direction vector pointing to the subtracted coordinate, so that a plane direction vector pointing to the game role for a circle can be obtained by subtracting the target coordinate of the game role in the RT map from a texture map coordinate node in the material ball, and the offset direction to be adjusted of the plant is determined according to the plane direction vector pointing to the game role for a circle.
For example, world coordinates of a game character are mapped onto UV coordinates, and the coordinates of the game character in the UV space are subtracted from UV coordinate nodes in the material ball, thereby obtaining a direction vector (direction on the XY plane) pointing to the game character in one circle. And subsequently, accurately determining the offset direction to be adjusted of the plant according to the direction vector pointing to the game role for a circle, wherein the specific offset direction effect can be preset according to actual requirements, such as the effect that the plant is arranged at two sides of the advancing direction of the role or the effect that the plant is clustered at two sides.
Further, after determining and obtaining the offset intensity and the offset direction to be adjusted of the plant, in order to ensure that the RT map accurately records the information of the offset intensity and the offset direction, optionally, the offset intensity and the offset vector to be adjusted of the plant are stored in the RGB color channel of the RT map. If a negative value exists in the offset direction, non-negative value mapping storage processing is carried out. For example, when the offset direction is recorded, the color value in the RT map can only store 0-1, and negative values cannot be stored, so when storing, the direction [ 1, 1 ] needs to be mapped to [ 0, 1 ], and when using and calculating, the direction [ 0, 1 ] needs to be remapped to [ 1, 1 ], thus solving the problem that negative values cannot be stored.
Then, the scheme of data storage of offset intensity and offset vector to be adjusted by the plant is carried out, one map has RGBA four channels, and 4 data can be stored generally. The offset intensity of the plant is a scalar quantity, only one color channel is needed, and the offset intensity can be stored in the R channel. The offset direction of the plant uses only XY two channels and can be stored at G, B. Therefore, only one mapping RGB three channels are needed to store the needed data, and the additional overhead of mapping is not large. Correspondingly, storing the offset intensity and the offset vector to be adjusted of the plant in the RGB color channel of the RT map may specifically include: storing the offset strength to an R channel of the RT map; plane direction vectors of the offset direction are stored to the G channel and the B channel of the RT map. For example, for the intensity of deflection to be adjusted for a plant, a value closer to 1 indicates a greater grass deflection, and this value may be stored to the R channel. For the offset direction to be adjusted for the plant, it can be regarded as a direction vector on the XY plane, and therefore, a direction vector in the X direction can be stored to the G channel, and a direction vector in the Y direction can be stored to the B channel.
In order to achieve the effect that the plants are arranged on both sides of the advancing direction of the character, optionally, the offset direction to be adjusted by the plants is determined according to a plane direction vector pointing to the game character for a circle, which specifically includes: firstly, carrying out vector dot multiplication on the advancing direction of a game role and a plane direction vector pointing to the game role for a circle; and determining the offset directions to be adjusted of the left-biased graft and the right-biased graft in the plant respectively according to the dot multiplication result, wherein the offset direction to be adjusted of the left-biased graft is the direction perpendicular to the advancing direction on the left side of the advancing direction, and the offset direction to be adjusted of the right-biased graft is the direction perpendicular to the advancing direction on the right side of the advancing direction.
For example, since the effect of grass being laid out to both sides in the advancing direction of the game character is desired in the demand, the recorded offset direction needs to be changed on this basis. The scheme records the advancing direction (xy) of the character by using a parameter, and then carries out vector point multiplication (dot) according to the advancing direction and a direction vector pointing to the character for one circle to judge which grass is deviated on the left side of the game character and which grass is deviated on the right side of the game character. For example, a dot of Blue (data stored in B channel) is recorded with an offset direction perpendicular to the forward direction on the left side of the forward direction, and a dot of Green (data stored in G channel) is recorded with an offset direction perpendicular to the forward direction on the right side of the forward direction, and the specific offset direction calculation result is as shown in fig. 3, where a light gray area corresponds to a Blue area and a dark gray area corresponds to a Green area.
In addition to the above RT maps requiring recording of the intensity and direction of plant excursions, two RT maps need to be used alternately to draw the trajectory: when the RT map is drawn each time, another RT map in which the character information of the previous frame is stored is added with the current RT map, so that the walking track of the game character on the RT map can be updated, and meanwhile, the intensity attenuation of the part of the recorded track on the RT map is carried out. Correspondingly, optionally, the method of this embodiment may further include: and when each RT chartlet is drawn, adding the current RT chartlet and the previous RT chartlet to update the advancing track of the game character on the RT chartlet. For example, as shown in fig. 4, an example of RT mapping is given with plant offset directions around a game character: the figure uses two channels of colors G (green), B (blue) to store X, Y direction vectors, such as pure green (corresponding to dark grey areas) G =1, B =0 denotes X =1, Y =0 is the direction vector pointing in the positive direction of the X axis.
And step 205, reading the offset strength and the offset direction of the plant to be adjusted from the RT map.
Step 205 may specifically include: and reading the offset intensity and the offset direction to be adjusted of the plant from the RGB color channel of the RT map based on the mapping relation of non-negative values. For example, when recording offset direction, the color value in the RT map can only store 0-1, and negative value cannot be stored, so when storing, the direction [ 1, -1 ] is mapped to [ 1, 0 ], and when using and calculating, the direction [ 1, 0 ] is remapped to [ 1, -1 ]. Specifically, the offset strength to be adjusted of the plant can be read from the R channel, and the plane direction vector X, Y can be read from the G, B channel as the offset direction to be adjusted of the plant.
In order to accurately read the offset strength and the offset direction to be adjusted of the plant, optionally, step 205 may specifically include: firstly, mapping the position information of the plant to the texture mapping coordinate of the RT mapping; and then reading the offset intensity and the offset direction to be adjusted of the plant from an RGB color channel of the RT map based on the mapping relation between the texture map coordinate obtained by mapping the plant and a non-negative value. For example, the position information of the flower is mapped to the UV coordinate, and the offset intensity and offset direction of the flower stored at the RT are read by this coordinate.
And step 206, performing world coordinate offset on the plant according to the read offset strength and offset direction to be adjusted of the plant to generate offset animation information of the plant.
For example, when a game character walks to the vicinity of a flower, a piece of offset animation with an orientation can be obtained according to the calculated offset strength and the offset direction on the RT, so that the interactive reality is improved.
In order to make the interaction between the game character and the plant more conform to the physical interaction effect, optionally, step 206 may specifically include: and carrying out increasing or decreasing world coordinate offset on the plants from the roots to the tips so as to generate gradually-changed offset animation information of the plants from the roots to the tips. Through the optional mode, the gradual deviation from the grass root to the grass tip can be realized during the interaction between the plant game role and the grass, the physical interaction effect is better met, the interactive display effect of the plant and the game role is improved, and the user experience of the game reality sense is enhanced.
In addition to the above alternative, in order to further improve the physical interaction effect, when the plants are deviated, the plants are firstly arranged at two sides of the advancing direction of the game character and then shake in other directions. Correspondingly, optionally, step 206 may specifically include: judging whether the offset intensity to be adjusted of the plant is greater than a preset intensity threshold (which can correspond to a threshold set by a circular gradient field); if the offset intensity is larger than the preset intensity threshold value, carrying out world coordinate offset on the plants according to the offset direction to be adjusted of the plants, so that the plants are arranged towards the left side and the right side of the advancing direction of the game player; and if the offset intensity to be adjusted of the plant is smaller than or equal to the preset intensity threshold value, performing world coordinate offset on the plant to enable the plant to shake towards a target direction, wherein the target direction is determined according to the advancing direction of the game player. For example, the direction of grass deflection is required here that grass first goes out to both sides in the advancing direction of the game character and then sways in the other direction. After the offset strength of grass is read from the R channel, two states are distinguished according to the offset strength of the grass, if the offset strength of the grass is larger than a certain preset threshold value, the interaction strength between the grass and game roles is high, and world coordinate offset is performed on the plants according to the offset direction of the grass, so that the grass is arranged on the left side and the right side of the advancing direction of a game player; if the grass offset strength is smaller than or equal to a certain preset threshold value, the interaction strength between the grass and the game role is weak, the game role is far away from the position of the grass, the world coordinate offset is carried out on the grass, the grass shakes towards other directions, such as left-right shaking and the like, the effect that the game player feels that the grass is interfered by the game role is weakened, and the realistic experience of the game is improved.
By applying the scheme in the embodiment, the track information of the movement of the game role is recorded on the RT map, and then the information recorded on the RT map is read to perform world coordinate offset on plants such as flowers and grass, so as to simulate the physical interaction effect. Compared with the simple interactive animation without specific direction for plant deviation in the traditional image processing mode at present, the plant deviation animation with the corresponding direction can be made according to the movement track of the user, so that the interaction between the game role and the plant is more real, the physical interaction effect can be well simulated, the display effect of the interaction between the plant and the game role is further improved, and the user experience of the game reality is enhanced.
Further, as a specific implementation of the method shown in fig. 1 and fig. 2, the present embodiment provides a game image processing apparatus, as shown in fig. 5, the apparatus including: a recording module 31, a determining module 32, a reading module 33, and a generating module 34.
The recording module 31 is configured to record track information of movement of a game character interacting with a plant on a rendering target RT map;
a determining module 32, configured to determine, in the RT map, an offset strength and an offset direction to be adjusted for the plant based on the trajectory information;
a reading module 33, configured to read the offset strength and the offset direction from the RT map;
and the generating module 34 is configured to perform world coordinate offset on the plant according to the read offset strength and the offset direction to generate offset animation information of the plant.
In a specific application scenario, the recording module 31 is specifically configured to draw a material ball of a path of a movement trajectory of the game character on a plant onto an RT map of the path of the movement trajectory of the game character on the plant, where each drawn RT map correspondingly stores trajectory information of one frame of the game character.
In a specific application scenario, the determining module 32 is specifically configured to obtain a target coordinate in which the world coordinate of the game character is mapped to the texture map coordinate of the RT map; simulating the intensity value of the plant offset deformation by using a circular gradient field taking the game role as the center based on the target coordinate of the game role in the rendered target map, and determining the offset intensity to be adjusted of the plant according to the intensity value; and subtracting the target coordinate of the game role in the RT map from the texture map coordinate node in the material ball to obtain a plane direction vector pointing to the game role for a circle, and determining the offset direction to be adjusted of the plant according to the plane direction vector pointing to the game role for a circle.
In a specific application scenario, the determining module 32 is further configured to perform vector dot multiplication on the advancing direction of the game character and the plane direction vector pointing to the game character for a circle; and respectively determining the offset directions to be adjusted of a left offset graft and a right offset graft in the plant according to the dot multiplication result, wherein the offset direction to be adjusted of the left offset graft is a direction perpendicular to the advancing direction on the left side of the advancing direction, and the offset direction to be adjusted of the right offset graft is a direction perpendicular to the advancing direction on the right side of the advancing direction.
In a specific application scenario, the determining module 32 is further configured to store the offset strength and the offset vector to be adjusted of the plant into an RGB color channel of the RT map, wherein if a negative value exists in the offset direction, non-negative value mapping storage processing is performed;
correspondingly, the reading module 33 is specifically configured to read the offset strength and the offset direction from the RGB color channel of the RT map based on a non-negative mapping relationship.
In a specific application scenario, the determining module 32 is further configured to add the current RT map and the previous RT map when drawing each RT map, so as to update the travel track of the game character on the RT map.
In a specific application scenario, the determining module 32 is further configured to store the offset strength to an R channel of the RT map; storing the plane direction vectors of the offset direction to the G channel and the B channel of the RT map.
In a specific application scenario, the reading module 33 is further configured to map the position information of the plant to a texture map coordinate of the RT map; and reading the offset intensity and the offset direction from an RGB color channel of the RT map based on the mapping relation between texture map coordinates obtained by mapping the plants and non-negative values.
In a specific application scenario, the generating module 34 is specifically configured to determine whether the offset strength is greater than a preset strength threshold; if the offset intensity is larger than the preset intensity threshold value, carrying out world coordinate offset on the plants according to the offset direction, so that the plants are arranged towards the left side and the right side of the advancing direction of the game player; and if the offset intensity is smaller than or equal to the preset intensity threshold value, performing world coordinate offset on the vegetation to enable the vegetation to shake towards a target direction, wherein the target direction is determined according to the advancing direction of the game player.
In a specific application scenario, the generating module 34 is further configured to perform an increasing or decreasing world coordinate offset on the plant from the root to the tip to generate gradually-changing offset animation information of the plant from the root to the tip.
It should be noted that, other corresponding descriptions of the functional units related to the game image processing apparatus provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not repeated herein.
Based on the above-described methods shown in fig. 1 and 2, accordingly, the present embodiment also provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the above-described game image processing method shown in fig. 1 and 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present application.
Based on the method shown in fig. 1 and fig. 2 and the virtual device embodiment shown in fig. 5, in order to achieve the above object, an embodiment of the present application further provides an electronic device, which may be a personal computer, a notebook computer, a smart phone, a server, or other network devices, and the device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the game image processing method as described above with reference to fig. 1 and 2.
Optionally, the entity device may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
It will be understood by those skilled in the art that the above-described physical device structure provided in the present embodiment is not limited to the physical device, and may include more or less components, or combine some components, or arrange different components.
The storage medium may further include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-described physical devices, and supports the operation of the information processing program as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. By applying the scheme of the embodiment, the track information of the movement of the game role is recorded on the RT map, and then the information recorded on the RT map is read to perform world coordinate offset on plants such as flowers and grass, so as to simulate the physical interaction effect. Compared with the simple interactive animation without specific direction for plant deviation in the traditional image processing mode at present, the plant deviation animation with the corresponding direction can be made according to the movement track of the user, so that the interaction between the game role and the plant is more real, the physical interaction effect can be well simulated, the display effect of the interaction between the plant and the game role is further improved, and the user experience of the game reality is enhanced.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (13)

1. A game image processing method, comprising:
recording the track information of the movement of the game role interacted with the plant on a rendering target map;
determining offset strength and offset direction of the plant to be adjusted in the rendering target map based on the trajectory information;
reading the offset strength and the offset direction from the render target map;
and carrying out world coordinate offset on the plant according to the read offset strength and the offset direction so as to generate offset animation information of the plant.
2. The method according to claim 1, wherein the shifting the plant according to the read offset strength and offset direction to generate offset animation information of the plant comprises:
and carrying out increasing or decreasing world coordinate offset on the plants from the roots to the tips so as to generate gradually-changed offset animation information of the plants from the roots to the tips.
3. The method according to claim 1, wherein the recording of the trajectory information of the movement of the game character interacting with the plant on the rendering target map specifically comprises:
and drawing a material ball of the path of the movement track of the game character on the plant to a rendering target map of the path of the movement track of the game character on the plant, wherein each drawn rendering target map correspondingly stores track information of one frame of the game character.
4. The method according to claim 3, wherein determining the offset strength and offset direction to be adjusted by the plant based on the trajectory information in the rendered target map comprises:
acquiring target coordinates of the world coordinates of the game role mapped to the texture map coordinates of the rendering target map;
simulating the intensity value of the plant offset deformation by using a circular gradient field taking the game role as the center based on the target coordinate of the game role in the rendered target map, and determining the offset intensity to be adjusted of the plant according to the intensity value;
and subtracting the target coordinates of the game character in the rendered target map from the texture map coordinate nodes in the material ball to obtain a plane direction vector pointing to the game character for one circle, and determining the offset direction to be adjusted of the plant according to the plane direction vector pointing to the game character for one circle.
5. The method according to claim 4, wherein the determining the offset direction of the vegetation to be adjusted according to the plane direction vector pointing to the game character for one circle comprises:
performing vector point multiplication on the advancing direction of the game role and the plane direction vector pointing to the game role for one circle;
and respectively determining the offset directions to be adjusted of a left offset graft and a right offset graft in the plant according to the dot multiplication result, wherein the offset direction to be adjusted of the left offset graft is a direction perpendicular to the advancing direction on the left side of the advancing direction, and the offset direction to be adjusted of the right offset graft is a direction perpendicular to the advancing direction on the right side of the advancing direction.
6. The method according to claim 5, wherein the shifting the plant according to the read offset strength and offset direction to generate offset animation information of the plant comprises:
judging whether the offset intensity is greater than a preset intensity threshold value or not;
if the offset intensity is larger than the preset intensity threshold value, carrying out world coordinate offset on the plants according to the offset direction, so that the plants are arranged towards the left side and the right side of the advancing direction of the game player;
and if the offset intensity is smaller than or equal to the preset intensity threshold value, performing world coordinate offset on the vegetation to enable the vegetation to shake towards a target direction, wherein the target direction is determined according to the advancing direction of the game player.
7. The method according to claim 5, wherein determining the offset strength and offset direction to be adjusted by the plant based on the trajectory information in the rendered target map further comprises:
storing the offset intensity and the offset vector to be adjusted of the plant into an RGB color channel of the rendered target map, wherein if a negative value exists in the offset direction, non-negative value mapping storage processing is carried out;
the reading the offset strength and the offset direction from the rendering target map specifically includes:
reading the offset strength and the offset direction from the RGB color channels of the rendered target map based on a non-negative mapping relationship.
8. The method according to claim 7, wherein determining the offset strength and offset direction to be adjusted by the plant based on the trajectory information in the rendered target map further comprises:
and when each rendering target map is drawn, adding the current rendering target map and the previous rendering target map to update the advancing track of the game role on the rendering target map.
9. The method according to claim 7, wherein the storing the offset intensity and the offset vector to be adjusted by the plant into the RGB color channels of the rendered target map comprises:
storing the offset strength to an R channel of the render target map;
storing a plane direction vector of the offset direction to a G channel and a B channel of the render-target map.
10. The method according to claim 7, wherein the reading the offset strength and the offset direction from the RGB color channels of the rendered target map based on the non-negative mapping relationship comprises:
mapping the position information of the plant to the texture map coordinates of the rendering target map;
and reading the offset intensity and the offset direction from an RGB color channel of the rendering target map based on the mapping relation between the texture map coordinate obtained by mapping the plant and a non-negative value.
11. A game image processing apparatus, comprising:
the recording module is used for recording the track information of the movement of the game role interacted with the plant on the rendering target map;
a determining module, configured to determine, in the rendered target map, an offset strength and an offset direction of the plant to be adjusted based on the trajectory information;
a reading module, configured to read the offset strength and the offset direction from the rendering target map;
and the generation module is used for carrying out world coordinate offset on the plant according to the read offset strength and the offset direction so as to generate offset animation information of the plant.
12. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 10.
13. An electronic device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method of any one of claims 1 to 10 when executing the computer program.
CN202011370331.6A 2020-11-30 2020-11-30 Game image processing method and device and electronic equipment Active CN112241993B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011370331.6A CN112241993B (en) 2020-11-30 2020-11-30 Game image processing method and device and electronic equipment
PCT/CN2021/119151 WO2022111003A1 (en) 2020-11-30 2021-09-17 Game image processing method, apparatus, program, and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011370331.6A CN112241993B (en) 2020-11-30 2020-11-30 Game image processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112241993A true CN112241993A (en) 2021-01-19
CN112241993B CN112241993B (en) 2021-03-02

Family

ID=74175435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011370331.6A Active CN112241993B (en) 2020-11-30 2020-11-30 Game image processing method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN112241993B (en)
WO (1) WO2022111003A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112807685A (en) * 2021-01-22 2021-05-18 珠海天燕科技有限公司 Grassland rendering method, grassland rendering device and grassland rendering equipment based on game role track
CN112967367A (en) * 2021-03-19 2021-06-15 完美世界(北京)软件科技发展有限公司 Water wave special effect generation method and device, storage medium and computer equipment
CN113096209A (en) * 2021-03-29 2021-07-09 惠州华阳通用电子有限公司 Display method of vehicle-mounted image trajectory line
CN113487708A (en) * 2021-06-25 2021-10-08 山东齐鲁数通科技有限公司 Graphics-based flowing animation implementation method, storage medium and terminal equipment
CN113546411A (en) * 2021-07-22 2021-10-26 网易(杭州)网络有限公司 Rendering method and device of game model, terminal and storage medium
CN113786624A (en) * 2021-09-17 2021-12-14 完美世界(北京)软件科技发展有限公司 Game resource manufacturing method, device and equipment
WO2022111003A1 (en) * 2020-11-30 2022-06-02 成都完美时空网络技术有限公司 Game image processing method, apparatus, program, and readable medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289836A (en) * 2011-07-25 2011-12-21 北京农业信息技术研究中心 Method for synthesizing plant animation
CN102930590A (en) * 2012-10-17 2013-02-13 沈阳创达技术交易市场有限公司 Interactive earth surface trim rendering method
CN103605501A (en) * 2013-07-01 2014-02-26 绵阳市武道数码科技有限公司 Game vegetation system
CN104008561A (en) * 2014-06-11 2014-08-27 无锡梵天信息技术股份有限公司 Simulation process type animation realizing method based on GPU
CN104793837A (en) * 2014-01-20 2015-07-22 腾讯科技(深圳)有限公司 Picture generation method and device
US20160225178A1 (en) * 2005-02-28 2016-08-04 Kenneth Perlin Method and Apparatus for Creating a Computer Simulation of an Actor
CN106502388A (en) * 2016-09-26 2017-03-15 惠州Tcl移动通信有限公司 A kind of interactive movement technique and head-wearing type intelligent equipment
CN107067451A (en) * 2017-04-07 2017-08-18 广州爱九游信息技术有限公司 The implementation method and device of dynamic bone in animation
CN107636585A (en) * 2014-09-18 2018-01-26 谷歌有限责任公司 By being drawn inside reality environment and the generation of three-dimensional fashion object carried out
CN109559366A (en) * 2018-12-18 2019-04-02 珠海格力电器股份有限公司 Display methods, device, storage medium and the equipment of potted plant growth course
US20190265945A1 (en) * 2018-02-27 2019-08-29 Dish Network L.L.C. Apparatus, systems and methods for presenting content reviews in a virtual world
CN110874859A (en) * 2018-08-30 2020-03-10 三星电子(中国)研发中心 Method and equipment for generating animation
CN111309232A (en) * 2020-02-24 2020-06-19 北京明略软件系统有限公司 Display area adjusting method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102108244B1 (en) * 2016-04-06 2020-05-07 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Image processing method and device
CN105913471B (en) * 2016-04-06 2018-09-14 腾讯科技(深圳)有限公司 The method and apparatus of picture processing
JP6977931B2 (en) * 2017-12-28 2021-12-08 任天堂株式会社 Game programs, game devices, game systems, and game processing methods
CN110838162B (en) * 2019-11-26 2023-11-28 网易(杭州)网络有限公司 Vegetation rendering method and device, storage medium and electronic equipment
CN112241993B (en) * 2020-11-30 2021-03-02 成都完美时空网络技术有限公司 Game image processing method and device and electronic equipment
CN112827169B (en) * 2021-03-02 2022-11-08 腾讯科技(深圳)有限公司 Game image processing method and device, storage medium and electronic equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160225178A1 (en) * 2005-02-28 2016-08-04 Kenneth Perlin Method and Apparatus for Creating a Computer Simulation of an Actor
CN102289836A (en) * 2011-07-25 2011-12-21 北京农业信息技术研究中心 Method for synthesizing plant animation
CN102930590A (en) * 2012-10-17 2013-02-13 沈阳创达技术交易市场有限公司 Interactive earth surface trim rendering method
CN103605501A (en) * 2013-07-01 2014-02-26 绵阳市武道数码科技有限公司 Game vegetation system
CN104793837A (en) * 2014-01-20 2015-07-22 腾讯科技(深圳)有限公司 Picture generation method and device
CN104008561A (en) * 2014-06-11 2014-08-27 无锡梵天信息技术股份有限公司 Simulation process type animation realizing method based on GPU
CN107636585A (en) * 2014-09-18 2018-01-26 谷歌有限责任公司 By being drawn inside reality environment and the generation of three-dimensional fashion object carried out
CN106502388A (en) * 2016-09-26 2017-03-15 惠州Tcl移动通信有限公司 A kind of interactive movement technique and head-wearing type intelligent equipment
CN107067451A (en) * 2017-04-07 2017-08-18 广州爱九游信息技术有限公司 The implementation method and device of dynamic bone in animation
US20190265945A1 (en) * 2018-02-27 2019-08-29 Dish Network L.L.C. Apparatus, systems and methods for presenting content reviews in a virtual world
CN110874859A (en) * 2018-08-30 2020-03-10 三星电子(中国)研发中心 Method and equipment for generating animation
CN109559366A (en) * 2018-12-18 2019-04-02 珠海格力电器股份有限公司 Display methods, device, storage medium and the equipment of potted plant growth course
CN111309232A (en) * 2020-02-24 2020-06-19 北京明略软件系统有限公司 Display area adjusting method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
TOMMY TRAN,: ""Creating Interactive Grass in Unreal Engine 4"", 《HTTPS://WWW.RAYWENDERLICH.COM/6314-CREATING-INTERACTIVE-GRASS-IN-UNREAL-ENGINE-4》 *
邱航 等: ""草地场景碾压效果模拟"", 《计算机科学》 *
陈雷霆 等: ""草地场景真实感模拟技术综述"", 《计算机辅助设计与图形学学报》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022111003A1 (en) * 2020-11-30 2022-06-02 成都完美时空网络技术有限公司 Game image processing method, apparatus, program, and readable medium
CN112807685A (en) * 2021-01-22 2021-05-18 珠海天燕科技有限公司 Grassland rendering method, grassland rendering device and grassland rendering equipment based on game role track
CN112967367A (en) * 2021-03-19 2021-06-15 完美世界(北京)软件科技发展有限公司 Water wave special effect generation method and device, storage medium and computer equipment
CN112967367B (en) * 2021-03-19 2022-04-08 完美世界(北京)软件科技发展有限公司 Water wave special effect generation method and device, storage medium and computer equipment
WO2022193614A1 (en) * 2021-03-19 2022-09-22 完美世界(北京)软件科技发展有限公司 Water wave special effect generation method and apparatus, storage medium, computer device
CN113096209A (en) * 2021-03-29 2021-07-09 惠州华阳通用电子有限公司 Display method of vehicle-mounted image trajectory line
CN113487708A (en) * 2021-06-25 2021-10-08 山东齐鲁数通科技有限公司 Graphics-based flowing animation implementation method, storage medium and terminal equipment
CN113487708B (en) * 2021-06-25 2023-11-03 山东齐鲁数通科技有限公司 Flow animation implementation method based on graphics, storage medium and terminal equipment
CN113546411A (en) * 2021-07-22 2021-10-26 网易(杭州)网络有限公司 Rendering method and device of game model, terminal and storage medium
CN113786624A (en) * 2021-09-17 2021-12-14 完美世界(北京)软件科技发展有限公司 Game resource manufacturing method, device and equipment

Also Published As

Publication number Publication date
CN112241993B (en) 2021-03-02
WO2022111003A1 (en) 2022-06-02

Similar Documents

Publication Publication Date Title
CN112241993B (en) Game image processing method and device and electronic equipment
CN109685909B (en) Image display method, image display device, storage medium and electronic device
US11559738B2 (en) Machine learned virtual gaming environment
CN110838162A (en) Vegetation rendering method and device, storage medium and electronic equipment
CN105913471B (en) The method and apparatus of picture processing
JP2010022646A (en) Program, information storage medium, and image generation system
CN112967367B (en) Water wave special effect generation method and device, storage medium and computer equipment
CN110570500B (en) Character drawing method, device, equipment and computer readable storage medium
CN112132936B (en) Picture rendering method and device, computer equipment and storage medium
US20030193503A1 (en) Computer animation system and method
JP4079378B2 (en) Image processing apparatus, image processing apparatus control method, and program
CN111773719A (en) Rendering method and device of virtual object, storage medium and electronic device
US20100315421A1 (en) Generating fog effects in a simulated environment
JP2007141082A (en) Program, texture data structure, information storage medium, and image generation system
JP4749198B2 (en) Program, information storage medium, and image generation system
CN112231020A (en) Model switching method and device, electronic equipment and storage medium
CN114219888A (en) Method and device for generating dynamic silhouette effect of three-dimensional character and storage medium
CN114832375A (en) Ambient light shielding processing method, device and equipment
CN114191815A (en) Display control method and device in game
CN106730842A (en) A kind of game movie display methods and device
CN116115995A (en) Image rendering processing method and device and electronic equipment
CN112891940A (en) Image data processing method and device, storage medium and computer equipment
CN114047998B (en) Object updating method and device
JP2007164651A (en) Program, information storage medium and image generation system
CN108109189A (en) Act sharing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant